[packages/python-absl] - remove broken version checks, rel 5

baggins baggins at pld-linux.org
Sat Apr 9 10:22:21 CEST 2022


commit eaaa005899826f088dffc8521e0ee9e330a3f7e2
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Apr 9 10:21:54 2022 +0200

    - remove broken version checks, rel 5

 no-version.patch | 37 +++++++++++++++++++++++++++++++++++++
 python-absl.spec |  4 +++-
 2 files changed, 40 insertions(+), 1 deletion(-)
---
diff --git a/python-absl.spec b/python-absl.spec
index f36b6dc..eb135d7 100644
--- a/python-absl.spec
+++ b/python-absl.spec
@@ -7,11 +7,12 @@ Summary:	Abseil Python Common Libraries
 Summary(pl.UTF-8):	Wspólne biblioteki Abseil dla Pythona
 Name:		python-absl
 Version:	0.9.0
-Release:	4
+Release:	5
 License:	Apache v2.0
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/absl-py/
 Source0:	https://files.pythonhosted.org/packages/source/a/absl-py/absl-py-%{version}.tar.gz
+Patch0:		no-version.patch
 # Source0-md5:	4ba3484409252ec502b08f8ef8e48ab4
 URL:		https://github.com/abseil/abseil-py
 %if %{with python2}
@@ -58,6 +59,7 @@ produkcyjnie.
 
 %prep
 %setup -q -n absl-py-%{version}
+%patch0 -p1
 
 %build
 %if %{with python2}
diff --git a/no-version.patch b/no-version.patch
new file mode 100644
index 0000000..f59f2d3
--- /dev/null
+++ b/no-version.patch
@@ -0,0 +1,37 @@
+--- absl-py-0.9.0/setup.py~	2019-12-17 23:46:45.000000000 +0100
++++ absl-py-0.9.0/setup.py	2022-04-09 10:21:04.611211528 +0200
+@@ -29,34 +29,10 @@
+   use_setuptools()
+   import setuptools
+ 
+-py_version = platform.python_version_tuple()
+-if py_version < ('2', '7') or py_version[0] == '3' and py_version < ('3', '4'):
+-  raise RuntimeError('Python version 2.7 or 3.4+ is required.')
+-
+ INSTALL_REQUIRES = [
+     'six',
+ ]
+ 
+-setuptools_version = tuple(
+-    int(x) for x in setuptools.__version__.split('.')[:2])
+-
+-# A variety of environments have very, very old versions of setuptools that
+-# don't support the environment markers ("foo; python_version < X"). Since
+-# we're using sdist, this setup.py gets run directly when installing, so
+-# we can just manually do the dependency checking.
+-# See these for more info:
+-# https://github.com/abseil/abseil-py/issues/79
+-# https://hynek.me/articles/conditional-python-dependencies/
+-# Environment marker support was added in setuptools 36.2, see
+-# https://github.com/pypa/setuptools/blob/master/CHANGES.rst#v3620
+-if setuptools_version < (36, 2):
+-  if sys.version_info[0:2] < (3, 4):
+-    INSTALL_REQUIRES.append('enum34')
+-else:
+-  # Environment markers are the preferred way: it allows correct non-source
+-  # distributions (i.e., wheels) to be generated.
+-  INSTALL_REQUIRES.append("enum34; python_version < '3.4'")
+-
+ _README_PATH = os.path.join(
+     os.path.dirname(os.path.realpath(__file__)), 'README.md')
+ with open(_README_PATH, 'rb') as fp:
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-absl.git/commitdiff/eaaa005899826f088dffc8521e0ee9e330a3f7e2



More information about the pld-cvs-commit mailing list