Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.

Commit 6b918f4

Browse files
partheaandrewsg
andauthored
feat: add support for python 3.13 (#239)
* feat: add support for python 3.13 * upgrade script dependencies * continue iterating on build scripts * continue iterating on build scripts * continue iterating on build scripts * continue iterating on build scripts * continue iterating on build scripts * continue iterating on build scripts * continue iterating on build scripts --------- Co-authored-by: Andrew Gorcester <[email protected]> Co-authored-by: Andrew Gorcester <[email protected]>
1 parent 05957d4 commit 6b918f4

9 files changed

Lines changed: 20 additions & 12 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ C toolchain.
99

1010
# Currently Published Wheels
1111

12-
Wheels are currently published for CPython 3.9, 3.10, 3.11 and 3.12
12+
Wheels are currently published for CPython 3.9, 3.10, 3.11, 3.12 and 3.13
1313
for multiple architectures. PyPy 3.9 and 3.10 are also supported for Linux.
1414
For information on building your own wheels please view [BUILDING.md](BUILDING.md).
1515

‎noxfile.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
HERE = os.path.dirname(__file__)
2626

27-
@nox.session(python=["3.9", "3.10", "3.11", "3.12"])
27+
@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13"])
2828
def build_libcrc32c(session):
2929
session.env["PY_BIN"] = f"python{session.python}"
3030
session.env["REPO_ROOT"] = HERE
@@ -39,7 +39,7 @@ def build_libcrc32c(session):
3939
raise Exception("Unsupported")
4040

4141

42-
@nox.session(python=["3.9", "3.10", "3.11", "3.12"])
42+
@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13"])
4343
def check(session):
4444
session.install("pytest")
4545
session.install("--no-index", f"--find-links={HERE}/wheels", "google-crc32c")

‎scripts/manylinux/build_on_centos.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ if [[ -z ${BUILD_PYTHON} ]]; then
5656
elif [[ "${PYTHON_BIN}" == *"312"* ]]; then
5757
PYTHON_VERSIONS="${PYTHON_VERSIONS} ${PYTHON_BIN}"
5858
continue
59+
elif [[ "${PYTHON_BIN}" == *"313"* ]]; then
60+
PYTHON_VERSIONS="${PYTHON_VERSIONS} ${PYTHON_BIN}"
61+
continue
5962
else
6063
echo "Ignoring unsupported version: ${PYTHON_BIN}"
6164
echo "====================================="

‎scripts/manylinux/check.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ install_python_pyenv() {
3737
pyenv shell $version
3838
}
3939

40-
SUPPORTED_PYTHON_VERSIONS=("3.9" "3.10" "3.11" "3.12")
40+
SUPPORTED_PYTHON_VERSIONS=("3.9" "3.10" "3.11" "3.12" "3.13")
4141

4242
for PYTHON_VERSION in "${SUPPORTED_PYTHON_VERSIONS[@]}"; do
4343
PYTHON=python${PYTHON_VERSION}

‎scripts/osx/build.sh‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ export REPO_ROOT=$(dirname ${SCRIPTS_DIR})
3030
# https://github.com/pyenv/pyenv/wiki#suggested-build-environment
3131
brew install openssl readline sqlite3 xz zlib tcl-tk
3232

33+
# Replace the old version of pyenv with the latest version.
34+
rm -rf /Users/kbuilder/.pyenv
35+
git clone https://github.com/pyenv/pyenv.git /Users/kbuilder/.pyenv
36+
3337
# Build and install `libcrc32c`
3438
export PY_BIN="${PY_BIN:-python3}"
3539
export CRC32C_INSTALL_PREFIX="${REPO_ROOT}/usr"
@@ -42,7 +46,7 @@ git submodule update --init --recursive
4246

4347
${OSX_DIR}/build_c_lib.sh
4448

45-
SUPPORTED_PYTHON_VERSIONS=("3.9" "3.10" "3.11" "3.12")
49+
SUPPORTED_PYTHON_VERSIONS=("3.9" "3.10" "3.11" "3.12" "3.13")
4650

4751
for PYTHON_VERSION in ${SUPPORTED_PYTHON_VERSIONS[@]}; do
4852
echo "Build wheel for Python ${PYTHON_VERSION}"

‎scripts/osx/build_c_lib.sh‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ fi
4343
mkdir -p ${CRC32C_INSTALL_PREFIX}
4444
mkdir -p ${CRC32C_INSTALL_PREFIX}/lib
4545

46-
# Make sure we have an updated `pip`.
47-
${PY_BIN} -m pip install --upgrade pip --user
4846
# Create a virtualenv where we can install `cmake`.
4947
VENV=${REPO_ROOT}/venv_build_libcrc32c
5048
${PY_BIN} -m venv ${VENV}

‎scripts/osx/check.sh‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ VERSION=$(awk "/version \= ([0-9.]+)/" setup.cfg)
1919
PACKAGE_VERSION=${VERSION:10}
2020

2121
# ``readlink -f`` is not our friend on OS X. This relies on **some**
22-
# ``python`` being installed.
23-
SCRIPT_FI=$(python -c "import os; print(os.path.realpath('${0}'))")
22+
# ``python3`` being installed.
23+
SCRIPT_FI=$(python3 -c "import os; print(os.path.realpath('${0}'))")
2424
OSX_DIR=$(dirname ${SCRIPT_FI})
2525
SCRIPTS_DIR=$(dirname ${OSX_DIR})
2626
export REPO_ROOT=$(dirname ${SCRIPTS_DIR})
@@ -30,7 +30,7 @@ eval "$(pyenv init -)"
3030
eval "$(pyenv init --path)"
3131
ls ${REPO_ROOT}/wheels
3232

33-
SUPPORTED_PYTHON_VERSIONS=("3.9" "3.10" "3.11" "3.12")
33+
SUPPORTED_PYTHON_VERSIONS=("3.9" "3.10" "3.11" "3.12" "3.13")
3434

3535
for PYTHON_VERSION in ${SUPPORTED_PYTHON_VERSIONS[@]}; do
3636
PYTHON="python${PYTHON_VERSION}"
@@ -44,7 +44,7 @@ for PYTHON_VERSION in ${SUPPORTED_PYTHON_VERSIONS[@]}; do
4444
${PYTHON} -m venv ${VIRTUALENV}
4545

4646
OS_VERSION_STR="12_0"
47-
if [ "${PYTHON_VERSION}" == "3.12" ]; then
47+
if [ "${PYTHON_VERSION}" == "3.12" ] || [ "${PYTHON_VERSION}" == "3.13" ]; then
4848
OS_VERSION_STR="14.0"
4949
fi
5050

‎scripts/windows/build.bat‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ set CRC32C_INSTALL_PREFIX=%cd%\build\%CONFIGURATION%
2323
@rem Unfortunately pyenv for Windows has an out-of-date versions list. Choco's
2424
@rem installer seems to have some problems with installing multiple versions at
2525
@rem once, so as a workaround, we will install and then uninstall every version.
26-
FOR %%P IN (3.9, 3.10, 3.11, 3.12) DO (
26+
FOR %%P IN (3.9, 3.10, 3.11, 3.12, 3.13.1) DO (
2727

2828
echo "Installing Python version %%P"
2929
choco install python --version=%%P -y --no-progress

‎scripts/windows/test.bat‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,8 @@ py -%PYTHON_VERSION%-64 -m pip install --no-index --find-links=wheels google-crc
2525

2626
py -%PYTHON_VERSION%-64 ./scripts/check_crc32c_extension.py
2727

28+
@rem pyreadline is removed here because pytest will opportunistically use it if
29+
@rem available, but the installed version is too old to work.
30+
py -%PYTHON_VERSION%-64 -m pip uninstall -y pyreadline
2831
py -%PYTHON_VERSION%-64 -m pip install pytest
2932
py -%PYTHON_VERSION%-64 -m pytest tests

0 commit comments

Comments
 (0)