diff --git a/cibuildwheel/platforms/windows.py b/cibuildwheel/platforms/windows.py index d7df473ef..fe61e762c 100644 --- a/cibuildwheel/platforms/windows.py +++ b/cibuildwheel/platforms/windows.py @@ -81,8 +81,6 @@ def get_nuget_args( package_name, "-Version", version, - "-FallbackSource", - "https://api.nuget.org/v3/index.json", "-OutputDirectory", str(output_directory), ] diff --git a/unit_test/get_platform_test.py b/unit_test/get_platform_test.py index 22bd9d053..9eeb79ecb 100644 --- a/unit_test/get_platform_test.py +++ b/unit_test/get_platform_test.py @@ -8,7 +8,11 @@ from cibuildwheel.ci import CIProvider, detect_ci_provider from cibuildwheel.errors import FatalError -from cibuildwheel.platforms.windows import PythonConfiguration, setup_setuptools_cross_compile +from cibuildwheel.platforms.windows import ( + PythonConfiguration, + get_nuget_args, + setup_setuptools_cross_compile, +) TYPE_CHECKING = False if TYPE_CHECKING: @@ -30,6 +34,20 @@ def patched_environment( yield +@pytest.mark.parametrize( + ("arch", "free_threaded", "package_name"), + [("AMD64", False, "python"), ("ARM64", True, "pythonarm64-freethreaded")], +) +def test_get_nuget_args(arch: str, free_threaded: bool, package_name: str, tmp_path: Path) -> None: + assert get_nuget_args("3.14.1", arch, free_threaded, tmp_path) == [ + package_name, + "-Version", + "3.14.1", + "-OutputDirectory", + str(tmp_path), + ] + + def test_x86(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None: environment: dict[str, str] = {} configuration = PythonConfiguration(version="irrelevant", identifier="cp314-win32", url=None)