diff --git a/.circleci/config.yml b/.circleci/config.yml index 27c16c14c3..263a46c424 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,13 +1,13 @@ version: 2.1 orbs: - python: circleci/python@2.1.1 + python: circleci/python@3.0.0 jobs: manylinux2014-aarch64: parameters: - NRN_PYTHON_VERSION: + NRN_PYTHON_VERSION_MINOR: type: string NRN_NIGHTLY_UPLOAD: type: string @@ -31,8 +31,8 @@ jobs: -e NRN_RELEASE_UPLOAD \ -e SETUPTOOLS_SCM_PRETEND_VERSION \ -e NRN_BUILD_FOR_UPLOAD=1 \ - 'neuronsimulator/neuron_wheel:latest-gcc9-aarch64' \ - packaging/python/build_wheels.bash linux << parameters.NRN_PYTHON_VERSION >> coreneuron + 'neuronsimulator/neuron_wheel:latest-aarch64' \ + packaging/python/build_wheels.bash linux 3<< parameters.NRN_PYTHON_VERSION_MINOR >> coreneuron - store_artifacts: path: ./wheelhouse @@ -41,24 +41,16 @@ jobs: - run: name: Test manylinux AArch64 wheel command: | - - # install mpi dependencies sudo apt update + echo "deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu jammy main" | sudo tee /etc/apt/sources.list.d/deadsnakes-ppa.list && sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F23C5A6CF475977595C89F51BA6932366A755776 && sudo apt update + sudo apt update + # install mpi dependencies sudo apt install -y mpich openmpi-bin libopenmpi-dev libmpich-dev + version=3.<< parameters.NRN_PYTHON_VERSION_MINOR >> + # install Python from deadsnakes + sudo apt install -y python${version}-venv libpython${version}-dev g++ make - # choose available python versions from pyenv - pyenv_py_ver="" - case << parameters.NRN_PYTHON_VERSION >> in - 39) pyenv_py_ver="3.9" ;; - 310) pyenv_py_ver="3.10" ;; - 311) pyenv_py_ver="3.11" ;; - 312) pyenv_py_ver="3.12" ;; - *) echo "Error: pyenv python version not specified or not supported." && exit 1;; - esac - - env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $pyenv_py_ver --force - pyenv global $pyenv_py_ver - export PYTHON_EXE=$(which python) + export PYTHON_EXE=$(which python3.<< parameters.NRN_PYTHON_VERSION_MINOR >>) # test wheel packaging/python/test_wheels.sh $PYTHON_EXE $(ls -t wheelhouse/*.whl) @@ -86,7 +78,7 @@ workflows: - /circleci\/.*/ matrix: parameters: - NRN_PYTHON_VERSION: ["312"] + NRN_PYTHON_VERSION_MINOR: ["13"] NRN_NIGHTLY_UPLOAD: ["false"] nightly: @@ -101,5 +93,5 @@ workflows: - manylinux2014-aarch64: matrix: parameters: - NRN_PYTHON_VERSION: ["39", "310", "311", "312"] + NRN_PYTHON_VERSION_MINOR: ["9", "10", "11", "12", "13"] NRN_NIGHTLY_UPLOAD: ["true"] diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index a4e23da01c..f204e36421 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -24,7 +24,7 @@ on: env: PY_MIN_VERSION: '3.9' PY_MID_VERSION: '3.10' - PY_MAX_VERSION: '3.12' + PY_MAX_VERSION: '3.13' jobs: coverage: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2ef1052dd7..f9cc6e0051 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,7 +17,7 @@ on: - release/** env: - DEFAULT_PY_VERSION: '3.12' + DEFAULT_PY_VERSION: '3.13' jobs: documentation: diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index 48ec76d28e..adcf08c3b7 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -39,7 +39,7 @@ jobs: DESIRED_CMAKE_VERSION: 3.17 DYNAMIC_PYTHON_CMAKE_VERSION: 3.18 PY_MIN_VERSION: ${{ matrix.config.python_min_version || '3.9' }} - PY_MAX_VERSION: ${{ matrix.config.python_max_version || '3.12' }} + PY_MAX_VERSION: ${{ matrix.config.python_max_version || '3.13' }} MUSIC_INSTALL_DIR: /opt/MUSIC # hash of commit containing mpi4py 4 fix MUSIC_VERSION: '13f312338dcccebfe74d391b1b24f1b6d816ac6c' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 02f5f8374a..5970a4243f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -42,6 +42,9 @@ stages: python.version: '3.11' Python312: python.version: '3.12' + Python313: + python.version: '3.13' + steps: # Secure files documentation: @@ -74,7 +77,7 @@ stages: - script: | sudo apt update sudo apt install -y mpich openmpi-bin libopenmpi-dev libmpich-dev - displayName: 'Install Test System Depdendencies' + displayName: 'Install Test System Dependencies' - template: ci/azure-wheel-test-upload.yml @@ -102,6 +105,10 @@ stages: python.version: '3.12' python.org.version: '3.12.0' python.installer.name: 'macos11.pkg' + Python313: + python.version: '3.13' + python.org.version: '3.13.0' + python.installer.name: 'macos11.pkg' steps: diff --git a/ci/win_build_cmake.sh b/ci/win_build_cmake.sh index b82e430444..15cc217323 100755 --- a/ci/win_build_cmake.sh +++ b/ci/win_build_cmake.sh @@ -32,7 +32,7 @@ cd $BUILD_SOURCESDIRECTORY/build -DNRN_BINARY_DIST_BUILD=ON \ -DPYTHON_EXECUTABLE=/c/Python39/python.exe \ -DNRN_ENABLE_PYTHON_DYNAMIC=ON \ - -DNRN_PYTHON_DYNAMIC='c:/Python39/python.exe;c:/Python310/python.exe;c:/Python311/python.exe;c:/Python312/python.exe' \ + -DNRN_PYTHON_DYNAMIC='c:/Python39/python.exe;c:/Python310/python.exe;c:/Python311/python.exe;c:/Python312/python.exe;c:/Python313/python.exe' \ -DCMAKE_INSTALL_PREFIX='/c/nrn-install' \ -DMPI_CXX_LIB_NAMES:STRING=msmpi \ -DMPI_C_LIB_NAMES:STRING=msmpi \ diff --git a/ci/win_download_deps.cmd b/ci/win_download_deps.cmd index 40a9b44f49..166d44461a 100644 --- a/ci/win_download_deps.cmd +++ b/ci/win_download_deps.cmd @@ -7,6 +7,7 @@ pwsh -command Invoke-WebRequest -MaximumRetryCount 4 -OutFile python-3.9.exe htt pwsh -command Invoke-WebRequest -MaximumRetryCount 4 -OutFile python-3.10.exe https://www.python.org/ftp/python/3.10.0/python-3.10.0-amd64.exe || goto :error pwsh -command Invoke-WebRequest -MaximumRetryCount 4 -OutFile python-3.11.exe https://www.python.org/ftp/python/3.11.1/python-3.11.1-amd64.exe || goto :error pwsh -command Invoke-WebRequest -MaximumRetryCount 4 -OutFile python-3.12.exe https://www.python.org/ftp/python/3.12.1/python-3.12.1-amd64.exe || goto :error +pwsh -command Invoke-WebRequest -MaximumRetryCount 4 -OutFile python-3.13.exe https://www.python.org/ftp/python/3.13.0/python-3.13.0-amd64.exe || goto :error :: mpi pwsh -command Invoke-WebRequest -MaximumRetryCount 4 -OutFile msmpisetup.exe https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisetup.exe || goto :error diff --git a/ci/win_install_deps.cmd b/ci/win_install_deps.cmd index c12f32cdef..82a8c950d1 100644 --- a/ci/win_install_deps.cmd +++ b/ci/win_install_deps.cmd @@ -7,6 +7,7 @@ python-3.9.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustFo python-3.10.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python310 || goto :error python-3.11.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python311 || goto :error python-3.12.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python312 || goto :error +python-3.13.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python313 || goto :error :: fix msvcc version for all python3 pwsh -command "(Get-Content C:\Python39\Lib\distutils\cygwinccompiler.py) -replace 'elif msc_ver == ''1600'':', 'elif msc_ver == ''1927'':' | Out-File C:\Python39\Lib\distutils\cygwinccompiler.py" @@ -24,8 +25,10 @@ C:\Python39\python.exe -m pip install numpy cython || goto :error C:\Python310\python.exe -m pip install numpy cython || goto :error C:\Python311\python.exe -m pip install numpy cython || goto :error C:\Python312\python.exe -m pip install numpy cython || goto :error +C:\Python313\python.exe -m pip install numpy cython || goto :error :: setuptools 70.2 leads to an error C:\Python312\python.exe -m pip install setuptools==70.1.1 || goto :error +C:\Python313\python.exe -m pip install setuptools==70.1.1 || goto :error :: install nsis nsis-3.05-setup.exe /S || goto :error diff --git a/ci/win_test_installer.cmd b/ci/win_test_installer.cmd index bda5bbec7b..a6cf59a009 100644 --- a/ci/win_test_installer.cmd +++ b/ci/win_test_installer.cmd @@ -21,18 +21,21 @@ C:\Python39\python -c "import neuron; neuron.test(); quit()" || set "errorfound= C:\Python310\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" C:\Python311\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" C:\Python312\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" +C:\Python313\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" :: install oldest supported numpy C:\Python39\python.exe -m pip install -r packaging/python/oldest_numpy_requirements.txt || goto :error C:\Python310\python.exe -m pip install -r packaging/python/oldest_numpy_requirements.txt || goto :error C:\Python311\python.exe -m pip install -r packaging/python/oldest_numpy_requirements.txt || goto :error C:\Python312\python.exe -m pip install -r packaging/python/oldest_numpy_requirements.txt || goto :error +C:\Python313\python.exe -m pip install -r packaging/python/oldest_numpy_requirements.txt || goto :error :: test all pythons again C:\Python39\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" C:\Python310\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" C:\Python311\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" C:\Python312\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" +C:\Python313\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" :: run also using whatever is system python python -m pip install numpy diff --git a/packaging/python/Dockerfile b/packaging/python/Dockerfile index 36c7d0ad4f..95931335cc 100644 --- a/packaging/python/Dockerfile +++ b/packaging/python/Dockerfile @@ -93,4 +93,7 @@ COPY Dockerfile . # build wheels from there WORKDIR /root +# remove Python 3.13t since we do not support the free-threaded build yet +RUN rm -fr /opt/python/cp313-cp313t + ENV NMODL_PYLIB=/nrnwheel/python/lib/libpython3.10.so.1.0 diff --git a/packaging/python/oldest_numpy_requirements.txt b/packaging/python/oldest_numpy_requirements.txt index 4a77e64c2b..eb2e1a80db 100644 --- a/packaging/python/oldest_numpy_requirements.txt +++ b/packaging/python/oldest_numpy_requirements.txt @@ -3,3 +3,4 @@ numpy==1.21.6;python_version=='3.9' and platform_machine=='arm64' numpy==1.21.6;python_version=='3.10' numpy==1.23.5;python_version=='3.11' numpy==1.26.4;python_version=='3.12' +numpy==2.1.0;python_version=='3.13'