Skip to content

Commit

Permalink
Fixed pyqlib version issue on macos (#1605)
Browse files Browse the repository at this point in the history
* change_publish

* Update .github/workflows/python-publish.yml

---------

Co-authored-by: Linlang <v-linlanglv@microsoft.com>
Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
  • Loading branch information
3 people committed Jul 18, 2023
1 parent be4646b commit 7d7e96a
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/python-publish.yml
Expand Up @@ -19,15 +19,32 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python
# This is because on macos systems you can install pyqlib using
# `pip install pyqlib` installs, it does not recognize the
# `pyqlib-<version>-cp38-cp38-macosx_11_0_x86_64.whl` and `pyqlib-<veresion>-cp38-cp37m-macosx_11_0_x86_64.whl`.
# So we limit the version of python, in order to generate a version of qlib that is usable for macos: `pyqlib-<veresion>-cp38-cp37m
# `pyqlib-<version>-cp38-cp38-macosx_10_15_x86_64.whl` and `pyqlib-<veresion>-cp38-cp37m-macosx_10_15_x86_64.whl`.
# Python 3.7.16, 3.8.16 can build macosx_10_15. But Python 3.7.17, 3.8.17 can build macosx_11_0
- name: Set up Python ${{ matrix.python-version }}
if: matrix.os == 'macos-11' && matrix.python-version == '3.7'
uses: actions/setup-python@v2
with:
python-version: "3.7.16"
- name: Set up Python ${{ matrix.python-version }}
if: matrix.os == 'macos-11' && matrix.python-version == '3.8'
uses: actions/setup-python@v2
with:
python-version: "3.8.16"
- name: Set up Python ${{ matrix.python-version }}
if: matrix.os != 'macos-11'
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build wheel on Windows
- name: Build wheel on ${{ matrix.os }}
run: |
pip install numpy
pip install cython
Expand Down

0 comments on commit 7d7e96a

Please sign in to comment.