Skip to content

Commit

Permalink
Update wheel tag and metadata
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Christophe Morin <[email protected]>
  • Loading branch information
JeanChristopheMorinPerso committed Sep 23, 2023
1 parent a859c69 commit f521377
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,21 @@ def run(self):
class rez_wheel(bdist_wheel):
def finalize_options(self):
self.universal = True # Support python 2 and 3
bdist_wheel.finalize_options(self)
if platform.system() == "Windows":
self.plat_name_supplied = True
self.plat_name = _get_platform()
# Make sure the wheel is marked as non pure.
# The cmake package does the same thing.
self.root_is_pure = False

bdist_wheel.finalize_options(self)
def get_tag(self):
if platform.system() == "Windows":
plat_name = _get_platform()
plat_name = (
plat_name.lower().replace("-", "_").replace(".", "_").replace(" ", "_")
)
# Use same tag as cmake package.
return ("py2.py3", "none", plat_name)
return bdist_wheel.get_tag(self)


setup(
Expand Down

0 comments on commit f521377

Please sign in to comment.