From 7d7e96a65503934fb0c50d21c1b963450ac88d2d Mon Sep 17 00:00:00 2001 From: Linlang <30293408+SunsetWolf@users.noreply.github.com> Date: Tue, 18 Jul 2023 19:25:08 +0800 Subject: [PATCH] Fixed pyqlib version issue on macos (#1605) * change_publish * Update .github/workflows/python-publish.yml --------- Co-authored-by: Linlang Co-authored-by: you-n-g --- .github/workflows/python-publish.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index e95a9e88c8..5d88b2959a 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -19,7 +19,24 @@ 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--cp38-cp38-macosx_11_0_x86_64.whl` and `pyqlib--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--cp38-cp37m + # `pyqlib--cp38-cp38-macosx_10_15_x86_64.whl` and `pyqlib--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 }} @@ -27,7 +44,7 @@ jobs: 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