[packages/python-sure] - updated to 2.0.0
qboosh
qboosh at pld-linux.org
Thu Apr 28 16:57:59 CEST 2022
commit fa519a19a4b1cb5661500276c31758b505f2eed9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Apr 28 16:58:18 2022 +0200
- updated to 2.0.0
python-sure-mock.patch | 14 +++++++-------
python-sure.spec | 17 ++++++++++++-----
2 files changed, 19 insertions(+), 12 deletions(-)
---
diff --git a/python-sure.spec b/python-sure.spec
index 3cf8922..e60944f 100644
--- a/python-sure.spec
+++ b/python-sure.spec
@@ -1,3 +1,4 @@
+# NOTE: sure.cli and sure.stubs are python3-only
#
# Conditional build:
%bcond_without tests # unit tests
@@ -8,13 +9,13 @@
Summary: Utility belt for automated testing in Python for Python
Summary(pl.UTF-8): Narzędzia do automatycznego testowania w Pythonie
Name: python-%{module}
-Version: 1.4.11
-Release: 4
+Version: 2.0.0
+Release: 1
License: GPL v3+
Group: Libraries/Python
#Source0Download; https://pypi.org/simple/sure/
Source0: https://files.pythonhosted.org/packages/source/s/sure/%{module}-%{version}.tar.gz
-# Source0-md5: 51f28b4ea7a6f59d1dd09f8eaaeabee7
+# Source0-md5: 2944861acf83042a291ffb1190a56292
Patch0: %{name}-mock.patch
URL: https://github.com/gabrielfalcao/sure
%if %{with python2}
@@ -22,13 +23,13 @@ BuildRequires: python-devel >= 1:2.7
BuildRequires: python-mock >= 2.0.0
BuildRequires: python-nose
BuildRequires: python-setuptools
-BuildRequires: python-six >= 1.10.0
+BuildRequires: python-six >= 1.16.0
%endif
%if %{with python3}
BuildRequires: python3-devel >= 1:3.4
BuildRequires: python3-nose
BuildRequires: python3-setuptools
-BuildRequires: python3-six >= 1.10.0
+BuildRequires: python3-six >= 1.16.0
%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
@@ -77,11 +78,16 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python2}
%py_install
+# sure.cli is python3-only (uses f"..." syntax), so this entry point is invalid
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/sure
+
%py_postclean
%endif
%if %{with python3}
%py3_install
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/sure{,-3}
%endif
%clean
@@ -99,6 +105,7 @@ rm -rf $RPM_BUILD_ROOT
%files -n python3-%{module}
%defattr(644,root,root,755)
%doc README.rst
+%attr(755,root,root) %{_bindir}/sure-3
%{py3_sitescriptdir}/sure
%{py3_sitescriptdir}/sure-%{version}-py*.egg-info
%endif
diff --git a/python-sure-mock.patch b/python-sure-mock.patch
index cf6a260..71160ce 100644
--- a/python-sure-mock.patch
+++ b/python-sure-mock.patch
@@ -1,13 +1,13 @@
---- sure-1.4.11/setup.py.orig 2018-05-16 23:37:56.000000000 +0200
-+++ sure-1.4.11/setup.py 2020-06-06 07:54:38.467908573 +0200
-@@ -58,7 +58,7 @@
+--- sure-2.0.0/setup.py.orig 2018-05-16 23:37:56.000000000 +0200
++++ sure-2.0.0/setup.py 2020-06-06 07:54:38.467908573 +0200
+@@ -81,7 +81,7 @@
return __doc__
--install_requires = ['mock', 'six']
-+install_requires = ['mock;python_version<"3"', 'six']
- tests_require = ['nose']
-
+-install_requires = ["mock", "six"]
++install_requires = ['mock;python_version<"3"', "six"]
+ tests_require = ["nose"]
+ version = read_version()
--- sure-1.4.11/sure/core.py.orig 2018-03-17 23:31:48.000000000 +0100
+++ sure-1.4.11/sure/core.py 2020-06-06 07:56:27.183986275 +0200
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-sure.git/commitdiff/fa519a19a4b1cb5661500276c31758b505f2eed9
More information about the pld-cvs-commit
mailing list