diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-31 08:09:45 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-31 08:09:45 +0000 |
commit | e92b7d953ec7cdd4e359a1ed49332ef7e88eb4fe (patch) | |
tree | 2acc456b1b8e5e4cd4568d9c5e6bd5c016ebbb9f /python-django-migrations-formatter.spec | |
parent | d18818410b8d3bbbcff267049d754e4e09fc0ffc (diff) |
automatic import of python-django-migrations-formatter
Diffstat (limited to 'python-django-migrations-formatter.spec')
-rw-r--r-- | python-django-migrations-formatter.spec | 260 |
1 files changed, 260 insertions, 0 deletions
diff --git a/python-django-migrations-formatter.spec b/python-django-migrations-formatter.spec new file mode 100644 index 0000000..b84ba61 --- /dev/null +++ b/python-django-migrations-formatter.spec @@ -0,0 +1,260 @@ +%global _empty_manifest_terminate_build 0 +Name: python-django-migrations-formatter +Version: 1.0.0 +Release: 1 +Summary: A Django library to automatically format your migrations. +License: BSD +URL: https://github.com/MarkusH/django-migrations-formatter +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/3f/b3/5deb5808160102632aa6b4d193088932eeecf2ac82126a146bbdb813106e/django-migrations-formatter-1.0.0.tar.gz +BuildArch: noarch + +Requires: python3-black +Requires: python3-pre-commit +Requires: python3-isort +Requires: python3-coverage[toml] +Requires: python3-Django + +%description +# django-migrations-formatter + +[](https://github.com/MarkusH/django-migrations-formatter/actions?query=branch%3Amain+event%3Apush) +[](https://app.codecov.io/gh/MarkusH/django-migrations-formatter/branch/main) +[](https://pypi.org/project/django-migrations-formatter/) + + + + +This Django library will format Django migrations using +[black](https://pypi.org/project/black/) and [isort](https://pypi.org/project/isort/). + +## Installation + +Start by installing `django-migrations-formatter` from PyPI: + +```console +(env)$ python -m pip install django-migrations-formatter +``` + +You will also need to make sure to have `black` and/or `isort` installed. +Without them, this library doesn't provide any value. For ease of use, you can +install either of them by including them as "extras" during the installation. + +```console +(env)$ python -m pip install "django-migrations-formatter[black,isort]" +``` + +Then you need to add `django_migrations_formatter.apps.MigrationsFormatter` to +your `INSTALLED_APPS`: + +```python +INSTALLED_APPS = [ + ..., + 'django_migrations_formatter.apps.MigrationsFormatter', +] +``` + +## Contributing + +The project uses [black](https://pypi.org/project/black/) and +[isort](https://pypi.org/project/isort/) for formatting its code. +[flake8](https://pypi.org/project/flake8/) is used for linting. All these are +combined into [pre-commit](https://pre-commit.com/) to run before each commit +and push. To set it up: + +```console +(env)$ python -m pip install '.[black,dev,isort,test]' +(env)$ pre-commit install -t pre-commit -t pre-push --install-hooks +``` + +To run the unit tests: + +```console +(env)$ django-admin test --pythonpath . -v 2 --settings=tests.settings +``` + +If you spot an problem, please [open an issue](https://github.com/MarkusH/django-migrations-formatter/issues/new) +on GitHub. + + + + +%package -n python3-django-migrations-formatter +Summary: A Django library to automatically format your migrations. +Provides: python-django-migrations-formatter +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-django-migrations-formatter +# django-migrations-formatter + +[](https://github.com/MarkusH/django-migrations-formatter/actions?query=branch%3Amain+event%3Apush) +[](https://app.codecov.io/gh/MarkusH/django-migrations-formatter/branch/main) +[](https://pypi.org/project/django-migrations-formatter/) + + + + +This Django library will format Django migrations using +[black](https://pypi.org/project/black/) and [isort](https://pypi.org/project/isort/). + +## Installation + +Start by installing `django-migrations-formatter` from PyPI: + +```console +(env)$ python -m pip install django-migrations-formatter +``` + +You will also need to make sure to have `black` and/or `isort` installed. +Without them, this library doesn't provide any value. For ease of use, you can +install either of them by including them as "extras" during the installation. + +```console +(env)$ python -m pip install "django-migrations-formatter[black,isort]" +``` + +Then you need to add `django_migrations_formatter.apps.MigrationsFormatter` to +your `INSTALLED_APPS`: + +```python +INSTALLED_APPS = [ + ..., + 'django_migrations_formatter.apps.MigrationsFormatter', +] +``` + +## Contributing + +The project uses [black](https://pypi.org/project/black/) and +[isort](https://pypi.org/project/isort/) for formatting its code. +[flake8](https://pypi.org/project/flake8/) is used for linting. All these are +combined into [pre-commit](https://pre-commit.com/) to run before each commit +and push. To set it up: + +```console +(env)$ python -m pip install '.[black,dev,isort,test]' +(env)$ pre-commit install -t pre-commit -t pre-push --install-hooks +``` + +To run the unit tests: + +```console +(env)$ django-admin test --pythonpath . -v 2 --settings=tests.settings +``` + +If you spot an problem, please [open an issue](https://github.com/MarkusH/django-migrations-formatter/issues/new) +on GitHub. + + + + +%package help +Summary: Development documents and examples for django-migrations-formatter +Provides: python3-django-migrations-formatter-doc +%description help +# django-migrations-formatter + +[](https://github.com/MarkusH/django-migrations-formatter/actions?query=branch%3Amain+event%3Apush) +[](https://app.codecov.io/gh/MarkusH/django-migrations-formatter/branch/main) +[](https://pypi.org/project/django-migrations-formatter/) + + + + +This Django library will format Django migrations using +[black](https://pypi.org/project/black/) and [isort](https://pypi.org/project/isort/). + +## Installation + +Start by installing `django-migrations-formatter` from PyPI: + +```console +(env)$ python -m pip install django-migrations-formatter +``` + +You will also need to make sure to have `black` and/or `isort` installed. +Without them, this library doesn't provide any value. For ease of use, you can +install either of them by including them as "extras" during the installation. + +```console +(env)$ python -m pip install "django-migrations-formatter[black,isort]" +``` + +Then you need to add `django_migrations_formatter.apps.MigrationsFormatter` to +your `INSTALLED_APPS`: + +```python +INSTALLED_APPS = [ + ..., + 'django_migrations_formatter.apps.MigrationsFormatter', +] +``` + +## Contributing + +The project uses [black](https://pypi.org/project/black/) and +[isort](https://pypi.org/project/isort/) for formatting its code. +[flake8](https://pypi.org/project/flake8/) is used for linting. All these are +combined into [pre-commit](https://pre-commit.com/) to run before each commit +and push. To set it up: + +```console +(env)$ python -m pip install '.[black,dev,isort,test]' +(env)$ pre-commit install -t pre-commit -t pre-push --install-hooks +``` + +To run the unit tests: + +```console +(env)$ django-admin test --pythonpath . -v 2 --settings=tests.settings +``` + +If you spot an problem, please [open an issue](https://github.com/MarkusH/django-migrations-formatter/issues/new) +on GitHub. + + + + +%prep +%autosetup -n django-migrations-formatter-1.0.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-django-migrations-formatter -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 31 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.0-1 +- Package Spec generated |