[python-pep8] update to 1.4.5, introduce python3 package
Matthias Runge
mrunge at fedoraproject.org
Fri Jun 14 10:50:42 UTC 2013
commit e0eb42a31841aeaacd29eceaf25d47a18ecc387f
Author: Matthias Runge <mrunge at redhat.com>
Date: Fri Jun 14 12:50:15 2013 +0200
update to 1.4.5, introduce python3 package
.gitignore | 1 +
python-pep8.spec | 67 +++++++++++++++++++++++++++++++++++++++++++++++++-----
sources | 2 +-
3 files changed, 63 insertions(+), 7 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index d81f2a8..ab678c3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ jcrocholl-pep8-29968a6.tar.gz
/pep8-1.4.1.tar.gz
/pep8-1.4.2.tar.gz
/pep8-1.4.4.tar.gz
+/pep8-1.4.5.tar.gz
diff --git a/python-pep8.spec b/python-pep8.spec
index 9f8a7e5..87910f3 100644
--- a/python-pep8.spec
+++ b/python-pep8.spec
@@ -1,9 +1,15 @@
+%if 0%{?fedora} > 12 || 0%{?rhel} > 6
+%bcond_without python3
+%else
+%bcond_with python3
+%endif
+
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%global module_name pep8
Name: python-%{module_name}
-Version: 1.4.4
+Version: 1.4.5
Release: 1%{?dist}
Summary: Python style guide checker
@@ -26,39 +32,88 @@ pep8 is a tool to check your Python code against some of the style conventions
in PEP 8. It has a plugin architecture, making new checks easy, and its output
is parseable, making it easy to jump to an error location in your editor.
+%if %{with python3}
+%package -n python3-pep8
+Summary: Python style guide checker
+
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-sphinx
+
+%description -n python3-pep8
+pep8 is a tool to check your Python code against some of the style
+conventions in PEP 8. It has a plugin architecture, making new checks
+easy, and its output is parseable, making it easy to jump to an error
+location in your editor.
+
+This is a version for Python 3.
+
+%endif
+
%prep
%setup -qn %{module_name}-%{version}
# Remove #! from pep8.py
sed --in-place "s:#!\s*/usr.*::" pep8.py
+%if %{with python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif
+
%build
%{__python} setup.py build build_sphinx
+%if %{with python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif
%install
rm -rf %{buildroot}
-python setup.py install -O1 --skip-build --root %{buildroot}
+%if %{with python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+popd
+%endif
-
-%clean
-rm -rf %{buildroot}
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+
%check
python pep8.py --testsuite testsuite
python pep8.py --doctest
+%if %{with python3}
+pushd %{py3dir}
+PYTHONPATH="%{buildroot}%{python3_sitelib}:$PYTHONPATH" %{__python3} pep8.py --testsuite testsuite
+popd
+%endif
+
%files
%defattr(-,root,root,-)
%doc CHANGES.txt README.rst build/sphinx/html/*
%{_bindir}/pep8
-%{python_sitelib}/*
+%{python_sitelib}/%{module_name}.py*
+%{python_sitelib}/%{module_name}-%{version}-*.egg-info
+%if %{with python3}
+%files -n python3-pep8
+%doc README.rst CHANGES.txt build/sphinx/html/*
+%{python3_sitelib}/%{module_name}.py*
+%{python3_sitelib}/%{module_name}-%{version}-*.egg-info/
+%{python3_sitelib}/__pycache__/%{module_name}*
+%endif
%changelog
+* Fri Jun 14 2013 Matthias Runge <mrunge at redhat.com> - 1.4.5-1
+- update to 1.4.5 (rhbz#918924)
+- introduce py3 package (rhbz#971941)
+
* Tue Feb 26 2013 Ian Weller <iweller at redhat.com> - 1.4.4-1
- Update to 1.4.4
diff --git a/sources b/sources
index b95bb8c..9e6835b 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-c48dc736e09f4f76362572c4e8b55be3 pep8-1.4.4.tar.gz
+055dbd22ac5669232fdba752612e9686 pep8-1.4.5.tar.gz
More information about the scm-commits
mailing list