From 83be2eedab272e6178df6813ff15075452b6f4ba Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Thu, 26 Sep 2024 20:22:26 +0100 Subject: [PATCH] Fixes #91: Tag metadata in WHEEL was incorrect (#92) --- pymsbuild/_build.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pymsbuild/_build.py b/pymsbuild/_build.py index c7b56b1..5c44d0c 100644 --- a/pymsbuild/_build.py +++ b/pymsbuild/_build.py @@ -503,9 +503,11 @@ def prepare_wheel_distinfo(self): with open(outdir / "WHEEL", "w", encoding="utf-8") as f: print("Wheel-Version: 1.0", file=f) print("Generator: pymsbuild", __version__, file=f) - print("Root-Is-Purelib: false", file=f) - for t in sorted(self.wheel_tag): - print("Tag:", t, file=f) + if self.wheel_tag: + print("Root-Is-Purelib:", str(self.wheel_tag).endswith("-none-any"), file=f) + print("Tag:", self.wheel_tag, file=f) + else: + print("Root-Is-Purelib: True", file=f) if self.build_number: print("Build:", self.build_number, file=f) shutil.copy(self.pkginfo, outdir / "METADATA")