3 %bcond_without doc # API documentation
4 %bcond_without tests # unit tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 Summary: Python style guide checker
9 Summary(pl.UTF-8): Sprawdzanie zgodności z poradnikiem stylu kodowania w Pythonie
10 Name: python-pycodestyle
11 # NOTE: before upgrading to >=2.6.0 check for flake8 release supporting new pycodestyle
15 Group: Libraries/Python
16 #Source0Download: https://pypi.org/simple/pycodestyle/
17 Source0: https://files.pythonhosted.org/packages/source/p/pycodestyle/pycodestyle-%{version}.tar.gz
18 # Source0-md5: 40e7a76f364a18f531aaba11a4476e21
19 URL: https://pycodestyle.readthedocs.io/
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.714
23 BuildRequires: python-modules >= 1:2.7
24 BuildRequires: python-setuptools
27 BuildRequires: python3-modules >= 1:3.4
28 BuildRequires: python3-setuptools
30 %{?with_doc:BuildRequires: sphinx-pdg}
31 Requires: python-modules >= 1:2.7
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 pycodestyle is a tool to check your Python code against some of the
37 style conventions in PEP 8. This module was formerly called pep8.
39 %description -l pl.UTF-8
40 pycodestyle to narzędzie do sprawdzania kodu w Pythonie względem
41 niektórych konwencji stylistycznych opisanych w PEP 8. Ten moduł
42 wcześniej nazywał się pep8.
44 %package -n python3-pycodestyle
45 Summary: Python style guide checker
46 Summary(pl.UTF-8): Sprawdzanie zgodności z poradnikiem stylu kodowania w Pythonie
47 Group: Libraries/Python
48 Requires: python3-modules >= 1:3.4
49 # default binary moved
50 Conflicts: python-pycodestyle < 2.5.0-4
52 %description -n python3-pycodestyle
53 pycodestyle is a tool to check your Python code against some of the
54 style conventions in PEP 8. This module was formerly called pep8.
56 %description -n python3-pycodestyle -l pl.UTF-8
57 pycodestyle to narzędzie do sprawdzania kodu w Pythonie względem
58 niektórych konwencji stylistycznych opisanych w PEP 8. Ten moduł
59 wcześniej nazywał się pep8.
62 Summary: API documentation for pycodestyle module
63 Summary(pl.UTF-8): Dokumentacja API modułu pycodestyle
67 API documentation for pycodestyle module.
69 %description apidocs -l pl.UTF-8
70 Dokumentacja API modułu pycodestyle.
73 %setup -q -n pycodestyle-%{version}
80 %{__python} -m testsuite.test_all
88 %{__python} -m testsuite.test_all
93 %{__make} -C docs html
97 rm -rf $RPM_BUILD_ROOT
102 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pycodestyle{,-2}
110 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pycodestyle{,-3}
111 ln -sf pycodestyle-3 $RPM_BUILD_ROOT%{_bindir}/pycodestyle
115 rm -rf $RPM_BUILD_ROOT
119 %defattr(644,root,root,755)
120 %doc CHANGES.txt LICENSE README.rst
121 %attr(755,root,root) %{_bindir}/pycodestyle-2
122 %{py_sitescriptdir}/pycodestyle.py[co]
123 %{py_sitescriptdir}/pycodestyle-%{version}-py*.egg-info
127 %files -n python3-pycodestyle
128 %defattr(644,root,root,755)
129 %doc CHANGES.txt LICENSE README.rst
130 %attr(755,root,root) %{_bindir}/pycodestyle
131 %attr(755,root,root) %{_bindir}/pycodestyle-3
132 %{py3_sitescriptdir}/pycodestyle.py
133 %{py3_sitescriptdir}/__pycache__/pycodestyle.cpython-*.py[co]
134 %{py3_sitescriptdir}/pycodestyle-%{version}-py*.egg-info
139 %defattr(644,root,root,755)
140 %doc docs/_build/html/{_modules,_static,*.html,*.js}