]> git.pld-linux.org Git - packages/flake8.git/blame - flake8.spec
- updated to 3.7.9
[packages/flake8.git] / flake8.spec
CommitLineData
a24e9a34
ER
1#
2# Conditional build:
37b9d23d
JB
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
34073edd
JB
5%bcond_without tests # pytest tests
6%bcond_without doc # Sphinx documentation
a24e9a34 7
d7cb1ebf
JB
8Summary: The modular source code checker: pycodestyle, pyflakes and co
9Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
abcf879e 10Name: flake8
2fc1c087
JB
11Version: 3.7.9
12Release: 1
abcf879e
AM
13License: MIT
14Group: Development/Tools
34073edd 15#Source0Download: https://pypi.org/simple/flake8/
d7cb1ebf 16Source0: https://files.pythonhosted.org/packages/source/f/flake8/%{name}-%{version}.tar.gz
2fc1c087 17# Source0-md5: 7dc0ce36b6cf49b13b46bb37ddca80c5
7b99a73b 18Patch0: %{name}-req.patch
2fc1c087 19Patch1: %{name}-duplicate.patch
d7cb1ebf 20URL: https://gitlab.com/pycqa/flake8
37b9d23d 21BuildRequires: rpmbuild(macros) >= 1.714
abcf879e 22BuildRequires: rpm-pythonprov
37b9d23d 23%if %{with python2}
d7cb1ebf 24BuildRequires: python-modules >= 1:2.7
2fc1c087 25BuildRequires: python-setuptools >= 1:30
37b9d23d 26%if %{with tests}
9bc90c26 27BuildRequires: python-configparser
18203870
JB
28BuildRequires: python-entrypoints >= 0.3
29BuildRequires: python-entrypoints < 0.4
d7cb1ebf 30BuildRequires: python-enum34
18203870 31BuildRequires: python-functools32
d7cb1ebf
JB
32BuildRequires: python-mccabe >= 0.6.0
33BuildRequires: python-mccabe < 0.7.0
972dfbb9 34BuildRequires: python-mock >= 2.0.0
18203870
JB
35BuildRequires: python-pycodestyle >= 2.5.0
36BuildRequires: python-pycodestyle < 2.6.0
37BuildRequires: python-pyflakes >= 2.1.0
38BuildRequires: python-pyflakes < 2.2.0
d7cb1ebf 39BuildRequires: python-pytest
18203870 40BuildRequires: python-typing
37b9d23d
JB
41%endif
42%endif
43%if %{with python3}
d7cb1ebf 44BuildRequires: python3-modules >= 1:3.4
2fc1c087 45BuildRequires: python3-setuptools >= 1:30
a24e9a34 46%if %{with tests}
18203870
JB
47BuildRequires: python3-entrypoints >= 0.3
48BuildRequires: python3-entrypoints < 0.4
d7cb1ebf
JB
49BuildRequires: python3-mccabe >= 0.6.0
50BuildRequires: python3-mccabe < 0.7.0
18203870
JB
51BuildRequires: python3-pycodestyle >= 2.5.0
52BuildRequires: python3-pycodestyle < 2.6.0
53BuildRequires: python3-pyflakes >= 2.1.0
54BuildRequires: python3-pyflakes < 2.2.0
d7cb1ebf 55BuildRequires: python3-pytest
d7cb1ebf 56BuildRequires: sed >= 4.0
a24e9a34 57%endif
37b9d23d 58%endif
34073edd
JB
59%if %{with doc}
60BuildRequires: python3-sphinx-prompt
18203870 61BuildRequires: sphinx-pdg-3 >= 1.3
34073edd 62%endif
37b9d23d
JB
63%if %{with python3}
64Requires: python3-flake8 = %{version}-%{release}
65%else
66Requires: python-flake8 = %{version}-%{release}
67%endif
abcf879e
AM
68BuildArch: noarch
69BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70
71%description
72The modular source code checker. It is a wrapper around these tools:
73- PyFlakes
d7cb1ebf 74- pycodestyle
abcf879e
AM
75- Ned Batchelder's McCabe script
76
37b9d23d
JB
77%description -l pl.UTF-8
78Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
79dla narzędzi:
80- PyFlakes
d7cb1ebf 81- pycodestyle
37b9d23d
JB
82- skrypt McCabe autorstwa Neda Batcheldera
83
84%package -n python-flake8
d7cb1ebf
JB
85Summary: The modular source code checker: pycodestyle, pyflakes and co
86Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
37b9d23d 87Group: Libraries/Python
d7cb1ebf 88Requires: python-modules >= 1:2.7
37b9d23d
JB
89
90%description -n python-flake8
91The modular source code checker. It is a wrapper around these tools:
92- PyFlakes
d7cb1ebf 93- pycodestyle
37b9d23d
JB
94- Ned Batchelder's McCabe script
95
96%description -n python-flake8 -l pl.UTF-8
97Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
98dla narzędzi:
99- PyFlakes
d7cb1ebf 100- pycodestyle
37b9d23d
JB
101- skrypt McCabe autorstwa Neda Batcheldera
102
103%package -n python3-flake8
d7cb1ebf
JB
104Summary: The modular source code checker: pycodestyle, pyflakes and co
105Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
37b9d23d 106Group: Libraries/Python
d7cb1ebf 107Requires: python3-modules >= 1:3.4
37b9d23d
JB
108
109%description -n python3-flake8
110The modular source code checker. It is a wrapper around these tools:
111- PyFlakes
d7cb1ebf 112- pycodestyle
37b9d23d
JB
113- Ned Batchelder's McCabe script
114
115%description -n python3-flake8 -l pl.UTF-8
116Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
117dla narzędzi:
118- PyFlakes
d7cb1ebf 119- pycodestyle
37b9d23d
JB
120- skrypt McCabe autorstwa Neda Batcheldera
121
34073edd
JB
122%package -n python-flake8-apidocs
123Summary: API documentation for Python flake8 module
124Summary(pl.UTF-8): Dokumentacja API modułu Pythona flake8
125Group: Documentation
126
127%description -n python-flake8-apidocs
128API documentation for Python flake8 module.
129
130%description -n python-flake8-apidocs -l pl.UTF-8
131Dokumentacja API modułu Pythona flake8.
132
abcf879e
AM
133%prep
134%setup -q
7b99a73b 135%patch0 -p1
2fc1c087 136%patch1 -p1
abcf879e
AM
137
138%build
37b9d23d 139%if %{with python2}
18203870
JB
140%py_build
141
142%if %{with tests}
143PYTHONPATH=$(pwd)/src \
144%{__python} -m pytest -rw tests
145%endif
37b9d23d
JB
146%endif
147
148%if %{with python3}
d7cb1ebf
JB
149# don't require standalone mock
150%{__sed} -i -e 's/import mock/from unittest import mock/' $(grep 'import mock' tests/ -rl)
151
18203870
JB
152%py3_build
153
154%if %{with tests}
155PYTHONPATH=$(pwd)/src \
156%{__python3} -m pytest -rw tests
157%endif
37b9d23d 158%endif
abcf879e 159
34073edd
JB
160%if %{with doc}
161cd docs/source
162PYTHONPATH=$(pwd)/../../src \
163sphinx-build-3 -b html . _build/html
164%endif
165
abcf879e
AM
166%install
167rm -rf $RPM_BUILD_ROOT
37b9d23d
JB
168
169%if %{with python2}
170%py_install
d7cb1ebf 171%{__mv} $RPM_BUILD_ROOT%{_bindir}/flake8{,-2}
37b9d23d
JB
172%py_postclean
173%endif
174
175%if %{with python3}
33643bb9 176%py3_install
d7cb1ebf 177%{__mv} $RPM_BUILD_ROOT%{_bindir}/flake8{,-3}
37b9d23d 178%endif
abcf879e 179
8b0b6706
ER
180ln -s flake-%{!?with_python3:2}%{?with_python3:3} $RPM_BUILD_ROOT%{_bindir}/flake8
181
abcf879e
AM
182%clean
183rm -rf $RPM_BUILD_ROOT
184
185%files
186%defattr(644,root,root,755)
abcf879e 187%attr(755,root,root) %{_bindir}/flake8
37b9d23d
JB
188
189%if %{with python2}
190%files -n python-flake8
191%defattr(644,root,root,755)
34073edd 192%doc CONTRIBUTORS.txt LICENSE README.rst
37b9d23d
JB
193%attr(755,root,root) %{_bindir}/flake8-2
194%{py_sitescriptdir}/flake8
195%{py_sitescriptdir}/flake8-%{version}-py*.egg-info
196%endif
197
198%if %{with python3}
199%files -n python3-flake8
200%defattr(644,root,root,755)
34073edd 201%doc CONTRIBUTORS.txt LICENSE README.rst
37b9d23d
JB
202%attr(755,root,root) %{_bindir}/flake8-3
203%{py3_sitescriptdir}/flake8
204%{py3_sitescriptdir}/flake8-%{version}-py*.egg-info
205%endif
34073edd
JB
206
207%if %{with doc}
208%files -n python-flake8-apidocs
209%defattr(644,root,root,755)
210%doc docs/source/_build/html/{_modules,_static,internal,plugin-development,release-notes,user,*.html,*.js}
211%endif
This page took 0.187157 seconds and 4 git commands to generate.