Skip to content

Commit 9ae09fa

Browse files
authored
Fix tests on systems where platlib and purelib are different (#13727)
The following tests expect installed files to be in purelib: * `tests/functional/test_check.py::test_check_unsupported` * `tests/functional/test_install_wheel.py::test_basic_install_from_wheel` However, the actual wheels they install have `Root-Is-Purelib` set to `false` (or missing entirely), which causes the contents to be installed to platlib instead. Since the wheels in question don't have any platform-dependent files, it seems appropriate to update them to use `Root-Is-Purelib: true`. Since we're touching `has.script-1.0-py2.py3-none-any.whl`, fix the `Tag` field as well, which was set incorrectly (to `cp26-none-linux_x86_64`).
1 parent 300cec4 commit 9ae09fa

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

news/72b8078a-4881-4da4-8b3d-c9bab16eb572.trivial.rst

Whitespace-only changes.
-14 Bytes
Binary file not shown.

tests/lib/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,15 @@ def add_file(path: str, text: str) -> None:
11521152
records = [(record_path, "", "")]
11531153
buf = BytesIO()
11541154
with ZipFile(buf, "w") as z:
1155-
add_file(f"{dist_info}/WHEEL", "Wheel-Version: 1.0")
1155+
add_file(
1156+
f"{dist_info}/WHEEL",
1157+
dedent(
1158+
"""\
1159+
Wheel-Version: 1.0
1160+
Root-Is-Purelib: true
1161+
"""
1162+
),
1163+
)
11561164
add_file(
11571165
f"{dist_info}/METADATA",
11581166
dedent(

0 commit comments

Comments
 (0)