Imported Upstream version 58.0.2 upstream/58.0.2
authorJinWang An <jinwang.an@samsung.com>
Mon, 27 Mar 2023 08:02:35 +0000 (17:02 +0900)
committerJinWang An <jinwang.an@samsung.com>
Mon, 27 Mar 2023 08:02:35 +0000 (17:02 +0900)
.bumpversion.cfg
CHANGES.rst
setup.cfg
setuptools/dist.py
setuptools/tests/test_build_meta.py
setuptools/tests/test_easy_install.py

index e37af40efc739a6616d9590ec56089e6c08b36f8..2eb9496e8f6268f31794fc5399ac75ec6b7e3007 100644 (file)
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 58.0.1
+current_version = 58.0.2
 commit = True
 tag = True
 
index 27b97f9177f7eda785e6be0c842d837fbea25b83..bf4ec6db075f1ad4182264321093c3ab037abc79 100644 (file)
@@ -1,3 +1,12 @@
+v58.0.2
+-------
+
+
+Misc
+^^^^
+* #2769: Build now fails fast when ``use_2to3`` is supplied.
+
+
 v58.0.1
 -------
 
index 30817c00e61e793c6558f7c8439e345e351158a0..92f8616068abc521608314b613a74f28ff388778 100644 (file)
--- 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
index 02ebd635b8787641cffe023d70a701c09b9e383b..3363495c91b67f099767fb4ed99d63bb5650e657 100644 (file)
@@ -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:
index ab75a1896c637a40697a2c13025d5c0654875fea..0f4a1a7363829bc1723426b34493a3336ac79d45 100644 (file)
@@ -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)
index 4b2bb2b36efc00a78ed49c963a263380ad166f78..6840d03b32529bb0b82f0c7c162d0c5746726c0c 100644 (file)
@@ -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):