summaryrefslogtreecommitdiff
path: root/python-django-doctor.spec
blob: 2d0dfc91eb63b92728cdc495bfd5e2fcdf9ecd04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
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 <Python_Bot@openeuler.org> - 2.6.0-1
- Package Spec generated