From 3c6b4668db8b5153b3a1b7f2a35377445bec5791 Mon Sep 17 00:00:00 2001 From: "Dr. Andrew Annex" Date: Sat, 26 Oct 2024 11:48:11 -0700 Subject: [PATCH] updates to add python 3.13 (#488) * updates cibuildwheel * updates usages of python 3.12 in CI to 3.13 * removes python 3.8 and older from consideration --- .github/workflows/ci-build.yml | 24 +++++++++---------- .../publish-to-test-and-live-pypi.yml | 14 +++++------ pyproject.toml | 4 ++-- setup.cfg | 6 ++--- 4 files changed, 23 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index c73bfa7b..d5eb9a8d 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -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: @@ -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)" @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/publish-to-test-and-live-pypi.yml b/.github/workflows/publish-to-test-and-live-pypi.yml index 8909b369..13d6a2ed 100644 --- a/.github/workflows/publish-to-test-and-live-pypi.yml +++ b/.github/workflows/publish-to-test-and-live-pypi.yml @@ -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 @@ -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: | @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 4c769376..f7939243 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 diff --git a/setup.cfg b/setup.cfg index b0974f9d..e6bbd8d4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 @@ -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 =