Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3.13 #117

Merged
merged 9 commits into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 11 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ 3.8, 3.9, "3.10", "3.11" ]
python-version: [ 3.9, "3.10", "3.11" ]

env:
PYTHON_VERSION: ${{ matrix.python-version }}
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
# macos-13 runners have intel chips. macos-14 and above
# runners have Apple silicon chips.
os: [ ubuntu-latest, macos-13, windows-latest ]
python-version: [ 3.8, 3.9, "3.10", "3.11", "3.12"]
python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13"]
link_mkl: [true, false]

env:
Expand Down Expand Up @@ -91,32 +91,22 @@ jobs:
else
BLAS_PKGS="blas-devel=*=*openblas"
fi
if [[ "$PYTHON_VERSION" == "3.8" ]]; then
conda install scipy=1.5 numpy=1.19 pytest $BLAS_PKGS pkg-config 'setuptools<=60'
elif [[ "$PYTHON_VERSION" == "3.9" ]]; then
if [[ "$PYTHON_VERSION" == "3.9" ]]; then
conda install scipy=1.5 numpy=1.19 pytest $BLAS_PKGS pkg-config
elif [[ "$PYTHON_VERSION" == "3.10" ]]; then
conda install scipy=1.7 numpy=1.21 pytest $BLAS_PKGS pkg-config
elif [[ "$PYTHON_VERSION" == "3.11" ]]; then
conda install scipy=1.9.3 numpy=1.23.4 pytest $BLAS_PKGS pkg-config
elif [[ "$PYTHON_VERSION" == "3.12" ]]; then
elif [[ "$PYTHON_VERSION" == "3.12" || "$PYTHON_VERSION" == "3.13" ]]; then
conda install scipy numpy pytest $BLAS_PKGS pkg-config
fi
- name: Build
run: |
if [[ "$PYTHON_VERSION" == "3.8" ]]; then
if [[ "$LINK_MKL" == "true" ]]; then
python legacy_setup.py install --scs --mkl
else
python legacy_setup.py install
fi
elif [[ "$PYTHON_VERSION" != "3.8" ]]; then
python -c "import numpy as np; print('NUMPY BLAS INFOS'); print(np.show_config())"
if [[ "$LINK_MKL" == "true" ]]; then
python -m pip install --verbose -Csetup-args=-Dlink_mkl=true .
else
python -m pip install --verbose .
fi
python -c "import numpy as np; print('NUMPY BLAS INFOS'); print(np.show_config())"
if [[ "$LINK_MKL" == "true" ]]; then
python -m pip install --verbose -Csetup-args=-Dlink_mkl=true .
else
python -m pip install --verbose .
fi
- name: Test
run: |
Expand Down Expand Up @@ -148,7 +138,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-13, macos-latest ]
python-version: [ 3.8, 3.9, "3.10", "3.11", "3.12"]
python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13"]

env:
RUNNER_OS: ${{ matrix.os }}
Expand All @@ -166,7 +156,6 @@ jobs:
shell: bash
run: |
echo "PYTHON_SUBVERSION=$(echo $PYTHON_VERSION | cut -c 3-)" >> $GITHUB_ENV
echo "SINGLE_ACTION_CONFIG=$( [[ $PYTHON_VERSION == 3.8 && $RUNNER_OS == 'macOS' ]] && echo 'True' || echo 'False' )" >> $GITHUB_ENV
echo "DEPLOY=$( [[ $GITHUB_EVENT_NAME == 'push' && $GITHUB_REF == 'refs/tags'* ]] && echo 'True' || echo 'False' )" >> $GITHUB_ENV

- name: Build wheels
Expand All @@ -181,12 +170,6 @@ jobs:
CIBW_TEST_COMMAND: pytest {package}
uses: joerick/[email protected]

- name: Build source
if: ${{env.SINGLE_ACTION_CONFIG == 'True'}}
run: |
python -m pip install build
python -m build -Csetup-args="-Dlink_blas_statically=True" --outdir=wheelhouse

- name: Upload artifacts to github
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -218,7 +201,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9
- name: Set Additional Envs
shell: bash
run: |
Expand Down
Loading