Skip to content

Commit

Permalink
Disable (broken) --sysroot on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Jul 16, 2024
1 parent 6583781 commit 252360e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gpep517/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ def build_wheel_impl(args, wheel_dir: Path):
else disable_zip_compression)

if args.sysroot is not None:
if os.name == "nt":
raise RuntimeError("--sysroot is not supported on Windows")
sysconfig_ctx = patch_sysconfig(args.sysroot,
args.prefix)
else:
Expand Down
2 changes: 2 additions & 0 deletions test/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,8 @@ def test_backend_opening_zipfile(tmp_path, capfd, backend, verify_mod_cleanup,
== {x.compress_type for x in zipf.infolist()})


@pytest.mark.skipif(os.name == "nt",
reason="--sysroot not supported on Windows")
@pytest.mark.parametrize("prefix", [None, "/usr", "/new_prefix/usr"])
def test_sysroot(tmp_path, capfd, verify_mod_cleanup, distutils_cache_cleanup,
prefix):
Expand Down

0 comments on commit 252360e

Please sign in to comment.