]> git.pld-linux.org Git - packages/python-pep8.git/blame - python-pep8.spec
- up to 1.5.7; python3 subpackage
[packages/python-pep8.git] / python-pep8.spec
CommitLineData
997ac732
JR
1#
2# Conditional build:
3%bcond_with tests # do not perform "make test"
4%bcond_without doc # Build API documentation
77358bd0
AM
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
10Name: python-%{module}
77358bd0 11Version: 1.5.7
997ac732
JR
12Release: 1
13License: MIT
14Group: Libraries/Python
15Source0: https://pypi.python.org/packages/source/p/pep8/%{module}-%{version}.tar.gz
77358bd0 16# Source0-md5: f6adbdd69365ecca20513c709f9b7c93
997ac732
JR
17URL: https://pypi.python.org/pypi/pep8
18BuildRequires: rpm-pythonprov
19BuildRequires: rpmbuild(macros) >= 1.219
77358bd0 20%if %{with python2}
997ac732
JR
21BuildRequires: python-Sphinx
22BuildRequires: python-distribute
23Requires: python-modules
77358bd0
AM
24%endif
25%if %{with python3}
26BuildRequires: python3-Sphinx
27BuildRequires: python3-distribute
28%endif
997ac732
JR
29BuildArch: noarch
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33pep8 is a tool to check your Python code against some of the style
34conventions in PEP 8.
35
77358bd0
AM
36%package -n python3-%{module}
37Summary: Python style guide checker
38Group: Libraries/Python
39Requires: python3-modules
40
41%description -n python3-%{module}
42pep8 is a tool to check your Python code against some of the style
43conventions in PEP 8.
44
997ac732
JR
45%package apidocs
46Summary: %{module} API documentation
47Summary(pl.UTF-8): Dokumentacja API %{module}
48Group: Documentation
49
50%description apidocs
51API documentation for %{module}.
52
53%description apidocs -l pl.UTF-8
54Dokumentacja API %{module}.
55
56%prep
57%setup -q -n %{module}-%{version}
58
59%build
77358bd0 60%if %{with python2}
997ac732 61%{__python} setup.py build --build-base build-2 %{?with_tests:test}
77358bd0
AM
62%endif
63
64%if %{with python3}
65%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
66%endif
997ac732
JR
67
68%if %{with doc}
69cd docs
70%{__make} -j1 html
71rm -rf _build/html/_sources
72%endif
73
74%install
75rm -rf $RPM_BUILD_ROOT
76
77358bd0 77%if %{with python2}
997ac732 78%{__python} setup.py \
77358bd0
AM
79 build --build-base build-2 \
80 install --skip-build \
81 --optimize=2 \
82 --root=$RPM_BUILD_ROOT
997ac732
JR
83
84%py_postclean
77358bd0
AM
85%endif
86
87%if %{with python3}
88%{__python3} setup.py \
89 build --build-base build-3 \
90 install --skip-build \
91 --optimize=2 \
92 --root=$RPM_BUILD_ROOT
93%endif
997ac732
JR
94
95%clean
96rm -rf $RPM_BUILD_ROOT
97
77358bd0 98%if %{with python2}
997ac732
JR
99%files
100%defattr(644,root,root,755)
101%doc CHANGES.txt README.rst
102%attr(755,root,root) %{_bindir}/pep8
103%{py_sitescriptdir}/*.py[co]
104%if "%{py_ver}" > "2.4"
105%{py_sitescriptdir}/pep8-*.egg-info
106%endif
77358bd0
AM
107%endif
108
109%if %{with python3}
110%files -n python3-%{module}
111%defattr(644,root,root,755)
112%doc CHANGES.txt README.rst
113%{py3_sitescriptdir}/%{module}.py
114%{py3_sitescriptdir}/__pycache__/%{module}.cpython-*.py[co]
115%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
116%endif
997ac732
JR
117
118%if %{with doc}
119%files apidocs
120%defattr(644,root,root,755)
121%doc docs/_build/html/*
122%endif
This page took 0.10231 seconds and 4 git commands to generate.