From 01d20119053d17b2ad6fb1c21395ffab755c74e2 Mon Sep 17 00:00:00 2001 From: Linlang Date: Thu, 19 Dec 2024 20:47:55 +0800 Subject: [PATCH] rewrite deploy with macos --- .github/workflows/python-publish.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 6d55829252..3a7a0424ff 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -131,18 +131,22 @@ jobs: make build - name: Rename 1 run: | - make build python -c " from pathlib import Path plat_info = '${{ matrix.buildplat[1] }}'.split('_', 1)[-1] sys_ver_info = '${{ matrix.buildplat[0] }}'.split('-')[-1] replaced = f'{sys_ver_info}_0_{plat_info}' + print(replaced) for whl_file in Path('./dist').glob('*.whl'): if 'universal2' in whl_file.stem: parts = whl_file.stem.split('_') + print(parts) be_replaced = '_'.join(parts[1:]) + print(be_replaced) new_name = whl_file.name.replace(be_replaced, replaced) + print(new_name) new_whl_file = whl_file.with_name(new_name) + print(new_whl_file) whl_file.rename(new_whl_file) print(f'Renamed: {whl_file} -> {new_whl_file}') "