[packages/python-hacking] - new; requirements patch to use greater-than instead of strict requirements
qboosh
qboosh at pld-linux.org
Sat Mar 26 06:51:06 CET 2016
commit b6cc28e3e88cf27ee9b5aa1417087c619d091d39
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Mar 26 06:55:21 2016 +0100
- new; requirements patch to use greater-than instead of strict requirements
python-hacking-requirements.patch | 16 +++++
python-hacking.spec | 145 ++++++++++++++++++++++++++++++++++++++
2 files changed, 161 insertions(+)
---
diff --git a/python-hacking.spec b/python-hacking.spec
new file mode 100644
index 0000000..bb93fd1
--- /dev/null
+++ b/python-hacking.spec
@@ -0,0 +1,145 @@
+#
+# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+%bcond_without tests # test target
+
+Summary: OpenStack Hacking Guideline enforcement plugins
+Summary(pl.UTF-8): Wtyczki wymuszające OpenStack Hacking Guideline
+Name: python-hacking
+Version: 0.10.2
+Release: 1
+License: Apache v2.0
+Group: Development/Languages/Python
+#Source0Download: https://pypi.python.org/simple/hacking/
+Source0: https://pypi.python.org/packages/source/h/hacking/hacking-%{version}.tar.gz
+# Source0-md5: 1fc57792bfb5e9715d1d4da56ebcc9df
+Patch0: %{name}-requirements.patch
+URL: https://github.com/openstack-dev/hacking
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with python2}
+BuildRequires: python-devel >= 1:2.6
+BuildRequires: python-pbr >= 0.11
+BuildRequires: python-pbr < 2.0
+%if %{with tests}
+BuildRequires: python-Sphinx >= 1.1.2
+BuildRequires: python-coverage >= 3.6
+BuildRequires: python-discover
+BuildRequires: python-eventlet >= 0.16.1
+BuildRequires: python-fixtures >= 0.3.14
+BuildRequires: python-flake8 >= 2.2.4
+BuildRequires: python-mccabe >= 0.2.1
+BuildRequires: python-mock >= 1.0
+BuildRequires: python-oslosphinx >= 2.2.0
+BuildRequires: python-pep8 >= 1.5.7
+BuildRequires: python-pyflakes >= 0.8.1
+BuildRequires: python-six >= 1.7.0
+BuildRequires: python-subunit >= 0.0.18
+BuildRequires: python-testrepository >= 0.0.18
+BuildRequires: python-testscenarios >= 0.4
+BuildRequires: python-testtools >= 0.9.36
+%endif
+%endif
+%if %{with python3}
+BuildRequires: python3-devel >= 1:3.3
+BuildRequires: python3-pbr >= 0.11
+BuildRequires: python3-pbr < 2.0
+%if %{with tests}
+BuildRequires: python3-Sphinx >= 1.1.2
+BuildRequires: python3-eventlet >= 0.16.1
+BuildRequires: python3-fixtures >= 0.3.14
+BuildRequires: python3-flake8 >= 2.2.4
+BuildRequires: python3-mccabe >= 0.2.1
+BuildRequires: python3-pep8 >= 1.5.7
+BuildRequires: python3-pyflakes >= 0.8.1
+BuildRequires: python3-six >= 1.7.0
+BuildRequires: python3-subunit >= 0.0.18
+BuildRequires: python3-testrepository >= 0.0.18
+BuildRequires: python3-testscenarios >= 0.4
+BuildRequires: python3-testtools >= 0.9.36
+%endif
+%endif
+Requires: python-flake8 >= 2.2.4
+Requires: python-mccabe >= 0.2.1
+Requires: python-modules >= 1:2.6
+Requires: python-pep8 >= 1.5.7
+Requires: python-six >= 1.7.0
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+hacking is a set of flake8 plugins that test and enforce the OpenStack
+Style Guidlines <http://docs.openstack.org/developer/hacking>.
+
+%description -l pl.UTF-8
+Moduł hacking to zbiór wtyczek dla narzędzia flake8, testujących i
+wymuszających przestrzeganie wskazówek OpenStack Style Guidlines
+<http://docs.openstack.org/developer/hacking>.
+
+%package -n python3-hacking
+Summary: OpenStack Hacking Guideline enforcement plugins
+Summary(pl.UTF-8): Wtyczki wymuszające OpenStack Hacking Guideline
+Group: Development/Languages/Python
+Requires: python3-flake8 >= 2.2.4
+Requires: python3-mccabe >= 0.2.1
+Requires: python3-modules >= 1:3.2
+Requires: python3-pep8 >= 1.5.7
+Requires: python3-six >= 1.7.0
+
+%description -n python3-hacking
+hacking is a set of flake8 plugins that test and enforce the OpenStack
+Style Guidlines <http://docs.openstack.org/developer/hacking>.
+
+%description -n python3-hacking -l pl.UTF-8
+Moduł hacking to zbiór wtyczek dla narzędzia flake8, testujących i
+wymuszających przestrzeganie wskazówek OpenStack Style Guidlines
+<http://docs.openstack.org/developer/hacking>.
+
+%prep
+%setup -q -n hacking-%{version}
+%patch0 -p1
+
+%build
+%if %{with python2}
+%py_build %{?with_tests:test}
+
+%{?with_tests:%{__rm} -r .testrepository}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+
+%{?with_tests:%{__rm} -r .testrepository}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog README.rst
+%{py_sitescriptdir}/hacking
+%{py_sitescriptdir}/hacking-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-hacking
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog README.rst
+%{py3_sitescriptdir}/hacking
+%{py3_sitescriptdir}/hacking-%{version}-py*.egg-info
+%endif
diff --git a/python-hacking-requirements.patch b/python-hacking-requirements.patch
new file mode 100644
index 0000000..ef3cee6
--- /dev/null
+++ b/python-hacking-requirements.patch
@@ -0,0 +1,16 @@
+--- hacking-0.10.2/requirements.txt.orig 2015-05-19 02:49:13.000000000 +0200
++++ hacking-0.10.2/requirements.txt 2016-03-25 21:59:14.993490596 +0100
+@@ -3,9 +3,9 @@
+ # process, which may cause wedges in the gate later.
+ pbr>=0.11,<2.0
+
+-pep8==1.5.7
+-pyflakes==0.8.1
+-flake8==2.2.4
+-mccabe==0.2.1 # MIT License
++pep8>=1.5.7
++pyflakes>=0.8.1
++flake8>=2.2.4
++mccabe>=0.2.1 # MIT License
+
+ six>=1.7.0
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-hacking.git/commitdiff/b6cc28e3e88cf27ee9b5aa1417087c619d091d39
More information about the pld-cvs-commit
mailing list