diff --git a/python-rpm-generators.spec b/python-rpm-generators.spec index 0391177..33196c7 100644 --- a/python-rpm-generators.spec +++ b/python-rpm-generators.spec @@ -47,6 +47,7 @@ install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} pythondeps.sh pythondistdeps.py %changelog * Sun Feb 11 2018 Igor Gnatenko - 5-1 - Fork upstream generators +- "Fix" support of environment markers * Fri Feb 09 2018 Fedora Release Engineering - 4.14.0-2.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/pythondistdeps.py b/pythondistdeps.py index 36590ba..a15ccba 100755 --- a/pythondistdeps.py +++ b/pythondistdeps.py @@ -122,6 +122,11 @@ for f in files: else: warn("Version for {!r} has not been found".format(dist), RuntimeWarning) continue + + # XXX: https://github.com/pypa/setuptools/pull/1275 + import platform + platform.python_version = lambda: dist.py_version + if Provides_PyMajorVer_Variant or PyMajorVer_Deps or legacy_Provides or legacy: # Get the Python major version pyver_major = dist.py_version.split('.')[0]