From: Arkadiusz Miƛkiewicz Date: Thu, 27 Nov 2014 21:29:19 +0000 (+0100) Subject: - up to 1.5.7; python3 subpackage X-Git-Tag: auto/th/python-pep8-1.5.7-1~1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=77358bd037b9a68706721c6f5303f4e67485edac;p=packages%2Fpython-pep8.git - up to 1.5.7; python3 subpackage --- diff --git a/python-pep8.spec b/python-pep8.spec index 3be8c1f..c8553ef 100644 --- a/python-pep8.spec +++ b/python-pep8.spec @@ -2,22 +2,30 @@ # Conditional build: %bcond_with tests # do not perform "make test" %bcond_without doc # Build API documentation +%bcond_without python2 # CPython 2.x module +%bcond_without python3 # CPython 3.x module %define module pep8 Summary: Python style guide checker Name: python-%{module} -Version: 1.4.6 +Version: 1.5.7 Release: 1 License: MIT Group: Libraries/Python Source0: https://pypi.python.org/packages/source/p/pep8/%{module}-%{version}.tar.gz -# Source0-md5: a03bb494859e87b42601b61b1b043a0c +# Source0-md5: f6adbdd69365ecca20513c709f9b7c93 URL: https://pypi.python.org/pypi/pep8 BuildRequires: rpm-pythonprov BuildRequires: rpmbuild(macros) >= 1.219 +%if %{with python2} BuildRequires: python-Sphinx BuildRequires: python-distribute Requires: python-modules +%endif +%if %{with python3} +BuildRequires: python3-Sphinx +BuildRequires: python3-distribute +%endif BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -25,6 +33,15 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) pep8 is a tool to check your Python code against some of the style conventions in PEP 8. +%package -n python3-%{module} +Summary: Python style guide checker +Group: Libraries/Python +Requires: python3-modules + +%description -n python3-%{module} +pep8 is a tool to check your Python code against some of the style +conventions in PEP 8. + %package apidocs Summary: %{module} API documentation Summary(pl.UTF-8): Dokumentacja API %{module} @@ -40,7 +57,13 @@ Dokumentacja API %{module}. %setup -q -n %{module}-%{version} %build +%if %{with python2} %{__python} setup.py build --build-base build-2 %{?with_tests:test} +%endif + +%if %{with python3} +%{__python3} setup.py build --build-base build-3 %{?with_tests:test} +%endif %if %{with doc} cd docs @@ -51,17 +74,28 @@ rm -rf _build/html/_sources %install rm -rf $RPM_BUILD_ROOT +%if %{with python2} %{__python} setup.py \ - build --build-base build-2 \ - install --skip-build \ - --optimize=2 \ - --root=$RPM_BUILD_ROOT + build --build-base build-2 \ + install --skip-build \ + --optimize=2 \ + --root=$RPM_BUILD_ROOT %py_postclean +%endif + +%if %{with python3} +%{__python3} setup.py \ + build --build-base build-3 \ + install --skip-build \ + --optimize=2 \ + --root=$RPM_BUILD_ROOT +%endif %clean rm -rf $RPM_BUILD_ROOT +%if %{with python2} %files %defattr(644,root,root,755) %doc CHANGES.txt README.rst @@ -70,6 +104,16 @@ rm -rf $RPM_BUILD_ROOT %if "%{py_ver}" > "2.4" %{py_sitescriptdir}/pep8-*.egg-info %endif +%endif + +%if %{with python3} +%files -n python3-%{module} +%defattr(644,root,root,755) +%doc CHANGES.txt README.rst +%{py3_sitescriptdir}/%{module}.py +%{py3_sitescriptdir}/__pycache__/%{module}.cpython-*.py[co] +%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info +%endif %if %{with doc} %files apidocs