From 0b938bddddea0c1c31dd60e617e9383d9a6b2db5 Mon Sep 17 00:00:00 2001 From: Linlang Date: Thu, 19 Dec 2024 15:15:20 +0800 Subject: [PATCH] fix pip install not matching packages --- .github/workflows/python-publish.yml | 16 +++++++++++----- .github/workflows/test_qlib_from_pip.yml | 12 ++++++++---- qlib/__init__.py | 2 +- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 8196ca1df..cd482ffe6 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -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) diff --git a/.github/workflows/test_qlib_from_pip.yml b/.github/workflows/test_qlib_from_pip.yml index ca31342c3..b2fe44e78 100644 --- a/.github/workflows/test_qlib_from_pip.yml +++ b/.github/workflows/test_qlib_from_pip.yml @@ -1,10 +1,14 @@ name: Test qlib from pip +# on: +# push: +# branches: [ main ] +# pull_request: +# branches: [ main ] + on: - push: - branches: [ main ] - pull_request: - branches: [ main ] + release: + types: [published] jobs: build: diff --git a/qlib/__init__.py b/qlib/__init__.py index 6b2b0cdca..5737e40de 100644 --- a/qlib/__init__.py +++ b/qlib/__init__.py @@ -2,7 +2,7 @@ # Licensed under the MIT License. from pathlib import Path -__version__ = "0.9.5.90" +__version__ = "0.9.5.89" __version__bak = __version__ # This version is backup for QlibConfig.reset_qlib_version import os from typing import Union