|
7 | 7 |
|
8 | 8 | #################################################################### |
9 | 9 | # supported platforms |
10 | | -board_names = ["linux", "maixcam"] |
| 10 | +# 1. 新增 maixcam2 到支持的平台列表中 |
| 11 | +board_names = ["linux", "maixcam", "maixcam2"] # 修改点:添加 maixcam2 |
11 | 12 | platform_names = { |
12 | 13 | # use correspond docker to compile https://github.com/pypa/manylinux |
13 | 14 | "linux": "manylinux2014_{}".format(platform.machine().replace("-", "_").replace(".", "_").lower()), |
14 | 15 | "m2dock": "linux_armv7l", |
15 | 16 | "maixcam": "linux_riscv64", |
| 17 | + "maixcam2": "linux_arrch64", # 修改点:添加 maixcam2 对应的平台名称 |
16 | 18 | } |
17 | 19 | platform_toolchain_id = { |
18 | | - "maixcam": "musl_t-hread" |
| 20 | + "maixcam": "musl_t-hread", |
| 21 | + "maixcam2": "cross-gcc-11.3" # 修改点:添加 maixcam2 对应的工具链ID |
19 | 22 | } |
20 | 23 | #################################################################### |
21 | 24 |
|
@@ -70,11 +73,15 @@ def print_py_version_err(build_py_version): |
70 | 73 | print(" conda create -n python{}.{} python={}.{}".format(build_py_version[0], build_py_version[1], build_py_version[0], build_py_version[1])) |
71 | 74 | print(" conda activate python{}.{}".format(build_py_version[0], build_py_version[1])) |
72 | 75 |
|
73 | | -# specially check for maixcam |
| 76 | +# specially check for maixcam and maixcam2 |
74 | 77 | py_version = get_python_version() |
75 | 78 | if board == "maixcam" and f"{py_version[0]}.{py_version[1]}" != "3.11": |
76 | 79 | print_py_version_err([3, 11]) |
77 | 80 | sys.exit(1) |
| 81 | +# 修改点:新增 maixcam2 的 Python 版本强制检测(要求 3.13) |
| 82 | +if board == "maixcam2" and f"{py_version[0]}.{py_version[1]}" != "3.13": |
| 83 | + print_py_version_err([3, 13]) |
| 84 | + sys.exit(1) |
78 | 85 |
|
79 | 86 | if board: |
80 | 87 | # build CPP modules, and copy to build/lib/ |
@@ -273,7 +280,7 @@ def has_ext_modules(foo): |
273 | 280 | # os.rename(os.path.join("dist", name), os.path.join("dist", |
274 | 281 | # "MaixPy-{}-{}-{}-{}.whl".format(__version__, py_tag, py_tag, platform_names[board])) |
275 | 282 | # ) |
276 | | - if name.find("linux_riscv64") != -1 or name.find("manylinux2014_") != -1:# 增加linux平台判断,使linux平台和maixcam平台执行相同的whl打包逻辑 |
| 283 | + if True:# 所有平台都打包whl文件 |
277 | 284 | # pypi not support riscv64 yet, so we have to change to py3-none-any pkg |
278 | 285 | # unzip to dist/temp, change dist-info/WHEEL file |
279 | 286 | # zip back and rename |
|
0 commit comments