Skip to content

Commit

Permalink
fix pack in new setuptools
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutree committed Feb 27, 2025
1 parent e32660b commit 6ff654d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,7 @@ def has_ext_modules(foo):
# pip to create the appropriate form of executable for the target platform.
entry_points={
'console_scripts': [
'maix-resize=maix.maix_resize:main_cli',
'maix_test_hardware=maix.test_hardware:main',
'maix-resize=maix.maix_resize:main_cli'
],
# 'gui_scripts': [
# ],
Expand All @@ -276,9 +275,12 @@ def has_ext_modules(foo):
import zipfile
with zipfile.ZipFile(os.path.join("dist", name), "r") as zip_ref:
zip_ref.extractall("dist/temp")
with open("dist/temp/MaixPy-{}.dist-info/WHEEL".format(__version__), "r", encoding="utf-8") as f:
wheel_path = "dist/temp/MaixPy-{}.dist-info/WHEEL".format(__version__)
if not os.path.exists(wheel_path):
wheel_path = "dist/temp/maixpy-{}.dist-info/WHEEL".format(__version__)
with open(wheel_path, "r", encoding="utf-8") as f:
lines = f.readlines()
with open("dist/temp/MaixPy-{}.dist-info/WHEEL".format(__version__), "w", encoding="utf-8") as f:
with open(wheel_path, "w", encoding="utf-8") as f:
for line in lines:
if line.startswith("Tag:"):
f.write("Tag: py3-none-any\n")
Expand Down

0 comments on commit 6ff654d

Please sign in to comment.