From: JinWang An Date: Mon, 27 Mar 2023 08:02:35 +0000 (+0900) Subject: Imported Upstream version 58.0.2 X-Git-Tag: upstream/58.0.2^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69d2339006768bd98109511b1fbc5d2a09d9b9b4;p=platform%2Fupstream%2Fpython-setuptools.git Imported Upstream version 58.0.2 --- diff --git a/.bumpversion.cfg b/.bumpversion.cfg index e37af40..2eb9496 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 58.0.1 +current_version = 58.0.2 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 27b97f9..bf4ec6d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v58.0.2 +------- + + +Misc +^^^^ +* #2769: Build now fails fast when ``use_2to3`` is supplied. + + v58.0.1 ------- diff --git a/setup.cfg b/setup.cfg index 30817c0..92f8616 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [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 @@ -124,6 +124,7 @@ distutils.setup_keywords = 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 diff --git a/setuptools/dist.py b/setuptools/dist.py index 02ebd63..3363495 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -289,6 +289,10 @@ def assert_bool(dist, attr, value): 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: diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index ab75a18..0f4a1a7 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -167,7 +167,7 @@ class TestBuildMetaBackend: 'pyproject.toml': DALS(""" [build-system] requires = ["setuptools", "wheel"] - build-backend = "setuptools.build_meta + build-backend = "setuptools.build_meta" """), } @@ -260,7 +260,7 @@ class TestBuildMetaBackend: 'pyproject.toml': DALS(""" [build-system] requires = ["setuptools", "wheel"] - build-backend = "setuptools.build_meta + build-backend = "setuptools.build_meta" """), } path.build(files) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 4b2bb2b..6840d03 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -16,6 +16,7 @@ import mock import time import re import subprocess +import pathlib import pytest from jaraco import path @@ -669,26 +670,24 @@ class TestSetupRequires: 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):