pythondistdeps.py: Adapt Python version marker workaround for setuptools 42+
See https://bugzilla.redhat.com/show_bug.cgi?id=1853597#c11 pkg_resources from setuptools 42+ no longer only use platform.python_version(), but also platform.python_version_tuple() -- this was updated in packaging 19.1+. This fix makes it work again with both new and old setuptools, hopefully for some while.bf069fe9dd
86a443f318
This commit is contained in:
parent
32a1b47f5b
commit
d1a02fdda7
@ -50,6 +50,7 @@ install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} *.py
|
|||||||
* Fri Jul 10 2020 Tomas Orsava <torsava@redhat.com> - 11-9
|
* Fri Jul 10 2020 Tomas Orsava <torsava@redhat.com> - 11-9
|
||||||
- pythondistdeps: Implement provides/requires for extras packages
|
- pythondistdeps: Implement provides/requires for extras packages
|
||||||
- Enable --require-extras-subpackages
|
- Enable --require-extras-subpackages
|
||||||
|
- Adapt Python version marker workaround for setuptools 42+
|
||||||
|
|
||||||
* Fri Jun 26 2020 Miro Hrončok <mhroncok@redhat.com> - 11-8
|
* Fri Jun 26 2020 Miro Hrončok <mhroncok@redhat.com> - 11-8
|
||||||
- Fix python(abi) requires generator, it picked files from almost good directories
|
- Fix python(abi) requires generator, it picked files from almost good directories
|
||||||
|
@ -273,6 +273,7 @@ if __name__ == "__main__":
|
|||||||
# [2] https://github.com/pypa/setuptools/pull/1275
|
# [2] https://github.com/pypa/setuptools/pull/1275
|
||||||
import platform
|
import platform
|
||||||
platform.python_version = lambda: dist.py_version
|
platform.python_version = lambda: dist.py_version
|
||||||
|
platform.python_version_tuple = lambda: tuple(dist.py_version.split('.'))
|
||||||
|
|
||||||
# This is the PEP 503 normalized name.
|
# This is the PEP 503 normalized name.
|
||||||
# It does also convert dots to dashes, unlike dist.key.
|
# It does also convert dots to dashes, unlike dist.key.
|
||||||
|
Loading…
Reference in New Issue
Block a user