Skip to content

Commit

Permalink
properly get package tags part II
Browse files Browse the repository at this point in the history
  • Loading branch information
Koeng101 committed Aug 11, 2024
1 parent 33d2389 commit a52b196
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ def get_shared_lib_ext():
else:
return ".so"


def get_platform_tag():
# Get the most specific tag for this platform
tag = next(tags.sys_tags())

if sys.platform.startswith('linux'):
return f'manylinux_2_17_{platform.machine()}'
return f'manylinux_2_17_{tag.arch}'
elif sys.platform.startswith('darwin'):
if platform.machine() == 'arm64':
return f'macosx_11_0_{platform.machine()}'
return f'macosx_11_0_{tag.arch}'
else:
return f'macosx_10_9_{platform.machine()}'
return f'macosx_10_9_{tag.arch}'
elif sys.platform.startswith('win'):
return 'win_amd64'
return f'win_{tag.arch}'
else:
return 'any'

platform_tag = list(tags.sys_tags())[0]

setup(
name='dnadesign',
version='0.1.2',
Expand All @@ -39,7 +39,7 @@ def get_platform_tag():
"cffi>=1.0.0",
],

plat_name=f"{platform_tag.platform}_{platform_tag.abi}_{platform_tag.interpreter}_{platform_tag.implementation}",
plat_name=get_platform_tag(),
include_package_data=True,
zip_safe=False,
author='Keoni Gandall',
Expand Down

0 comments on commit a52b196

Please sign in to comment.