From 26ce9f65dec575fab051848cce5e96484f843c5b Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Fri, 5 May 2023 10:15:23 +0000 Subject: automatic import of python-django-doctor --- python-django-doctor.spec | 210 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 210 insertions(+) create mode 100644 python-django-doctor.spec (limited to 'python-django-doctor.spec') diff --git a/python-django-doctor.spec b/python-django-doctor.spec new file mode 100644 index 0000000..2d0dfc9 --- /dev/null +++ b/python-django-doctor.spec @@ -0,0 +1,210 @@ +%global _empty_manifest_terminate_build 0 +Name: python-django-doctor +Version: 2.6.0 +Release: 1 +Summary: Find and fix Django mishaps. +License: Proprietary. Please purchase a license for commercial use. +URL: https://django.doctor +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/fb/65/40996cea4efbfc870c34c07fca53e16a8e2be92c8ac4079389294ebaf109/django_doctor-2.6.0.zip + +Requires: python3-asttokens +Requires: python3-dparse +Requires: python3-black +Requires: python3-pylint +Requires: python3-rich +Requires: python3-pytest +Requires: python3-pytest-cov +Requires: python3-pytest-sugar +Requires: python3-pytest-django +Requires: python3-requests-mock +Requires: python3-WebTest +Requires: python3-coverage +Requires: python3-tox + +%description +## Installation + $ pip install django-doctor +## Fix +Run the fix suggestion wizard like so: + $ django_doctor fix +This runs a simple server on http://localhost:9000 and opens the wizard in your browser: +![](https://i.imgur.com/GMcuQFl.png) +You then accept or reject the suggestions +![](https://i.imgur.com/0FRqflf.png) +And ultimately the selected changes are saved to your file system +![](https://i.imgur.com/rMeNH4n.png) +You can change the address: + $ django_doctor fix --address=0.0.0.0 --port=9001 +Your virtual environment directory is automatically skipped. To exclude other directories use the `--ignore` flag: + $ django_doctor fix --ignore=foo # single directory + $ django_doctor fix --ignore=foo --ignore=bar # multiple directories +You can also specify a directory to check instead of running on the current working directory. To run on only on "my_app" and "my_other_app": + $ django_doctor fix my_app my_other_app +## Check +You can see suggested changes in your shell: + $ django_doctor check +![](https://i.imgur.com/jb5Q9P3.png) +Consider running this as a pre-commit hook, or on your CI to prevent new Django anti-patterns from being merged. +You can also use `--ignore` the same as with the `fix` command. +## Configuration +You turn checks on/off with `--disable` and `--enable`. See [here](https://django.doctor/config) for the codenames of the checks. +## Troubleshooting +### Debugging +Try running `django_doctor` in verbose mode by adding `--log-level=debug` when executing the `fix` or `check` commands. +### Pipenv +If you're using `pipenv` you may need to do `pipenv install django-doctor --pre` because: +- `django-doctor` depends on [black](https://pypi.org/project/black/) +- `black` only releases pre-releases +- `pipenv` ignores pre-releases +[pypi-image]: https://badge.fury.io/py/django-doctor.svg +[pypi]: https://badge.fury.io/py/django-doctor +[semver-image]: https://img.shields.io/badge/Versioning%20strategy-SemVer-5FBB1C.svg +[semver]: https://semver.org +## Support +Chat with us on https://django.doctor if you have any problems or have a feature request +## GitHub integration +Django Doctor has GitHub integration. Learn more at https://django.doctor/github + +%package -n python3-django-doctor +Summary: Find and fix Django mishaps. +Provides: python-django-doctor +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-cffi +BuildRequires: gcc +BuildRequires: gdb +%description -n python3-django-doctor +## Installation + $ pip install django-doctor +## Fix +Run the fix suggestion wizard like so: + $ django_doctor fix +This runs a simple server on http://localhost:9000 and opens the wizard in your browser: +![](https://i.imgur.com/GMcuQFl.png) +You then accept or reject the suggestions +![](https://i.imgur.com/0FRqflf.png) +And ultimately the selected changes are saved to your file system +![](https://i.imgur.com/rMeNH4n.png) +You can change the address: + $ django_doctor fix --address=0.0.0.0 --port=9001 +Your virtual environment directory is automatically skipped. To exclude other directories use the `--ignore` flag: + $ django_doctor fix --ignore=foo # single directory + $ django_doctor fix --ignore=foo --ignore=bar # multiple directories +You can also specify a directory to check instead of running on the current working directory. To run on only on "my_app" and "my_other_app": + $ django_doctor fix my_app my_other_app +## Check +You can see suggested changes in your shell: + $ django_doctor check +![](https://i.imgur.com/jb5Q9P3.png) +Consider running this as a pre-commit hook, or on your CI to prevent new Django anti-patterns from being merged. +You can also use `--ignore` the same as with the `fix` command. +## Configuration +You turn checks on/off with `--disable` and `--enable`. See [here](https://django.doctor/config) for the codenames of the checks. +## Troubleshooting +### Debugging +Try running `django_doctor` in verbose mode by adding `--log-level=debug` when executing the `fix` or `check` commands. +### Pipenv +If you're using `pipenv` you may need to do `pipenv install django-doctor --pre` because: +- `django-doctor` depends on [black](https://pypi.org/project/black/) +- `black` only releases pre-releases +- `pipenv` ignores pre-releases +[pypi-image]: https://badge.fury.io/py/django-doctor.svg +[pypi]: https://badge.fury.io/py/django-doctor +[semver-image]: https://img.shields.io/badge/Versioning%20strategy-SemVer-5FBB1C.svg +[semver]: https://semver.org +## Support +Chat with us on https://django.doctor if you have any problems or have a feature request +## GitHub integration +Django Doctor has GitHub integration. Learn more at https://django.doctor/github + +%package help +Summary: Development documents and examples for django-doctor +Provides: python3-django-doctor-doc +%description help +## Installation + $ pip install django-doctor +## Fix +Run the fix suggestion wizard like so: + $ django_doctor fix +This runs a simple server on http://localhost:9000 and opens the wizard in your browser: +![](https://i.imgur.com/GMcuQFl.png) +You then accept or reject the suggestions +![](https://i.imgur.com/0FRqflf.png) +And ultimately the selected changes are saved to your file system +![](https://i.imgur.com/rMeNH4n.png) +You can change the address: + $ django_doctor fix --address=0.0.0.0 --port=9001 +Your virtual environment directory is automatically skipped. To exclude other directories use the `--ignore` flag: + $ django_doctor fix --ignore=foo # single directory + $ django_doctor fix --ignore=foo --ignore=bar # multiple directories +You can also specify a directory to check instead of running on the current working directory. To run on only on "my_app" and "my_other_app": + $ django_doctor fix my_app my_other_app +## Check +You can see suggested changes in your shell: + $ django_doctor check +![](https://i.imgur.com/jb5Q9P3.png) +Consider running this as a pre-commit hook, or on your CI to prevent new Django anti-patterns from being merged. +You can also use `--ignore` the same as with the `fix` command. +## Configuration +You turn checks on/off with `--disable` and `--enable`. See [here](https://django.doctor/config) for the codenames of the checks. +## Troubleshooting +### Debugging +Try running `django_doctor` in verbose mode by adding `--log-level=debug` when executing the `fix` or `check` commands. +### Pipenv +If you're using `pipenv` you may need to do `pipenv install django-doctor --pre` because: +- `django-doctor` depends on [black](https://pypi.org/project/black/) +- `black` only releases pre-releases +- `pipenv` ignores pre-releases +[pypi-image]: https://badge.fury.io/py/django-doctor.svg +[pypi]: https://badge.fury.io/py/django-doctor +[semver-image]: https://img.shields.io/badge/Versioning%20strategy-SemVer-5FBB1C.svg +[semver]: https://semver.org +## Support +Chat with us on https://django.doctor if you have any problems or have a feature request +## GitHub integration +Django Doctor has GitHub integration. Learn more at https://django.doctor/github + +%prep +%autosetup -n django-doctor-2.6.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-doctor -f filelist.lst +%dir %{python3_sitearch}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot - 2.6.0-1 +- Package Spec generated -- cgit v1.2.3