mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-14 08:16:54 +08:00
fix macos package name error
This commit is contained in:
28
.github/workflows/python-publish.yml
vendored
28
.github/workflows/python-publish.yml
vendored
@@ -26,27 +26,31 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
make dev
|
make dev
|
||||||
- name: Set MACOSX_DEPLOYMENT_TARGET
|
|
||||||
run: |
|
|
||||||
if [[ ${{ matrix.os }} == "macos-13" ]]; then
|
|
||||||
export MACOSX_DEPLOYMENT_TARGET=13.0
|
|
||||||
elif [[ ${{ matrix.os }} == "macos-14" ]]; then
|
|
||||||
export MACOSX_DEPLOYMENT_TARGET=14.0
|
|
||||||
else
|
|
||||||
export MACOSX_DEPLOYMENT_TARGET=15.0 # Default for macos-latest
|
|
||||||
fi
|
|
||||||
echo "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"
|
|
||||||
- name: Build wheel on ${{ matrix.os }}
|
- name: Build wheel on ${{ matrix.os }}
|
||||||
run: |
|
run: |
|
||||||
make build
|
make build
|
||||||
|
- name: Rename macos filename
|
||||||
|
if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-14' || matrix.os == 'macos-latest' }}
|
||||||
|
run: |
|
||||||
|
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'
|
||||||
|
for whl_file in Path('./dist').glob('*.whl'):
|
||||||
|
parts = whl_file.name.split('_')
|
||||||
|
be_replaced = '_'.join(parts[1:3])
|
||||||
|
new_name = whl_file.name.replace(be_replaced, replaced)
|
||||||
|
new_whl_file = whl_file.with_name(new_name)
|
||||||
|
whl_file.rename(new_whl_file)
|
||||||
|
print(f'Renamed: {whl_file} -> {new_whl_file}')
|
||||||
|
"
|
||||||
- name: Build and publish
|
- name: Build and publish
|
||||||
env:
|
env:
|
||||||
TWINE_USERNAME: __token__
|
TWINE_USERNAME: __token__
|
||||||
TWINE_PASSWORD: ${{ secrets.TESTPYPI_TOKEN }}
|
TWINE_PASSWORD: ${{ secrets.TESTPYPI_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
ls dist
|
|
||||||
twine check dist/*.whl
|
twine check dist/*.whl
|
||||||
twine upload --repository-url https://test.pypi.org/legacy/ dist/*.whl --verbose
|
# twine upload --repository-url https://test.pypi.org/legacy/ dist/*.whl --verbose
|
||||||
|
|
||||||
# deploy_with_manylinux:
|
# deploy_with_manylinux:
|
||||||
# runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user