mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-01 10:01:19 +08:00
fix pip install not matching packages
This commit is contained in:
16
.github/workflows/python-publish.yml
vendored
16
.github/workflows/python-publish.yml
vendored
@@ -3,9 +3,15 @@
|
||||
|
||||
name: Upload Python Package
|
||||
|
||||
# on:
|
||||
# release:
|
||||
# types: [published]
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
deploy_with_bdist_wheel:
|
||||
@@ -33,10 +39,10 @@ jobs:
|
||||
python -c "
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
replaced = subprocess.run(['sw_vers', '-productVersion'], capture_output=True, text=True).stdout.strip().split('.', 1)[0] + '_0'
|
||||
replaced = subprocess.run(['sw_vers', '-productVersion'], capture_output=True, text=True).stdout.strip().split('.', 1)[0] + '_0_x86_64'
|
||||
for whl_file in Path('./dist').glob('*.whl'):
|
||||
parts = whl_file.name.split('_')
|
||||
be_replaced = '_'.join(parts[1:3])
|
||||
parts = whl_file.stem.split('_')
|
||||
be_replaced = '_'.join(parts[1:])
|
||||
new_name = whl_file.name.replace(be_replaced, replaced)
|
||||
new_whl_file = whl_file.with_name(new_name)
|
||||
whl_file.rename(new_whl_file)
|
||||
|
||||
Reference in New Issue
Block a user