diff --git a/README.md b/README.md index 62f80b67..ebed0ed1 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ C toolchain. # Currently Published Wheels -Wheels are currently published for CPython 3.9, 3.10, 3.11 and 3.12 +Wheels are currently published for CPython 3.9, 3.10, 3.11, 3.12 and 3.13 for multiple architectures. PyPy 3.9 and 3.10 are also supported for Linux. For information on building your own wheels please view [BUILDING.md](BUILDING.md). diff --git a/noxfile.py b/noxfile.py index c785639d..4ac5bd9a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -24,7 +24,7 @@ HERE = os.path.dirname(__file__) -@nox.session(python=["3.9", "3.10", "3.11", "3.12"]) +@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13"]) def build_libcrc32c(session): session.env["PY_BIN"] = f"python{session.python}" session.env["REPO_ROOT"] = HERE @@ -39,7 +39,7 @@ def build_libcrc32c(session): raise Exception("Unsupported") -@nox.session(python=["3.9", "3.10", "3.11", "3.12"]) +@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13"]) def check(session): session.install("pytest") session.install("--no-index", f"--find-links={HERE}/wheels", "google-crc32c") diff --git a/scripts/manylinux/build_on_centos.sh b/scripts/manylinux/build_on_centos.sh index 2df9c2ca..4835cd8c 100755 --- a/scripts/manylinux/build_on_centos.sh +++ b/scripts/manylinux/build_on_centos.sh @@ -56,6 +56,9 @@ if [[ -z ${BUILD_PYTHON} ]]; then elif [[ "${PYTHON_BIN}" == *"312"* ]]; then PYTHON_VERSIONS="${PYTHON_VERSIONS} ${PYTHON_BIN}" continue + elif [[ "${PYTHON_BIN}" == *"313"* ]]; then + PYTHON_VERSIONS="${PYTHON_VERSIONS} ${PYTHON_BIN}" + continue else echo "Ignoring unsupported version: ${PYTHON_BIN}" echo "=====================================" diff --git a/scripts/manylinux/check.sh b/scripts/manylinux/check.sh index f5f38150..421eb529 100755 --- a/scripts/manylinux/check.sh +++ b/scripts/manylinux/check.sh @@ -37,7 +37,7 @@ install_python_pyenv() { pyenv shell $version } -SUPPORTED_PYTHON_VERSIONS=("3.9" "3.10" "3.11" "3.12") +SUPPORTED_PYTHON_VERSIONS=("3.9" "3.10" "3.11" "3.12" "3.13") for PYTHON_VERSION in "${SUPPORTED_PYTHON_VERSIONS[@]}"; do PYTHON=python${PYTHON_VERSION} diff --git a/scripts/osx/build.sh b/scripts/osx/build.sh index 326ba92d..10779be7 100755 --- a/scripts/osx/build.sh +++ b/scripts/osx/build.sh @@ -30,6 +30,10 @@ export REPO_ROOT=$(dirname ${SCRIPTS_DIR}) # https://github.com/pyenv/pyenv/wiki#suggested-build-environment brew install openssl readline sqlite3 xz zlib tcl-tk +# Replace the old version of pyenv with the latest version. +rm -rf /Users/kbuilder/.pyenv +git clone https://github.com/pyenv/pyenv.git /Users/kbuilder/.pyenv + # Build and install `libcrc32c` export PY_BIN="${PY_BIN:-python3}" export CRC32C_INSTALL_PREFIX="${REPO_ROOT}/usr" @@ -42,7 +46,7 @@ git submodule update --init --recursive ${OSX_DIR}/build_c_lib.sh -SUPPORTED_PYTHON_VERSIONS=("3.9" "3.10" "3.11" "3.12") +SUPPORTED_PYTHON_VERSIONS=("3.9" "3.10" "3.11" "3.12" "3.13") for PYTHON_VERSION in ${SUPPORTED_PYTHON_VERSIONS[@]}; do echo "Build wheel for Python ${PYTHON_VERSION}" diff --git a/scripts/osx/build_c_lib.sh b/scripts/osx/build_c_lib.sh index 99b8bba7..e1d41dae 100755 --- a/scripts/osx/build_c_lib.sh +++ b/scripts/osx/build_c_lib.sh @@ -43,8 +43,6 @@ fi mkdir -p ${CRC32C_INSTALL_PREFIX} mkdir -p ${CRC32C_INSTALL_PREFIX}/lib -# Make sure we have an updated `pip`. -${PY_BIN} -m pip install --upgrade pip --user # Create a virtualenv where we can install `cmake`. VENV=${REPO_ROOT}/venv_build_libcrc32c ${PY_BIN} -m venv ${VENV} diff --git a/scripts/osx/check.sh b/scripts/osx/check.sh index 7ec869c8..e3101325 100755 --- a/scripts/osx/check.sh +++ b/scripts/osx/check.sh @@ -19,8 +19,8 @@ VERSION=$(awk "/version \= ([0-9.]+)/" setup.cfg) PACKAGE_VERSION=${VERSION:10} # ``readlink -f`` is not our friend on OS X. This relies on **some** -# ``python`` being installed. -SCRIPT_FI=$(python -c "import os; print(os.path.realpath('${0}'))") +# ``python3`` being installed. +SCRIPT_FI=$(python3 -c "import os; print(os.path.realpath('${0}'))") OSX_DIR=$(dirname ${SCRIPT_FI}) SCRIPTS_DIR=$(dirname ${OSX_DIR}) export REPO_ROOT=$(dirname ${SCRIPTS_DIR}) @@ -30,7 +30,7 @@ eval "$(pyenv init -)" eval "$(pyenv init --path)" ls ${REPO_ROOT}/wheels -SUPPORTED_PYTHON_VERSIONS=("3.9" "3.10" "3.11" "3.12") +SUPPORTED_PYTHON_VERSIONS=("3.9" "3.10" "3.11" "3.12" "3.13") for PYTHON_VERSION in ${SUPPORTED_PYTHON_VERSIONS[@]}; do PYTHON="python${PYTHON_VERSION}" @@ -44,7 +44,7 @@ for PYTHON_VERSION in ${SUPPORTED_PYTHON_VERSIONS[@]}; do ${PYTHON} -m venv ${VIRTUALENV} OS_VERSION_STR="12_0" - if [ "${PYTHON_VERSION}" == "3.12" ]; then + if [ "${PYTHON_VERSION}" == "3.12" ] || [ "${PYTHON_VERSION}" == "3.13" ]; then OS_VERSION_STR="14.0" fi diff --git a/scripts/windows/build.bat b/scripts/windows/build.bat index 591834a6..8f820473 100644 --- a/scripts/windows/build.bat +++ b/scripts/windows/build.bat @@ -23,7 +23,7 @@ set CRC32C_INSTALL_PREFIX=%cd%\build\%CONFIGURATION% @rem Unfortunately pyenv for Windows has an out-of-date versions list. Choco's @rem installer seems to have some problems with installing multiple versions at @rem once, so as a workaround, we will install and then uninstall every version. -FOR %%P IN (3.9, 3.10, 3.11, 3.12) DO ( +FOR %%P IN (3.9, 3.10, 3.11, 3.12, 3.13.1) DO ( echo "Installing Python version %%P" choco install python --version=%%P -y --no-progress diff --git a/scripts/windows/test.bat b/scripts/windows/test.bat index 5e9d1280..c7f28501 100644 --- a/scripts/windows/test.bat +++ b/scripts/windows/test.bat @@ -25,5 +25,8 @@ py -%PYTHON_VERSION%-64 -m pip install --no-index --find-links=wheels google-crc py -%PYTHON_VERSION%-64 ./scripts/check_crc32c_extension.py +@rem pyreadline is removed here because pytest will opportunistically use it if +@rem available, but the installed version is too old to work. +py -%PYTHON_VERSION%-64 -m pip uninstall -y pyreadline py -%PYTHON_VERSION%-64 -m pip install pytest py -%PYTHON_VERSION%-64 -m pytest tests