From: JinWang An Date: Mon, 27 Mar 2023 08:02:43 +0000 (+0900) Subject: Imported Upstream version 60.5.0 X-Git-Tag: upstream/60.5.0^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b84e819c4c713f354b04c2ab48676c5066f98aa2;p=platform%2Fupstream%2Fpython-setuptools.git Imported Upstream version 60.5.0 --- diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 57c3823..542ed84 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 60.4.0 +current_version = 60.5.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 2f36767..2fee370 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v60.5.0 +------- + + +Changes +^^^^^^^ +* #2990: Set the ``.origin`` attribute of the ``distutils`` module to the module's ``__file__``. + + v60.4.0 ------- diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index 0307734..ab462f9 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -125,7 +125,9 @@ class DistutilsMetaFinder: def exec_module(self, module): pass - return importlib.util.spec_from_loader('distutils', DistutilsLoader()) + return importlib.util.spec_from_loader( + 'distutils', DistutilsLoader(), origin=mod.__file__ + ) def spec_for_pip(self): """ diff --git a/setup.cfg b/setup.cfg index 2095916..e91d8ae 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = setuptools -version = 60.4.0 +version = 60.5.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages diff --git a/setuptools/tests/test_distutils_adoption.py b/setuptools/tests/test_distutils_adoption.py index 7007548..366f292 100644 --- a/setuptools/tests/test_distutils_adoption.py +++ b/setuptools/tests/test_distutils_adoption.py @@ -86,3 +86,10 @@ def test_pip_import(venv): """ cmd = ['python', '-c', 'import pip'] popen_text(venv.run)(cmd) + + +def test_distutils_has_origin(): + """ + Distutils module spec should have an origin. #2990. + """ + assert __import__('distutils').__spec__.origin