Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions cibuildwheel/platforms/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ def get_nuget_args(
package_name,
"-Version",
version,
"-FallbackSource",
"https://api.nuget.org/v3/index.json",
"-OutputDirectory",
str(output_directory),
]
Expand Down
20 changes: 19 additions & 1 deletion unit_test/get_platform_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
Expand Down
Loading