Skip to content

Commit

Permalink
updates to add python 3.13 (#488)
Browse files Browse the repository at this point in the history
* updates cibuildwheel
* updates usages of python 3.12 in CI to 3.13
* removes python 3.8 and older from consideration
  • Loading branch information
AndrewAnnex authored Oct 26, 2024
1 parent fc6f43b commit 3c6b466
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 25 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
env:
# increment to rebuild cspice manually
CSPICE_VERSION: 67
CSPICE_CACHE_NUMBER: 2
CSPICE_CACHE_NUMBER: 0
PYPI_CACHE_NUMBER: 0

jobs:
Expand All @@ -35,11 +35,11 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python 🐍 3.12
- name: Set up Python 🐍 3.13
if: steps.cache-libcspice.outputs.cache-hit != 'true'
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
- name: Display Python 🐍 version
if: steps.cache-libcspice.outputs.cache-hit != 'true'
run: python -c "import sys; print(sys.version)"
Expand All @@ -62,7 +62,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-14, 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']
steps:
- name: Checkout 🌶️ 🥧
uses: actions/checkout@v4
Expand Down Expand Up @@ -135,10 +135,10 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python 🐍 3.12
- name: Set up Python 🐍 3.13
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
- name: Display Python 🐍 version
run: python -c "import sys; print(sys.version)"
- name: Install pip
Expand All @@ -152,9 +152,9 @@ jobs:
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.pip_cache_dir }}
key: ${{ runner.os }}-3.12-test-pip-${{ hashFiles('**/ci-requirements.txt') }}
key: ${{ runner.os }}-3.13-test-pip-${{ hashFiles('**/ci-requirements.txt') }}
restore-keys: |
${{ runner.os }}-3.12-test-pip-
${{ runner.os }}-3.13-test-pip-
- name: Install dependencies
run: |
python -m pip install -U -r ci-requirements.txt
Expand Down Expand Up @@ -187,10 +187,10 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python 🐍 3.12
- name: Set up Python 🐍 3.13
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
- name: Display Python 🐍 version
run: python -c "import sys; print(sys.version)"
- name: Install pip
Expand All @@ -204,9 +204,9 @@ jobs:
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.pip_cache_dir }}
key: ${{ runner.os }}-3.12-test-pip-${{ hashFiles('**/ci-requirements.txt') }}
key: ${{ runner.os }}-3.13-test-pip-${{ hashFiles('**/ci-requirements.txt') }}
restore-keys: |
${{ runner.os }}-3.12-test-pip-
${{ runner.os }}-3.13-test-pip-
- name: Install dependencies
run : |
python -m pip install -U -r ci-requirements.txt
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/publish-to-test-and-live-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
steps:
- name: Checkout 🌶️ 🥧
uses: actions/checkout@v4
- name: Set up Python 🐍 3.12
- name: Set up Python 🐍 3.13
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
- name: Display Python 🐍
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
Expand Down Expand Up @@ -90,17 +90,17 @@ jobs:
with:
path: ./src/spiceypy/utils/libcspice.so
key: ${{ env.CSPICE_CACHE }}-${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ hashFiles('get_spice.py') }}-${{ hashFiles('setup.cfg') }}
- name: Set up Python 🐍 3.12
- name: Set up Python 🐍 3.13
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
- name: Display Python 🐍 Version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r ci-requirements.txt
python -m pip install cibuildwheel==2.19.1
python -m pip install cibuildwheel==2.21.3
- name: See if libcspice.so is available from cache
if: matrix.config.arch == 'aarch64'
run: |
Expand Down Expand Up @@ -143,10 +143,10 @@ jobs:
pattern: artifact-*
merge-multiple: true
path: dist
- name: Set up Python 🐍 3.12
- name: Set up Python 🐍 3.13
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
- name: Display Python 🐍
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ build-backend = "setuptools.build_meta"
build-frontend = "build"
# build libcspice inside cibuildwheel before running python build steps
before-build = "python {project}/get_spice.py"
# Only build on CPython 3.12
build = "cp312-*"
# Only build on CPython 3.13
build = "cp313-*"
# Skip 32-bit builds, pypy, and musllinux
skip = ["*-win32", "*-manylinux_i686", "*-musllinux_i686", "pypy*", "pp*", "*-musllinux_aarch64", "*-musllinux_x86_64"]
# other options
Expand Down
6 changes: 2 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@ classifiers =
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Astronomy
License :: OSI Approved :: MIT License
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.13
Operating System :: MacOS :: MacOS X
Operating System :: POSIX :: Linux
Operating System :: POSIX :: BSD :: FreeBSD
Expand All @@ -43,7 +41,7 @@ classifiers =
package_dir=
=src
packages=find:
python_requires = >=3.6, <4
python_requires = >=3.9, <4
include_package_data = True
zip_safe = False
install_requires =
Expand Down

0 comments on commit 3c6b466

Please sign in to comment.