[bumpversion]
-current_version = 49.1.2
+current_version = 49.1.3
commit = True
tag = True
--- /dev/null
+---
+name: Bug Report or Feature Request
+about: Report a bug or request a feature
+---
- <<: *latest_py3
env: LANG=C
- python: 3.8-dev
+ - python: 3.9-dev
- <<: *latest_py3
env: TOXENV=docs
allow_failures:
+v49.1.3
+-------
+
+* #2212: (Distutils) Allow spawn to accept environment. Avoid monkey-patching global state.
+* #2249: Fix extension loading technique in stubs.
+
+
v49.1.2
-------
[metadata]
name = setuptools
-version = 49.1.2
+version = 49.1.3
description = Easily download, build, install, upgrade, and uninstall Python packages
author = Python Packaging Authority
author_email = distutils-sig@python.org
log.debug("skipping %s (up-to-date)", output_filename)
def spawn(self, cmd):
- old_path = os.getenv('path')
- try:
- os.environ['path'] = self._paths
- return super().spawn(cmd)
- finally:
- os.environ['path'] = old_path
+ env = dict(os.environ, path=self._paths)
+ return super().spawn(cmd, env=env)
# -- Miscellaneous methods -----------------------------------------
# These are all used by the 'gen_lib_options() function, in
_cfg_target_split = None
-def spawn(cmd, search_path=1, verbose=0, dry_run=0):
+def spawn(cmd, search_path=1, verbose=0, dry_run=0, env=None):
"""Run another program, specified as a command list 'cmd', in a new process.
'cmd' is just the argument list for the new process, ie.
if executable is not None:
cmd[0] = executable
- env = None
+ env = env if env is not None else dict(os.environ)
+
if sys.platform == 'darwin':
global _cfg_target, _cfg_target_split
if _cfg_target is None:
'now "%s" but "%s" during configure'
% (cur_target, _cfg_target))
raise DistutilsPlatformError(my_msg)
- env = dict(os.environ,
- MACOSX_DEPLOYMENT_TARGET=cur_target)
+ env.update(MACOSX_DEPLOYMENT_TARGET=cur_target)
try:
proc = subprocess.Popen(cmd, env=env)
from importlib.machinery import ExtensionFileLoader
__file__ = pkg_resources.resource_filename(__name__, %r)
__loader__ = None; del __bootstrap__, __loader__
- ExtensionFileLoader(__name__,__file__).exec_module()
+ ExtensionFileLoader(__name__,__file__).load_module()
__bootstrap__()
""").lstrip()
with open(pyfile, 'w') as f:
" os.chdir(os.path.dirname(__file__))",
if_dl(" sys.setdlopenflags(dl.RTLD_NOW)"),
" ExtensionFileLoader(__name__,",
- " __file__).exec_module()",
+ " __file__).load_module()",
" finally:",
if_dl(" sys.setdlopenflags(old_flags)"),
" os.chdir(old_dir)",