[bumpversion]
-current_version = 58.0.1
+current_version = 58.0.2
commit = True
tag = True
+v58.0.2
+-------
+
+
+Misc
+^^^^
+* #2769: Build now fails fast when ``use_2to3`` is supplied.
+
+
v58.0.1
-------
[metadata]
name = setuptools
-version = 58.0.1
+version = 58.0.2
author = Python Packaging Authority
author_email = distutils-sig@python.org
description = Easily download, build, install, upgrade, and uninstall Python packages
dependency_links = setuptools.dist:assert_string_list
test_loader = setuptools.dist:check_importable
test_runner = setuptools.dist:check_importable
+ use_2to3 = setuptools.dist:invalid
egg_info.writers =
PKG-INFO = setuptools.command.egg_info:write_pkg_info
requires.txt = setuptools.command.egg_info:write_requirements
raise DistutilsSetupError(tmpl.format(attr=attr, value=value))
+def invalid(dist, attr, value):
+ raise DistutilsSetupError(f"{attr} is invalid.")
+
+
def check_requirements(dist, attr, value):
"""Verify that install_requires is a valid requirements list"""
try:
'pyproject.toml': DALS("""
[build-system]
requires = ["setuptools", "wheel"]
- build-backend = "setuptools.build_meta
+ build-backend = "setuptools.build_meta"
"""),
}
'pyproject.toml': DALS("""
[build-system]
requires = ["setuptools", "wheel"]
- build-backend = "setuptools.build_meta
+ build-backend = "setuptools.build_meta"
"""),
}
path.build(files)
import time
import re
import subprocess
+import pathlib
import pytest
from jaraco import path
def test_setup_requires_with_allow_hosts(self, mock_index):
''' The `allow-hosts` option in not supported anymore. '''
+ files = {
+ 'test_pkg': {
+ 'setup.py': DALS('''
+ from setuptools import setup
+ setup(setup_requires='python-xlib')
+ '''),
+ 'setup.cfg': DALS('''
+ [easy_install]
+ allow_hosts = *
+ '''),
+ }
+ }
with contexts.save_pkg_resources_state():
with contexts.tempdir() as temp_dir:
- test_pkg = os.path.join(temp_dir, 'test_pkg')
- test_setup_py = os.path.join(test_pkg, 'setup.py')
- test_setup_cfg = os.path.join(test_pkg, 'setup.cfg')
- os.mkdir(test_pkg)
- with open(test_setup_py, 'w') as fp:
- fp.write(DALS(
- '''
- from setuptools import setup
- setup(setup_requires='python-xlib')
- '''))
- with open(test_setup_cfg, 'w') as fp:
- fp.write(DALS(
- '''
- [easy_install]
- allow_hosts = *
- '''))
+ path.build(files, prefix=temp_dir)
+ setup_py = str(pathlib.Path(temp_dir, 'test_pkg', 'setup.py'))
with pytest.raises(distutils.errors.DistutilsError):
- run_setup(test_setup_py, [str('--version')])
+ run_setup(setup_py, [str('--version')])
assert len(mock_index.requests) == 0
def test_setup_requires_with_python_requires(self, monkeypatch, tmpdir):