[bumpversion]
-current_version = 50.0.0
+current_version = 50.0.1
commit = True
tag = True
+v50.0.1
+-------
+
+* #2357: Restored Python 3.5 support in distutils.util for missing `subprocess._optim_args_from_interpreter_flags`.
+* #2358: Restored AIX support on Python 3.8 and earlier.
+* #2361: Add Python 3.10 support to _distutils_hack. Get the 'Loader' abstract class
+ from importlib.abc rather than importlib.util.abc (alias removed in Python
+ 3.10).
+
+
v50.0.0
-------
return method()
def spec_for_distutils(self):
+ import importlib.abc
import importlib.util
- class DistutilsLoader(importlib.util.abc.Loader):
+ class DistutilsLoader(importlib.abc.Loader):
def create_module(self, spec):
return importlib.import_module('._distutils', 'setuptools')
[metadata]
name = setuptools
-version = 50.0.0
+version = 50.0.1
description = Easily download, build, install, upgrade, and uninstall Python packages
author = Python Packaging Authority
author_email = distutils-sig@python.org
--- /dev/null
+import sys
+import subprocess
+
+
+def __optim_args_from_interpreter_flags():
+ """Return a list of command-line arguments reproducing the current
+ optimization settings in sys.flags."""
+ args = []
+ value = sys.flags.optimize
+ if value > 0:
+ args.append("-" + "O" * value)
+ return args
+
+
+_optim_args_from_interpreter_flags = getattr(
+ subprocess,
+ "_optim_args_from_interpreter_flags",
+ __optim_args_from_interpreter_flags,
+)
--- /dev/null
+def aix_platform(osname, version, release):
+ try:
+ import _aix_support
+ return _aix_support.aix_platform()
+ except ImportError:
+ pass
+ return "%s-%s.%s" % (osname, version, release)
# flake8: noqa
import contextlib
+import builtins
+
+ModuleNotFoundError = getattr(builtins, 'ModuleNotFoundError', ImportError)
try:
from test.support.warnings_helper import check_warnings
from distutils.spawn import spawn
from distutils import log
from distutils.errors import DistutilsByteCompileError
+from .py35compat import _optim_args_from_interpreter_flags
+
def get_host_platform():
"""Return a string that identifies the current platform. This is used mainly to
machine += ".%s" % bitness[sys.maxsize]
# fall through to standard osname-release-machine representation
elif osname[:3] == "aix":
- from _aix_support import aix_platform
- return aix_platform()
+ from .py38compat import aix_platform
+ return aix_platform(osname, version, release)
elif osname[:6] == "cygwin":
osname = "cygwin"
rel_re = re.compile (r'[\d.]+', re.ASCII)
""" % (optimize, force, prefix, base_dir, verbose))
cmd = [sys.executable]
- cmd.extend(subprocess._optim_args_from_interpreter_flags())
+ cmd.extend(_optim_args_from_interpreter_flags())
cmd.append(script_name)
spawn(cmd, dry_run=dry_run)
execute(os.remove, (script_name,), "removing %s" % script_name,
wheel
twine[keyring]>=1.13
path
+ jaraco.develop>=7.1
jaraco.tidelift
passenv =
TWINE_PASSWORD
+ GITHUB_TOKEN
TIDELIFT_TOKEN
setenv =
TWINE_USERNAME = {env:TWINE_USERNAME:__token__}
python -c "import path; path.Path('dist').rmtree_p()"
python setup.py release
python -m twine upload dist/*
+ python -m jaraco.develop.create-github-release
python -m jaraco.tidelift.publish-release-notes