]> git.pld-linux.org Git - packages/python-pep8.git/blame - python-pep8.spec
restore tabs
[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
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
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
77358bd0
AM
23%endif
24%if %{with python3}
25BuildRequires: python3-Sphinx
26BuildRequires: python3-distribute
27%endif
719f753b 28Requires: python-modules
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
77358bd0 76%if %{with python2}
997ac732 77%{__python} setup.py \
719f753b
ER
78 build --build-base build-2 \
79 install --skip-build \
80 --optimize=2 \
81 --root=$RPM_BUILD_ROOT
997ac732
JR
82
83%py_postclean
77358bd0
AM
84%endif
85
86%if %{with python3}
87%{__python3} setup.py \
719f753b
ER
88 build --build-base build-3 \
89 install --skip-build \
90 --optimize=2 \
91 --root=$RPM_BUILD_ROOT
77358bd0 92%endif
997ac732
JR
93
94%clean
95rm -rf $RPM_BUILD_ROOT
96
77358bd0 97%if %{with python2}
997ac732
JR
98%files
99%defattr(644,root,root,755)
100%doc CHANGES.txt README.rst
101%attr(755,root,root) %{_bindir}/pep8
102%{py_sitescriptdir}/*.py[co]
103%if "%{py_ver}" > "2.4"
104%{py_sitescriptdir}/pep8-*.egg-info
105%endif
77358bd0
AM
106%endif
107
108%if %{with python3}
109%files -n python3-%{module}
110%defattr(644,root,root,755)
111%doc CHANGES.txt README.rst
112%{py3_sitescriptdir}/%{module}.py
113%{py3_sitescriptdir}/__pycache__/%{module}.cpython-*.py[co]
114%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
115%endif
997ac732
JR
116
117%if %{with doc}
118%files apidocs
119%defattr(644,root,root,755)
120%doc docs/_build/html/*
121%endif
This page took 0.240814 seconds and 4 git commands to generate.