From: DongHun Kwak Date: Tue, 29 Dec 2020 22:04:52 +0000 (+0900) Subject: Imported Upstream version 44.1.1 X-Git-Tag: upstream/44.1.1^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea00fdef9b910b6134e58d47ab23c31b232be4b9;p=platform%2Fupstream%2Fpython-setuptools.git Imported Upstream version 44.1.1 --- diff --git a/.bumpversion.cfg b/.bumpversion.cfg index c8c9f54..4bea6cc 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 44.1.0 +current_version = 44.1.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 83cd8c7..43b65eb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v44.1.1 +------- + +* #2158: Avoid loading working set during ``Distribution.finalize_options`` prior to invoking ``_install_setup_requires``, broken since v42.0.0. + + v44.1.0 ------- diff --git a/setup.cfg b/setup.cfg index cb5ae73..323d2cf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ universal = 1 [metadata] name = setuptools -version = 44.1.0 +version = 44.1.1 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org diff --git a/setuptools/__init__.py b/setuptools/__init__.py index a71b2bb..9d8ae1e 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -129,10 +129,27 @@ if PY3: def _install_setup_requires(attrs): # Note: do not use `setuptools.Distribution` directly, as # our PEP 517 backend patch `distutils.core.Distribution`. - dist = distutils.core.Distribution(dict( - (k, v) for k, v in attrs.items() - if k in ('dependency_links', 'setup_requires') - )) + class MinimalDistribution(distutils.core.Distribution): + """ + A minimal version of a distribution for supporting the + fetch_build_eggs interface. + """ + def __init__(self, attrs): + _incl = 'dependency_links', 'setup_requires' + filtered = { + k: attrs[k] + for k in set(_incl) & set(attrs) + } + distutils.core.Distribution.__init__(self, filtered) + + def finalize_options(self): + """ + Disable finalize_options to avoid building the working set. + Ref #2158. + """ + + dist = MinimalDistribution(attrs) + # Honor setup.cfg's options. dist.parse_config_files(ignore_option_errors=True) if dist.setup_requires: