diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index bf2290f3..e09b0918 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -287,8 +287,6 @@ def setup_python( "pip", "install", "--upgrade", - "setuptools", - "wheel", "delocate", *dependency_constraint_flags, env=env, diff --git a/cibuildwheel/resources/constraints-python310.txt b/cibuildwheel/resources/constraints-python310.txt index 34c012bd..939c504a 100644 --- a/cibuildwheel/resources/constraints-python310.txt +++ b/cibuildwheel/resources/constraints-python310.txt @@ -4,6 +4,8 @@ # # nox -s update_constraints-3.10 # +build==1.0.3 + # via -r cibuildwheel/resources/constraints.in delocate==0.10.7 # via -r cibuildwheel/resources/constraints.in distlib==0.3.8 @@ -11,18 +13,22 @@ distlib==0.3.8 filelock==3.13.1 # via virtualenv packaging==23.2 - # via delocate + # via + # build + # delocate platformdirs==4.1.0 # via virtualenv +pyproject-hooks==1.0.0 + # via build +tomli==2.0.1 + # via + # build + # pyproject-hooks typing-extensions==4.9.0 # via delocate virtualenv==20.25.0 # via -r cibuildwheel/resources/constraints.in -wheel==0.42.0 - # via -r cibuildwheel/resources/constraints.in # The following packages are considered to be unsafe in a requirements file: pip==23.3.2 # via -r cibuildwheel/resources/constraints.in -setuptools==69.0.3 - # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python311.txt b/cibuildwheel/resources/constraints-python311.txt index 7d1e1b95..9cd8df10 100644 --- a/cibuildwheel/resources/constraints-python311.txt +++ b/cibuildwheel/resources/constraints-python311.txt @@ -4,6 +4,8 @@ # # nox -s update_constraints-3.11 # +build==1.0.3 + # via -r cibuildwheel/resources/constraints.in delocate==0.10.7 # via -r cibuildwheel/resources/constraints.in distlib==0.3.8 @@ -11,18 +13,18 @@ distlib==0.3.8 filelock==3.13.1 # via virtualenv packaging==23.2 - # via delocate + # via + # build + # delocate platformdirs==4.1.0 # via virtualenv +pyproject-hooks==1.0.0 + # via build typing-extensions==4.9.0 # via delocate virtualenv==20.25.0 # via -r cibuildwheel/resources/constraints.in -wheel==0.42.0 - # via -r cibuildwheel/resources/constraints.in # The following packages are considered to be unsafe in a requirements file: pip==23.3.2 # via -r cibuildwheel/resources/constraints.in -setuptools==69.0.3 - # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python312.txt b/cibuildwheel/resources/constraints-python312.txt index 75813c8c..e2f56276 100644 --- a/cibuildwheel/resources/constraints-python312.txt +++ b/cibuildwheel/resources/constraints-python312.txt @@ -4,6 +4,8 @@ # # nox -s update_constraints-3.12 # +build==1.0.3 + # via -r cibuildwheel/resources/constraints.in delocate==0.10.7 # via -r cibuildwheel/resources/constraints.in distlib==0.3.8 @@ -11,18 +13,18 @@ distlib==0.3.8 filelock==3.13.1 # via virtualenv packaging==23.2 - # via delocate + # via + # build + # delocate platformdirs==4.1.0 # via virtualenv +pyproject-hooks==1.0.0 + # via build typing-extensions==4.9.0 # via delocate virtualenv==20.25.0 # via -r cibuildwheel/resources/constraints.in -wheel==0.42.0 - # via -r cibuildwheel/resources/constraints.in # The following packages are considered to be unsafe in a requirements file: pip==23.3.2 # via -r cibuildwheel/resources/constraints.in -setuptools==69.0.3 - # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python36.txt b/cibuildwheel/resources/constraints-python36.txt index 9e04d743..ff4e8609 100644 --- a/cibuildwheel/resources/constraints-python36.txt +++ b/cibuildwheel/resources/constraints-python36.txt @@ -4,18 +4,33 @@ # # nox -s update_constraints-3.6 # +build==0.9.0 + # via -r cibuildwheel/resources/constraints.in delocate==0.10.2 # via -r cibuildwheel/resources/constraints.in -distlib==0.3.6 +distlib==0.3.8 # via virtualenv filelock==3.4.1 # via virtualenv importlib-metadata==4.8.3 - # via virtualenv + # via + # build + # pep517 + # virtualenv importlib-resources==5.4.0 # via virtualenv +packaging==21.3 + # via build +pep517==0.13.1 + # via build platformdirs==2.4.0 # via virtualenv +pyparsing==3.1.1 + # via packaging +tomli==1.2.3 + # via + # build + # pep517 typing-extensions==4.1.1 # via # delocate @@ -23,16 +38,13 @@ typing-extensions==4.1.1 virtualenv==20.17.1 # via -r cibuildwheel/resources/constraints.in wheel==0.37.1 - # via - # -r cibuildwheel/resources/constraints.in - # delocate + # via delocate zipp==3.6.0 # via # importlib-metadata # importlib-resources + # pep517 # The following packages are considered to be unsafe in a requirements file: pip==21.3.1 # via -r cibuildwheel/resources/constraints.in -setuptools==59.6.0 - # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python37.txt b/cibuildwheel/resources/constraints-python37.txt index 77e85e37..5c2afcbb 100644 --- a/cibuildwheel/resources/constraints-python37.txt +++ b/cibuildwheel/resources/constraints-python37.txt @@ -4,6 +4,8 @@ # # nox -s update_constraints-3.7 # +build==1.0.3 + # via -r cibuildwheel/resources/constraints.in delocate==0.10.7 # via -r cibuildwheel/resources/constraints.in distlib==0.3.8 @@ -11,11 +13,21 @@ distlib==0.3.8 filelock==3.12.2 # via virtualenv importlib-metadata==6.7.0 - # via virtualenv + # via + # build + # virtualenv packaging==23.2 - # via delocate + # via + # build + # delocate platformdirs==4.0.0 # via virtualenv +pyproject-hooks==1.0.0 + # via build +tomli==2.0.1 + # via + # build + # pyproject-hooks typing-extensions==4.7.1 # via # delocate @@ -23,13 +35,9 @@ typing-extensions==4.7.1 # platformdirs virtualenv==20.25.0 # via -r cibuildwheel/resources/constraints.in -wheel==0.42.0 - # via -r cibuildwheel/resources/constraints.in zipp==3.15.0 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: pip==23.3.2 # via -r cibuildwheel/resources/constraints.in -setuptools==68.0.0 - # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python38.txt b/cibuildwheel/resources/constraints-python38.txt index 3dc620a4..de287f30 100644 --- a/cibuildwheel/resources/constraints-python38.txt +++ b/cibuildwheel/resources/constraints-python38.txt @@ -4,25 +4,35 @@ # # nox -s update_constraints-3.8 # +build==1.0.3 + # via -r cibuildwheel/resources/constraints.in delocate==0.10.7 # via -r cibuildwheel/resources/constraints.in distlib==0.3.8 # via virtualenv filelock==3.13.1 # via virtualenv +importlib-metadata==7.0.1 + # via build packaging==23.2 - # via delocate + # via + # build + # delocate platformdirs==4.1.0 # via virtualenv +pyproject-hooks==1.0.0 + # via build +tomli==2.0.1 + # via + # build + # pyproject-hooks typing-extensions==4.9.0 # via delocate virtualenv==20.25.0 # via -r cibuildwheel/resources/constraints.in -wheel==0.42.0 - # via -r cibuildwheel/resources/constraints.in +zipp==3.17.0 + # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: pip==23.3.2 # via -r cibuildwheel/resources/constraints.in -setuptools==69.0.3 - # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python39.txt b/cibuildwheel/resources/constraints-python39.txt index 9c8819ca..e4fddbb1 100644 --- a/cibuildwheel/resources/constraints-python39.txt +++ b/cibuildwheel/resources/constraints-python39.txt @@ -4,25 +4,35 @@ # # nox -s update_constraints-3.9 # +build==1.0.3 + # via -r cibuildwheel/resources/constraints.in delocate==0.10.7 # via -r cibuildwheel/resources/constraints.in distlib==0.3.8 # via virtualenv filelock==3.13.1 # via virtualenv +importlib-metadata==7.0.1 + # via build packaging==23.2 - # via delocate + # via + # build + # delocate platformdirs==4.1.0 # via virtualenv +pyproject-hooks==1.0.0 + # via build +tomli==2.0.1 + # via + # build + # pyproject-hooks typing-extensions==4.9.0 # via delocate virtualenv==20.25.0 # via -r cibuildwheel/resources/constraints.in -wheel==0.42.0 - # via -r cibuildwheel/resources/constraints.in +zipp==3.17.0 + # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: pip==23.3.2 # via -r cibuildwheel/resources/constraints.in -setuptools==69.0.3 - # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints.in b/cibuildwheel/resources/constraints.in index 9753106a..50bfabb6 100644 --- a/cibuildwheel/resources/constraints.in +++ b/cibuildwheel/resources/constraints.in @@ -1,5 +1,4 @@ pip -setuptools -wheel +build delocate virtualenv diff --git a/cibuildwheel/resources/constraints.txt b/cibuildwheel/resources/constraints.txt index 75813c8c..e2f56276 100644 --- a/cibuildwheel/resources/constraints.txt +++ b/cibuildwheel/resources/constraints.txt @@ -4,6 +4,8 @@ # # nox -s update_constraints-3.12 # +build==1.0.3 + # via -r cibuildwheel/resources/constraints.in delocate==0.10.7 # via -r cibuildwheel/resources/constraints.in distlib==0.3.8 @@ -11,18 +13,18 @@ distlib==0.3.8 filelock==3.13.1 # via virtualenv packaging==23.2 - # via delocate + # via + # build + # delocate platformdirs==4.1.0 # via virtualenv +pyproject-hooks==1.0.0 + # via build typing-extensions==4.9.0 # via delocate virtualenv==20.25.0 # via -r cibuildwheel/resources/constraints.in -wheel==0.42.0 - # via -r cibuildwheel/resources/constraints.in # The following packages are considered to be unsafe in a requirements file: pip==23.3.2 # via -r cibuildwheel/resources/constraints.in -setuptools==69.0.3 - # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/windows.py b/cibuildwheel/windows.py index 08bc7733..3cc92f92 100644 --- a/cibuildwheel/windows.py +++ b/cibuildwheel/windows.py @@ -315,17 +315,7 @@ def setup_python( call("pip", "--version", env=env) log.step("Installing build tools...") - if build_frontend == "pip": - call( - "pip", - "install", - "--upgrade", - "setuptools", - "wheel", - *dependency_constraint_flags, - env=env, - ) - elif build_frontend == "build": + if build_frontend == "build": call( "pip", "install", @@ -334,8 +324,6 @@ def setup_python( *dependency_constraint_flags, env=env, ) - else: - assert_never(build_frontend) if python_libs_base: # Set up the environment for various backends to enable cross-compilation diff --git a/noxfile.py b/noxfile.py index 8747b91d..2d44137b 100644 --- a/noxfile.py +++ b/noxfile.py @@ -9,7 +9,7 @@ import nox nox.options.sessions = ["lint", "pylint", "check_manifest", "tests"] -PYTHON_ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] +PYTHON_ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] DIR = Path(__file__).parent.resolve() diff --git a/test/test_dependency_versions.py b/test/test_dependency_versions.py index 90d7660d..5d820fe8 100644 --- a/test/test_dependency_versions.py +++ b/test/test_dependency_versions.py @@ -27,7 +27,9 @@ project_with_expected_version_checks = test_projects.new_c_project( print('Gathered versions', versions) - for package_name in ['pip', 'setuptools', 'wheel']: + packages_to_test = ['pip'] + + for package_name in packages_to_test: env_name = 'EXPECTED_{}_VERSION'.format(package_name.upper()) expected_version = os.environ[env_name] @@ -48,7 +50,7 @@ def get_versions_from_constraint_file(constraint_file): return dict(re.findall(VERSION_REGEX, constraint_file_text)) -@pytest.mark.parametrize("python_version", ["3.6", "3.8", "3.9"]) +@pytest.mark.parametrize("python_version", ["3.6", "3.8", "3.10"]) def test_pinned_versions(tmp_path, python_version, build_frontend_env): if utils.platform == "linux": pytest.skip("linux doesn't pin individual tool versions, it pins manylinux images instead") @@ -70,13 +72,13 @@ def test_pinned_versions(tmp_path, python_version, build_frontend_env): constraint_filename = "constraints-python38.txt" build_pattern = "[cp]p38-*" else: - constraint_filename = "constraints.txt" - build_pattern = "[cp]p39-*" + constraint_filename = "constraints-python310.txt" + build_pattern = "[cp]p310-*" constraint_file = cibuildwheel.util.resources_dir / constraint_filename constraint_versions = get_versions_from_constraint_file(constraint_file) - for package in ["pip", "setuptools", "wheel", "virtualenv"]: + for package in ["pip"]: env_name = f"EXPECTED_{package.upper()}_VERSION" build_environment[env_name] = constraint_versions[package] @@ -101,9 +103,9 @@ def test_pinned_versions(tmp_path, python_version, build_frontend_env): expected_wheels = [ w for w in utils.expected_wheels("spam", "0.1.0") if "-cp38" in w or "-pp38" in w ] - elif python_version == "3.9": + elif python_version == "3.10": expected_wheels = [ - w for w in utils.expected_wheels("spam", "0.1.0") if "-cp39" in w or "-pp39" in w + w for w in utils.expected_wheels("spam", "0.1.0") if "-cp310" in w or "-pp310" in w ] else: msg = "unhandled python version" @@ -121,9 +123,7 @@ def test_dependency_constraints_file(tmp_path, build_frontend_env): tool_versions = { "pip": "23.1.2", - "setuptools": "67.7.2", - "wheel": "0.38.3", - "virtualenv": "20.23.0", + "delocate": "0.10.3", } constraints_file = tmp_path / "constraints file.txt" @@ -131,9 +131,7 @@ def test_dependency_constraints_file(tmp_path, build_frontend_env): textwrap.dedent( """ pip=={pip} - setuptools=={setuptools} - wheel=={wheel} - virtualenv=={virtualenv} + delocate=={delocate} importlib-metadata<3,>=0.12; python_version < "3.8" """.format(**tool_versions) )