[packages/python-hacking] - updated to 2.0.0

qboosh qboosh at pld-linux.org
Sat Feb 24 10:34:22 CET 2024


commit 1d894b3b9a683b844467b28c9024f644ff7be922
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Feb 24 09:25:25 2024 +0100

    - updated to 2.0.0

 python-hacking-requirements.patch |  16 -----
 python-hacking.spec               | 126 +++++++++++++++++++++-----------------
 2 files changed, 70 insertions(+), 72 deletions(-)
---
diff --git a/python-hacking.spec b/python-hacking.spec
index deddb37..1b77cb7 100644
--- a/python-hacking.spec
+++ b/python-hacking.spec
@@ -2,66 +2,63 @@
 # Conditional build:
 %bcond_without	python2	# CPython 2.x module
 %bcond_without	python3	# CPython 3.x module
-%bcond_with	tests	# test target (broken)
+%bcond_without	doc	# Sphinx documentation
+%bcond_with	tests	# unit tests (failing; require already installed package?)
 
 Summary:	OpenStack Hacking Guideline enforcement plugins
 Summary(pl.UTF-8):	Wtyczki wymuszające OpenStack Hacking Guideline
 Name:		python-hacking
-Version:	0.10.3
-Release:	8
+# keep 2.x here for python2 support
+Version:	2.0.0
+Release:	1
 License:	Apache v2.0
 Group:		Development/Languages/Python
-Source0:	https://github.com/openstack-dev/hacking/archive/%{version}/hacking-%{version}.tar.gz
-# Source0-md5:	1a3881ee56e7fa20b2ed019a84738168
-Patch0:		%{name}-requirements.patch
+Source0:	https://files.pythonhosted.org/packages/source/h/hacking/hacking-%{version}.tar.gz
+# Source0-md5:	232e583c3d72805122a91b6788524256
 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-devel >= 1:2.7
+BuildRequires:	python-pbr >= 2.0.0
+BuildRequires:	python-setuptools
 %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-coverage >= 4.0
+BuildRequires:	python-eventlet >= 0.21.0
+BuildRequires:	python-fixtures >= 3.0.0
+BuildRequires:	python-flake8 >= 3.6.0
+BuildRequires:	python-flake8 < 4
+BuildRequires:	python-mock >= 2.0
+BuildRequires:	python-six >= 1.10.0
+BuildRequires:	python-stestr >= 2.0.0
+BuildRequires:	python-subunit >= 1.0.0
 BuildRequires:	python-testscenarios >= 0.4
-BuildRequires:	python-testtools >= 0.9.36
+BuildRequires:	python-testtools >= 2.2.0
 %endif
 %endif
 %if %{with python3}
-BuildRequires:	python3-devel >= 1:3.3
-BuildRequires:	python3-pbr >= 0.11
+BuildRequires:	python3-devel >= 1:3.6
+BuildRequires:	python3-pbr >= 2.0.0
+BuildRequires:	python3-setuptools
 %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-coverage >= 4.0
+BuildRequires:	python3-eventlet >= 0.21.0
+BuildRequires:	python3-fixtures >= 3.0.0
+BuildRequires:	python3-flake8 >= 3.6.0
+BuildRequires:	python3-flake8 < 4
+BuildRequires:	python3-six >= 1.10.0
+BuildRequires:	python3-stestr >= 2.0.0
+BuildRequires:	python3-subunit >= 1.0.0
 BuildRequires:	python3-testscenarios >= 0.4
-BuildRequires:	python3-testtools >= 0.9.36
+BuildRequires:	python3-testtools >= 2.2.0
 %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
+%if %{with doc}
+BuildRequires:	python-openstackdocstheme >= 1.18.1
+BuildRequires:	python-reno >= 2.5.0
+BuildRequires:	sphinx-pdg-2 >= 1.8.0
+%endif
+Requires:	python-modules >= 1:2.7
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -78,11 +75,7 @@ wymuszających przestrzeganie wskazówek OpenStack Style Guidlines
 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
+Requires:	python3-modules >= 1:3.6
 
 %description -n python3-hacking
 hacking is a set of flake8 plugins that test and enforce the OpenStack
@@ -93,29 +86,44 @@ 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 apidocs
+Summary:	API documentation for Python hacking module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona hacking
+Group:		Documentation
+
+%description apidocs
+API documentation for Python hacking module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona hacking.
+
 %prep
 %setup -q -n hacking-%{version}
-%patch0 -p1
 
 %build
-export PBR_VERSION="%{version}"
 %if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
 
-%{?with_tests:%{__rm} -r .testrepository}
+%if %{with tests}
+stestr-2 run
+%endif
 %endif
 
 %if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
+
+%if %{with tests}
+stestr-3 run
+%endif
+%endif
 
-%{?with_tests:%{__rm} -r .testrepository}
+%if %{with doc}
+sphinx-build-2 -b html doc/source doc/build/html
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-export PBR_VERSION="%{version}"
-
 %if %{with python2}
 %py_install
 
@@ -132,7 +140,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc README.rst
+%doc AUTHORS ChangeLog README.rst
 %{py_sitescriptdir}/hacking
 %{py_sitescriptdir}/hacking-%{version}-py*.egg-info
 %endif
@@ -140,7 +148,13 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %files -n python3-hacking
 %defattr(644,root,root,755)
-%doc README.rst
+%doc AUTHORS ChangeLog README.rst
 %{py3_sitescriptdir}/hacking
 %{py3_sitescriptdir}/hacking-%{version}-py*.egg-info
 %endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/build/html/{_static,user,*.html,*.js}
+%endif
diff --git a/python-hacking-requirements.patch b/python-hacking-requirements.patch
deleted file mode 100644
index 2211bfe..0000000
--- a/python-hacking-requirements.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- 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
- 
--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/1d894b3b9a683b844467b28c9024f644ff7be922



More information about the pld-cvs-commit mailing list