Skip to content

Commit 7d7e96a

Browse files
SunsetWolfLinlangyou-n-g
authored
Fixed pyqlib version issue on macos (#1605)
* change_publish * Update .github/workflows/python-publish.yml --------- Co-authored-by: Linlang <[email protected]> Co-authored-by: you-n-g <[email protected]>
1 parent be4646b commit 7d7e96a

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.github/workflows/python-publish.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,32 @@ jobs:
1919

2020
steps:
2121
- uses: actions/checkout@v2
22-
- name: Set up Python
22+
# This is because on macos systems you can install pyqlib using
23+
# `pip install pyqlib` installs, it does not recognize the
24+
# `pyqlib-<version>-cp38-cp38-macosx_11_0_x86_64.whl` and `pyqlib-<veresion>-cp38-cp37m-macosx_11_0_x86_64.whl`.
25+
# So we limit the version of python, in order to generate a version of qlib that is usable for macos: `pyqlib-<veresion>-cp38-cp37m
26+
# `pyqlib-<version>-cp38-cp38-macosx_10_15_x86_64.whl` and `pyqlib-<veresion>-cp38-cp37m-macosx_10_15_x86_64.whl`.
27+
# 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
28+
- name: Set up Python ${{ matrix.python-version }}
29+
if: matrix.os == 'macos-11' && matrix.python-version == '3.7'
30+
uses: actions/setup-python@v2
31+
with:
32+
python-version: "3.7.16"
33+
- name: Set up Python ${{ matrix.python-version }}
34+
if: matrix.os == 'macos-11' && matrix.python-version == '3.8'
35+
uses: actions/setup-python@v2
36+
with:
37+
python-version: "3.8.16"
38+
- name: Set up Python ${{ matrix.python-version }}
39+
if: matrix.os != 'macos-11'
2340
uses: actions/setup-python@v2
2441
with:
2542
python-version: ${{ matrix.python-version }}
2643
- name: Install dependencies
2744
run: |
2845
python -m pip install --upgrade pip
2946
pip install setuptools wheel twine
30-
- name: Build wheel on Windows
47+
- name: Build wheel on ${{ matrix.os }}
3148
run: |
3249
pip install numpy
3350
pip install cython

0 commit comments

Comments
 (0)