]> git.pld-linux.org Git - packages/python-pep8.git/blame - python-pep8.spec
- release 4 (by relup.sh)
[packages/python-pep8.git] / python-pep8.spec
CommitLineData
997ac732
JR
1#
2# Conditional build:
c4e8be5f 3%bcond_without tests # test target
997ac732 4%bcond_without doc # Build API documentation
719f753b
ER
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
997ac732
JR
7
8%define module pep8
9Summary: Python style guide checker
6ee2147d 10Summary(pl.UTF-8): Sprawdzanie zgodności z poradnikiem stylu kodowania w Pythonie
997ac732 11Name: python-%{module}
1516623f 12Version: 1.7.1
bc9f4773 13Release: 4
997ac732
JR
14License: MIT
15Group: Libraries/Python
1516623f
JB
16#Source0Download: https://pypi.org/simple/pep8/
17Source0: https://files.pythonhosted.org/packages/source/p/pep8/%{module}-%{version}.tar.gz
18# Source0-md5: 603821d06db945c71d811b5a8d78423c
95031b57
JB
19Patch0: %{name}-nestedset.patch
20Patch1: %{name}-tokenize.patch
1516623f 21URL: https://pypi.org/project/pep8/
997ac732 22BuildRequires: rpm-pythonprov
1516623f 23BuildRequires: rpmbuild(macros) >= 1.714
77358bd0 24%if %{with python2}
6ee2147d 25BuildRequires: python-setuptools
77358bd0
AM
26%endif
27%if %{with python3}
6ee2147d 28BuildRequires: python3-setuptools
77358bd0 29%endif
6ee2147d 30%{?with_doc:BuildRequires: sphinx-pdg}
719f753b 31Requires: python-modules
997ac732
JR
32BuildArch: noarch
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36pep8 is a tool to check your Python code against some of the style
37conventions in PEP 8.
38
95031b57
JB
39Note: it's deprecated in favour on pycodestyle.
40
6ee2147d
JB
41%description -l pl.UTF-8
42pep8 to narzędzie do sprawdzania kodu w Pythonie względem niektórych
43konwencji stylistycznych opisanych w PEP 8.
44
95031b57
JB
45Uwaga: to narzędzie jest przestarzałe, nowszą wersją jest pycodestyle.
46
77358bd0
AM
47%package -n python3-%{module}
48Summary: Python style guide checker
6ee2147d 49Summary(pl.UTF-8): Sprawdzanie zgodności z poradnikiem stylu kodowania w Pythonie
77358bd0
AM
50Group: Libraries/Python
51Requires: python3-modules
52
53%description -n python3-%{module}
54pep8 is a tool to check your Python code against some of the style
55conventions in PEP 8.
56
95031b57
JB
57Note: it's deprecated in favour on pycodestyle.
58
6ee2147d
JB
59%description -n python3-%{module} -l pl.UTF-8
60pep8 to narzędzie do sprawdzania kodu w Pythonie względem niektórych
61konwencji stylistycznych opisanych w PEP 8.
62
95031b57
JB
63Uwaga: to narzędzie jest przestarzałe, nowszą wersją jest pycodestyle.
64
997ac732 65%package apidocs
6ee2147d
JB
66Summary: API documentation for pep8 module
67Summary(pl.UTF-8): Dokumentacja API modułu pep8
997ac732
JR
68Group: Documentation
69
70%description apidocs
6ee2147d 71API documentation for pep8 module.
997ac732
JR
72
73%description apidocs -l pl.UTF-8
6ee2147d 74Dokumentacja API modułu pep8.
997ac732
JR
75
76%prep
77%setup -q -n %{module}-%{version}
95031b57
JB
78%patch0 -p1
79%patch1 -p1
997ac732
JR
80
81%build
1516623f
JB
82# pep8 issues deprecance warning, which causes some tests to fail
83export PYTHONWARNINGS=ignore
84
77358bd0 85%if %{with python2}
95031b57
JB
86%py_build
87
88%if %{with tests}
89%{__python} -m testsuite.test_all
90%endif
77358bd0
AM
91%endif
92
93%if %{with python3}
95031b57
JB
94%py3_build
95
96%if %{with tests}
97%{__python3} -m testsuite.test_all
98%endif
77358bd0 99%endif
997ac732
JR
100
101%if %{with doc}
1516623f 102%{__make} -C docs -j1 html
997ac732
JR
103%endif
104
105%install
106rm -rf $RPM_BUILD_ROOT
77358bd0 107%if %{with python2}
a00fb222 108%py_install
997ac732 109
c4e8be5f 110%{__mv} $RPM_BUILD_ROOT%{_bindir}/pep8{,-2}
997ac732 111%py_postclean
77358bd0
AM
112%endif
113
114%if %{with python3}
a00fb222 115%py3_install
c4e8be5f
JB
116%{__mv} $RPM_BUILD_ROOT%{_bindir}/pep8{,-3}
117%endif
118
119%if %{with python2}
120ln -s pep8-2 $RPM_BUILD_ROOT%{_bindir}/pep8
77358bd0 121%endif
997ac732
JR
122
123%clean
124rm -rf $RPM_BUILD_ROOT
125
77358bd0 126%if %{with python2}
997ac732
JR
127%files
128%defattr(644,root,root,755)
129%doc CHANGES.txt README.rst
130%attr(755,root,root) %{_bindir}/pep8
c4e8be5f 131%attr(755,root,root) %{_bindir}/pep8-2
6ee2147d 132%{py_sitescriptdir}/pep8.py[co]
997ac732 133%if "%{py_ver}" > "2.4"
6ee2147d 134%{py_sitescriptdir}/pep8-%{version}-py*.egg-info
997ac732 135%endif
77358bd0
AM
136%endif
137
138%if %{with python3}
139%files -n python3-%{module}
140%defattr(644,root,root,755)
141%doc CHANGES.txt README.rst
c4e8be5f 142%attr(755,root,root) %{_bindir}/pep8-3
6ee2147d
JB
143%{py3_sitescriptdir}/pep8.py
144%{py3_sitescriptdir}/__pycache__/pep8.cpython-*.py[co]
145%{py3_sitescriptdir}/pep8-%{version}-py*.egg-info
77358bd0 146%endif
997ac732
JR
147
148%if %{with doc}
149%files apidocs
150%defattr(644,root,root,755)
1516623f 151%doc docs/_build/html/{_modules,_static,*.html,*.js}
997ac732 152%endif
This page took 0.114891 seconds and 4 git commands to generate.