Skip to content

Commit

Permalink
fix: Convert boolean value to lowercase in Root-Is-Purelib
Browse files Browse the repository at this point in the history
Close #165

Signed-off-by: Frost Ming <me@frostming.com>
frostming committed Apr 12, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent d11dff5 commit 93b6906
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions news/165.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix the Root-Is-Purelib to "true" instead of "True" to follow the spec of PEP 427.
2 changes: 1 addition & 1 deletion pdm/pep517/wheel.py
Original file line number Diff line number Diff line change
@@ -347,7 +347,7 @@ def _write_metadata_file(self, fp: TextIO) -> None:
def _write_wheel_file(self, fp: TextIO) -> None:
fp.write(
WHEEL_FILE_FORMAT.format(
is_purelib=self.meta.config.is_purelib, tag=self.tag
is_purelib=str(self.meta.config.is_purelib).lower(), tag=self.tag
)
)

2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
@@ -306,7 +306,7 @@ def test_build_purelib_project_with_build(tmp_path: Path) -> None:
)
version = zf.read("my_package/version.foo").decode("utf-8").strip()
assert version == "0.1.0"
assert wheel_metadata["Root-Is-Purelib"] == "True"
assert wheel_metadata["Root-Is-Purelib"] == "true"


@pytest.mark.skipif(

0 comments on commit 93b6906

Please sign in to comment.