]> git.pld-linux.org Git - packages/python-pycodestyle.git/blame - python-pycodestyle.spec
- updated to 2.5.0
[packages/python-pycodestyle.git] / python-pycodestyle.spec
CommitLineData
ba95afaf
JB
1#
2# Conditional build:
ba95afaf 3%bcond_without doc # API documentation
4865d893 4%bcond_without tests # unit tests
ba95afaf
JB
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8Summary: Python style guide checker
9Summary(pl.UTF-8): Sprawdzanie zgodności z poradnikiem stylu kodowania w Pythonie
10Name: python-pycodestyle
4865d893 11# NOTE: before upgrading to >=2.6.0 check for flake8 release supporting new pycodestyle
7fd6ab65 12Version: 2.5.0
4865d893 13Release: 1
ba95afaf
JB
14License: MIT
15Group: Libraries/Python
4865d893 16#Source0Download: https://pypi.org/simple/pycodestyle/
ba95afaf 17Source0: https://files.pythonhosted.org/packages/source/p/pycodestyle/pycodestyle-%{version}.tar.gz
7fd6ab65 18# Source0-md5: 40e7a76f364a18f531aaba11a4476e21
ba95afaf
JB
19URL: https://pycodestyle.readthedocs.io/
20BuildRequires: rpm-pythonprov
21BuildRequires: rpmbuild(macros) >= 1.714
22%if %{with python2}
7fd6ab65 23BuildRequires: python-modules >= 1:2.7
ba95afaf
JB
24BuildRequires: python-setuptools
25%endif
26%if %{with python3}
7fd6ab65 27BuildRequires: python3-modules >= 1:3.4
ba95afaf
JB
28BuildRequires: python3-setuptools
29%endif
30%{?with_doc:BuildRequires: sphinx-pdg}
7fd6ab65 31Requires: python-modules >= 1:2.7
ba95afaf
JB
32BuildArch: noarch
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36pycodestyle is a tool to check your Python code against some of the
37style conventions in PEP 8. This module was formerly called pep8.
38
39%description -l pl.UTF-8
40pycodestyle to narzędzie do sprawdzania kodu w Pythonie względem
41niektórych konwencji stylistycznych opisanych w PEP 8. Ten moduł
42wcześniej nazywał się pep8.
43
44%package -n python3-pycodestyle
45Summary: Python style guide checker
46Summary(pl.UTF-8): Sprawdzanie zgodności z poradnikiem stylu kodowania w Pythonie
47Group: Libraries/Python
7fd6ab65 48Requires: python3-modules >= 1:3.4
ba95afaf
JB
49
50%description -n python3-pycodestyle
51pycodestyle is a tool to check your Python code against some of the
52style conventions in PEP 8. This module was formerly called pep8.
53
54%description -n python3-pycodestyle -l pl.UTF-8
55pycodestyle to narzędzie do sprawdzania kodu w Pythonie względem
56niektórych konwencji stylistycznych opisanych w PEP 8. Ten moduł
57wcześniej nazywał się pep8.
58
59%package apidocs
60Summary: API documentation for pycodestyle module
61Summary(pl.UTF-8): Dokumentacja API modułu pycodestyle
62Group: Documentation
63
64%description apidocs
65API documentation for pycodestyle module.
66
67%description apidocs -l pl.UTF-8
68Dokumentacja API modułu pycodestyle.
69
70%prep
71%setup -q -n pycodestyle-%{version}
72
73%build
74%if %{with python2}
75%py_build %{?with_tests:test}
76%endif
77
78%if %{with python3}
79%py3_build %{?with_tests:test}
80%endif
81
82%if %{with doc}
83%{__make} -C docs html
84%endif
85
86%install
87rm -rf $RPM_BUILD_ROOT
88%if %{with python2}
89%py_install
90
91%{__mv} $RPM_BUILD_ROOT%{_bindir}/pycodestyle{,-2}
92%py_postclean
93%endif
94
95%if %{with python3}
96%py3_install
97%{__mv} $RPM_BUILD_ROOT%{_bindir}/pycodestyle{,-3}
98%endif
99
100%if %{with python2}
101ln -s pycodestyle-2 $RPM_BUILD_ROOT%{_bindir}/pycodestyle
102%endif
103
104%clean
105rm -rf $RPM_BUILD_ROOT
106
107%if %{with python2}
108%files
109%defattr(644,root,root,755)
4865d893 110%doc CHANGES.txt LICENSE README.rst
ba95afaf
JB
111%attr(755,root,root) %{_bindir}/pycodestyle
112%attr(755,root,root) %{_bindir}/pycodestyle-2
113%{py_sitescriptdir}/pycodestyle.py[co]
ba95afaf
JB
114%{py_sitescriptdir}/pycodestyle-%{version}-py*.egg-info
115%endif
ba95afaf
JB
116
117%if %{with python3}
118%files -n python3-pycodestyle
119%defattr(644,root,root,755)
4865d893 120%doc CHANGES.txt LICENSE README.rst
ba95afaf
JB
121%attr(755,root,root) %{_bindir}/pycodestyle-3
122%{py3_sitescriptdir}/pycodestyle.py
123%{py3_sitescriptdir}/__pycache__/pycodestyle.cpython-*.py[co]
124%{py3_sitescriptdir}/pycodestyle-%{version}-py*.egg-info
125%endif
126
127%if %{with doc}
128%files apidocs
129%defattr(644,root,root,755)
130%doc docs/_build/html/{_modules,_static,*.html,*.js}
131%endif
This page took 0.137274 seconds and 4 git commands to generate.