#8 Remove never-used downstream-only code
Closed 2 years ago by torsava. Opened 2 years ago by torsava.
rpms/ torsava/python-rpm-generators master  into  master

file modified
@@ -128,10 +128,6 @@ 

                  warn("Version for {!r} has not been found".format(dist), RuntimeWarning)



-         # XXX: https://github.com/pypa/setuptools/pull/1275

-         import platform

-         platform.python_version = lambda: dist.py_version


          # This is the PEP 503 normalized name.

          # It does also convert dots to dashes, unlike dist.key.

          # In the current code, we only add additional provides with this.

It's not used anywhere in the code and the PR on setuptools was closed without merge.

rebased onto f2c10dc

2 years ago

Hm, maybe it is used in some under-the-hood way...

This is used unless we switched away from using platform module to something else for dependency parsing.

I mean from pkg_resources.

Yeah, just dug into pkg_resources and they're importing platform. So we're basically overriding the function of platform that will be used pkg_resources. Makes sense. Closing PR. We can get rid of this when we switch to using importlib_metadata.

Pull-Request has been closed by torsava

2 years ago