From 57ccdb7f4cf5a4f80fc934ab4a18b6f175b31a92 Mon Sep 17 00:00:00 2001 From: Alex Vergara Gil Date: Mon, 12 Jan 2026 15:34:55 +0100 Subject: [PATCH 01/13] Add python 3.14 support --- .github/workflows/main.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f024f09d1..235dd51f5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,7 +62,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-24.04, macos-15, windows-2025] - python-version: ['3.10', '3.11', '3.12', '3.13'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] exclude: - os: macos-15 python-version: '3.10' @@ -95,7 +95,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-24.04-arm, macos-15-intel] - python-version: ['3.10', '3.11', '3.12', '3.13'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] exclude: - os: macos-15 python-version: '3.10' @@ -128,7 +128,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-24.04] - python-version: ['3.10', '3.11', '3.12', '3.13'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] steps: - name: Checkout github repo uses: actions/checkout@v4 @@ -168,6 +168,8 @@ jobs: export PYTHONFOLDER="cp312-cp312" elif [ ${{ matrix.python-version }} == "3.13" ]; then export PYTHONFOLDER="cp313-cp313" + elif [ ${{ matrix.python-version }} == "3.14" ]; then + export PYTHONFOLDER="cp314-cp314" fi mkdir -p $HOME/software docker run --rm -e "PYTHONFOLDER=${PYTHONFOLDER}" -v $GITHUB_WORKSPACE:/home tbaudier/opengate_core:${{ env.GEANT4_VERSION }}_novis /home/.github/workflows/createWheelLinux_novis.sh @@ -278,7 +280,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-24.04, macos-15, windows-2025] - python-version: ['3.10', '3.11', '3.12', '3.13'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] exclude: - os: macos-15 python-version: '3.10' From b7f11bba69f40def9632069a6330b0719d598380 Mon Sep 17 00:00:00 2001 From: Alex Vergara Gil Date: Mon, 12 Jan 2026 16:16:25 +0100 Subject: [PATCH 02/13] Update ci_build_wheel_ubuntu.sh --- .github/workflows/actions_build/ci_build_wheel_ubuntu.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/actions_build/ci_build_wheel_ubuntu.sh b/.github/workflows/actions_build/ci_build_wheel_ubuntu.sh index 6ce115186..4ee51698a 100755 --- a/.github/workflows/actions_build/ci_build_wheel_ubuntu.sh +++ b/.github/workflows/actions_build/ci_build_wheel_ubuntu.sh @@ -10,6 +10,8 @@ elif [ ${MATRIX_PYTHON_VERSION} == "3.12" ]; then export PYTHONFOLDER="cp312-cp312" elif [ ${MATRIX_PYTHON_VERSION} == "3.13" ]; then export PYTHONFOLDER="cp313-cp313" +elif [ ${MATRIX_PYTHON_VERSION} == "3.14" ]; then + export PYTHONFOLDER="cp314-cp314" fi mkdir -p $HOME/software if [ ${MATRIX_OS} == "ubuntu-24.04-arm" ]; then @@ -19,4 +21,4 @@ docker run --rm -e "PYTHONFOLDER=${PYTHONFOLDER}" -v $GITHUB_WORKSPACE:/home tba ls wheelhouse rm -rf dist mv wheelhouse dist -sudo chown -R runner:docker dist \ No newline at end of file +sudo chown -R runner:docker dist From 85ef2892396533e4f5e29b1792c24795e5799cc5 Mon Sep 17 00:00:00 2001 From: Alex Vergara Gil Date: Mon, 12 Jan 2026 16:17:22 +0100 Subject: [PATCH 03/13] Update ci_build_wheel_windows.sh --- .github/workflows/actions_build/ci_build_wheel_windows.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/actions_build/ci_build_wheel_windows.sh b/.github/workflows/actions_build/ci_build_wheel_windows.sh index b2a9cabae..0b82fa63d 100755 --- a/.github/workflows/actions_build/ci_build_wheel_windows.sh +++ b/.github/workflows/actions_build/ci_build_wheel_windows.sh @@ -49,6 +49,8 @@ elif [[ ${MATRIX_PYTHON_VERSION} == "3.12" ]]; then export CIBW_BUILD="cp312-win_amd64" elif [[ ${MATRIX_PYTHON_VERSION} == "3.13" ]]; then export CIBW_BUILD="cp313-win_amd64" +elif [[ ${MATRIX_PYTHON_VERSION} == "3.14" ]]; then + export CIBW_BUILD="cp314-win_amd64" fi find $HOME/software/geant4/bin/ -iname "*.dll" ls $HOME/software/geant4/bin/BuildProducts/Release/bin @@ -60,4 +62,4 @@ mkdir core/dist2 pip install pefile machomachomangler ls core/dist python $GITHUB_WORKSPACE\\.github\\workflows\\delocateWindows.py core\\dist -w core\\dist2 -d C:\\Users\\runneradmin\\software\\geant4\\bin\\BuildProducts\\Release\\bin -mv core/dist2 dist \ No newline at end of file +mv core/dist2 dist From 5fcc38669228d5c2e901aa02747d0ead9c28dac2 Mon Sep 17 00:00:00 2001 From: Alex Vergara Gil Date: Mon, 12 Jan 2026 16:19:15 +0100 Subject: [PATCH 04/13] Update pyproject.toml --- pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fc22555d8..371a93364 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,14 +24,15 @@ description = "Simulation for Medical Physics" license = { file = "LICENSE.md" } classifiers = [ "Programming Language :: Python", - "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", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: PyPy", "Operating System :: OS Independent", ] -requires-python = ">=3.9" +requires-python = ">=3.10" [project.optional-dependencies] novis = ["opengate-core-novis"] From de5c37cb0bf0fdcdb5ae6415d7fed1b230d3df3c Mon Sep 17 00:00:00 2001 From: Alex Vergara Gil Date: Mon, 12 Jan 2026 16:20:38 +0100 Subject: [PATCH 05/13] Update action.yml --- .github/workflows/actions_tests/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/actions_tests/action.yml b/.github/workflows/actions_tests/action.yml index 3acd0f513..875ae96d6 100755 --- a/.github/workflows/actions_tests/action.yml +++ b/.github/workflows/actions_tests/action.yml @@ -27,6 +27,8 @@ runs: export PYTHONFOLDER="cp312-cp312" elif [[ ${{ matrix.python-version }} == "3.13" ]]; then export PYTHONFOLDER="cp313-cp313" + elif [[ ${{ matrix.python-version }} == "3.14" ]]; then + export PYTHONFOLDER="cp314-cp314" fi if [[ ${{ matrix.os }} == "ubuntu-24.04" ]]; then export OSNAME="manylinux" From 2ddb864229e755d7085beb6453e1a5b03991b39b Mon Sep 17 00:00:00 2001 From: Alex Vergara Gil Date: Thu, 15 Jan 2026 12:36:21 +0100 Subject: [PATCH 06/13] Update action.yml update setup-python to version 6 as recommended --- .github/workflows/actions_build/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/actions_build/action.yml b/.github/workflows/actions_build/action.yml index 950297b74..40127aa7e 100755 --- a/.github/workflows/actions_build/action.yml +++ b/.github/workflows/actions_build/action.yml @@ -9,7 +9,7 @@ runs: using: "composite" steps: - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ inputs.python-version }} - name: Get OS version From 5d2505d91030bd2aafd682b4d66f8f7276d3efb5 Mon Sep 17 00:00:00 2001 From: Alex Vergara Gil Date: Fri, 16 Jan 2026 13:09:37 +0100 Subject: [PATCH 07/13] Update ci_build_wheel_macos.sh add python version for macos defined by build matrix --- .github/workflows/actions_build/ci_build_wheel_macos.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/actions_build/ci_build_wheel_macos.sh b/.github/workflows/actions_build/ci_build_wheel_macos.sh index 958a60590..384b37ebb 100755 --- a/.github/workflows/actions_build/ci_build_wheel_macos.sh +++ b/.github/workflows/actions_build/ci_build_wheel_macos.sh @@ -2,8 +2,8 @@ set -e source $GITHUB_WORKSPACE/env_dump.txt -brew install python@3.12 || true -brew link --overwrite python@3.12 +brew install python@${MATRIX_PYTHON_VERSION} || true +brew link --overwrite python@${MATRIX_PYTHON_VERSION} #brew update #rm -rf /usr/local/bin/python3.1*-config /usr/local/bin/2to3-3.1* /usr/local/bin/idle3.1* /usr/local/bin/pydoc3.1* /usr/local/bin/python3.1* #rm -rf /usr/local/bin/python3-config /usr/local/bin/2to3 /usr/local/bin/idle3 /usr/local/bin/pydoc3 /usr/local/bin/python3 @@ -94,4 +94,4 @@ if [[ ${MATRIX_OS} == "macos-15-intel" ]]; then find . -name '*whl' -exec bash -c ' mv $0 ${0/macosx_15_0/macosx_10_9}' {} \; fi cd ../.. -mv core/dist . \ No newline at end of file +mv core/dist . From 9a1df44a3b22bd6698263135fb373c5bca3e61fb Mon Sep 17 00:00:00 2001 From: Alex Vergara Gil Date: Fri, 16 Jan 2026 13:20:37 +0100 Subject: [PATCH 08/13] Update action.yml added python version for macos --- .github/workflows/actions_build/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/actions_build/action.yml b/.github/workflows/actions_build/action.yml index 40127aa7e..86f6d55c2 100755 --- a/.github/workflows/actions_build/action.yml +++ b/.github/workflows/actions_build/action.yml @@ -74,6 +74,7 @@ runs: if: (inputs.os == 'macos-15') || (inputs.os == 'macos-15-intel') env: MATRIX_OS: ${{ inputs.os }} + MATRIX_PYTHON_VERSION: ${{ inputs.python-version }} MATRIX_CACHE: ${{ steps.cache_opengate_core_dependencies.outputs.cache-hit }} shell: bash -l {0} run: | From 01f1d39463ff762385cf3ce1c89d53464997f02d Mon Sep 17 00:00:00 2001 From: Alex Vergara Gil Date: Fri, 16 Jan 2026 13:38:29 +0100 Subject: [PATCH 09/13] Update ci_build_wheel_macos.sh Add setuptools as it's not always installed by default --- .github/workflows/actions_build/ci_build_wheel_macos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/actions_build/ci_build_wheel_macos.sh b/.github/workflows/actions_build/ci_build_wheel_macos.sh index 384b37ebb..f911c9705 100755 --- a/.github/workflows/actions_build/ci_build_wheel_macos.sh +++ b/.github/workflows/actions_build/ci_build_wheel_macos.sh @@ -23,7 +23,7 @@ conda list which python python --version export PATH="/usr/local/miniconda/envs/opengate_core/bin/:$PATH" -pip install wget colored +pip install wget colored setuptools pip install wheel delocate if [[ ${MATRIX_OS} == "macos-15-intel" ]]; then conda install conda-forge::qt6-main conda-forge::qt6-3d From f23cb3c21d478ee35f6a07b08d4746bf6b802772 Mon Sep 17 00:00:00 2001 From: Alex Vergara Gil Date: Fri, 16 Jan 2026 14:22:15 +0100 Subject: [PATCH 10/13] Update ci_build_wheel_windows.sh CI_Build_Wheel >= 3.2.1 for python 3.14 support https://github.com/pypa/cibuildwheel/releases --- .github/workflows/actions_build/ci_build_wheel_windows.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/actions_build/ci_build_wheel_windows.sh b/.github/workflows/actions_build/ci_build_wheel_windows.sh index 0b82fa63d..921f4120c 100755 --- a/.github/workflows/actions_build/ci_build_wheel_windows.sh +++ b/.github/workflows/actions_build/ci_build_wheel_windows.sh @@ -51,6 +51,7 @@ elif [[ ${MATRIX_PYTHON_VERSION} == "3.13" ]]; then export CIBW_BUILD="cp313-win_amd64" elif [[ ${MATRIX_PYTHON_VERSION} == "3.14" ]]; then export CIBW_BUILD="cp314-win_amd64" + pip install cibuildwheel>=3.2.1 fi find $HOME/software/geant4/bin/ -iname "*.dll" ls $HOME/software/geant4/bin/BuildProducts/Release/bin From df457b389e2249a5b96eb61216deae8452385940 Mon Sep 17 00:00:00 2001 From: Alex Vergara Gil Date: Fri, 16 Jan 2026 14:41:11 +0100 Subject: [PATCH 11/13] Update ci_build_wheel_windows.sh --- .github/workflows/actions_build/ci_build_wheel_windows.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/actions_build/ci_build_wheel_windows.sh b/.github/workflows/actions_build/ci_build_wheel_windows.sh index 921f4120c..7b7f84491 100755 --- a/.github/workflows/actions_build/ci_build_wheel_windows.sh +++ b/.github/workflows/actions_build/ci_build_wheel_windows.sh @@ -11,7 +11,7 @@ which python python --version export PATH="/usr/local/miniconda/envs/opengate_core/bin/:$PATH" pip install wheel wget colored -pip install cibuildwheel==2.21.1 +pip install cibuildwheel==3.3.0 which pip mkdir -p $HOME/software if [ "${MATRIX_CACHE}" != 'true' ]; then @@ -51,7 +51,6 @@ elif [[ ${MATRIX_PYTHON_VERSION} == "3.13" ]]; then export CIBW_BUILD="cp313-win_amd64" elif [[ ${MATRIX_PYTHON_VERSION} == "3.14" ]]; then export CIBW_BUILD="cp314-win_amd64" - pip install cibuildwheel>=3.2.1 fi find $HOME/software/geant4/bin/ -iname "*.dll" ls $HOME/software/geant4/bin/BuildProducts/Release/bin From 00f2a87ab058b86d3d0d762d12df2188d95605bd Mon Sep 17 00:00:00 2001 From: Alex Vergara Gil Date: Fri, 16 Jan 2026 15:03:10 +0100 Subject: [PATCH 12/13] Update createWheelLinux.sh python 3.14 is not installed in default location, but we can call python and pip directly --- .github/workflows/createWheelLinux.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/createWheelLinux.sh b/.github/workflows/createWheelLinux.sh index 1a5495f78..19fbdc5e2 100755 --- a/.github/workflows/createWheelLinux.sh +++ b/.github/workflows/createWheelLinux.sh @@ -2,6 +2,8 @@ set -e -x echo ${PYTHONFOLDER} +echo $(which pip) +echo $(which python) cd /home/core/ export PATH=/software/cmake/cmake/bin/:${PATH} source /software/geant4/bin/geant4make.sh @@ -10,8 +12,10 @@ export CMAKE_PREFIX_PATH=/software/geant4/bin:/software/itk/bin/:${CMAKE_PREFIX_ mkdir opengate_core/plugins cp -r /lib64/qt6/plugins/platforms/* opengate_core/plugins/ cp -r /lib64/qt6/plugins/imageformats opengate_core/plugins/ -/opt/python/${PYTHONFOLDER}/bin/pip install wget colored setuptools -/opt/python/${PYTHONFOLDER}/bin/python setup.py sdist bdist_wheel +#/opt/python/${PYTHONFOLDER}/bin/pip install wget colored setuptools +#/opt/python/${PYTHONFOLDER}/bin/python setup.py sdist bdist_wheel +pip install wget colored setuptools +python setup.py sdist bdist_wheel archi=`uname -m` if [ "$(uname -m)" = "aarch64" ]; then auditwheel repair /home/core/dist/*.whl -w /software/wheelhouse/ --plat "manylinux_2_34_aarch64" From 00e9ea431d7fccbf8bf8ec28f7be7d833324a528 Mon Sep 17 00:00:00 2001 From: Alex Vergara Gil Date: Fri, 16 Jan 2026 15:15:38 +0100 Subject: [PATCH 13/13] add 3.10 compatibility to windows guess python 3.14 location in linux --- .../workflows/actions_build/ci_build_wheel_windows.sh | 6 +++++- .github/workflows/createWheelLinux.sh | 9 +++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/actions_build/ci_build_wheel_windows.sh b/.github/workflows/actions_build/ci_build_wheel_windows.sh index 7b7f84491..20b0f8420 100755 --- a/.github/workflows/actions_build/ci_build_wheel_windows.sh +++ b/.github/workflows/actions_build/ci_build_wheel_windows.sh @@ -11,7 +11,11 @@ which python python --version export PATH="/usr/local/miniconda/envs/opengate_core/bin/:$PATH" pip install wheel wget colored -pip install cibuildwheel==3.3.0 +if [[ ${MATRIX_PYTHON_VERSION} == "3.10" ]]; then + pip install cibuildwheel==2.21.1 +else + pip install cibuildwheel==3.3.0 +fi which pip mkdir -p $HOME/software if [ "${MATRIX_CACHE}" != 'true' ]; then diff --git a/.github/workflows/createWheelLinux.sh b/.github/workflows/createWheelLinux.sh index 19fbdc5e2..bcfacd519 100755 --- a/.github/workflows/createWheelLinux.sh +++ b/.github/workflows/createWheelLinux.sh @@ -2,8 +2,7 @@ set -e -x echo ${PYTHONFOLDER} -echo $(which pip) -echo $(which python) +ls -l /opt/python/ cd /home/core/ export PATH=/software/cmake/cmake/bin/:${PATH} source /software/geant4/bin/geant4make.sh @@ -12,10 +11,8 @@ export CMAKE_PREFIX_PATH=/software/geant4/bin:/software/itk/bin/:${CMAKE_PREFIX_ mkdir opengate_core/plugins cp -r /lib64/qt6/plugins/platforms/* opengate_core/plugins/ cp -r /lib64/qt6/plugins/imageformats opengate_core/plugins/ -#/opt/python/${PYTHONFOLDER}/bin/pip install wget colored setuptools -#/opt/python/${PYTHONFOLDER}/bin/python setup.py sdist bdist_wheel -pip install wget colored setuptools -python setup.py sdist bdist_wheel +/opt/python/${PYTHONFOLDER}/bin/pip install wget colored setuptools +/opt/python/${PYTHONFOLDER}/bin/python setup.py sdist bdist_wheel archi=`uname -m` if [ "$(uname -m)" = "aarch64" ]; then auditwheel repair /home/core/dist/*.whl -w /software/wheelhouse/ --plat "manylinux_2_34_aarch64"