Skip to content

Commit 93b6906

Browse files
committed
fix: Convert boolean value to lowercase in Root-Is-Purelib
Close #165 Signed-off-by: Frost Ming <me@frostming.com>
1 parent d11dff5 commit 93b6906

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

news/165.bugfix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix the Root-Is-Purelib to "true" instead of "True" to follow the spec of PEP 427.

pdm/pep517/wheel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ def _write_metadata_file(self, fp: TextIO) -> None:
347347
def _write_wheel_file(self, fp: TextIO) -> None:
348348
fp.write(
349349
WHEEL_FILE_FORMAT.format(
350-
is_purelib=self.meta.config.is_purelib, tag=self.tag
350+
is_purelib=str(self.meta.config.is_purelib).lower(), tag=self.tag
351351
)
352352
)
353353

tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def test_build_purelib_project_with_build(tmp_path: Path) -> None:
306306
)
307307
version = zf.read("my_package/version.foo").decode("utf-8").strip()
308308
assert version == "0.1.0"
309-
assert wheel_metadata["Root-Is-Purelib"] == "True"
309+
assert wheel_metadata["Root-Is-Purelib"] == "true"
310310

311311

312312
@pytest.mark.skipif(

0 commit comments

Comments
 (0)