Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/python_wheel_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
strategy:
fail-fast: false
matrix:
python: [cp310, cp311, cp312, cp313, cp314]
python: [cp311, cp312, cp313, cp314]
config:
# `label` is a unique artifact name for each build
- runner: macos-15
Expand Down Expand Up @@ -75,7 +75,7 @@
strategy:
fail-fast: false
matrix:
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python: ["3.11", "3.12", "3.13", "3.14"]
test_config:
# each runner tests the wheel built on it
- runner: macos-15
Expand Down Expand Up @@ -108,7 +108,7 @@
python-version: ${{ matrix.python }}

- name: Install produced wheel
run: |

Check failure on line 111 in .github/workflows/python_wheel_build.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

shellcheck reported issue in this script: SC2012:info:3:9: Use find instead of ls to better handle non-alphanumeric filenames
ls -R wheels
PY_VER=$(python -c "import sys; print(f'cp{sys.version_info.major}{sys.version_info.minor}')")
WHEEL=$(ls wheels/*${PY_VER}*.whl | head -n 1)
Expand Down Expand Up @@ -143,7 +143,7 @@
uses: actions/setup-python@v5

- name: Create PEP503-compliant wheel registry
run: |

Check failure on line 146 in .github/workflows/python_wheel_build.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

shellcheck reported issue in this script: SC2035:info:2:4: Use ./*glob* or -- *glob* so names with dashes won't become options
mkdir -p wheelhouse
mv *.whl wheelhouse
python -m pip install --upgrade pip
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/root-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
- self-hosted
- ${{ matrix.platform }}

name: |

Check failure on line 136 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

property "overrides" is not defined in object type {arch: string; is_special: bool; platform: string}
${{ matrix.platform }} ${{ matrix.arch }}
${{ (github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' && join( matrix.overrides, ', ' )) || '' }}

Expand All @@ -152,8 +152,8 @@
if: github.event_name == 'pull_request'
env:
GITHUB_PR_ORIGIN: ${{ github.event.pull_request.head.repo.clone_url }}
OVERRIDES: ${{ join( matrix.overrides, ' ') }}

Check failure on line 155 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

property "overrides" is not defined in object type {arch: string; is_special: bool; platform: string}
run: |

Check failure on line 156 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

"github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details
[ -d "${VIRTUAL_ENV_DIR}" ] && source ${VIRTUAL_ENV_DIR}/bin/activate
echo "Python is now $(which python3) $(python3 --version)"
src/.github/workflows/root-ci-config/build_root.py \
Expand Down Expand Up @@ -185,7 +185,7 @@
- name: Nightlies and push to branch
if: github.event_name == 'schedule' || github.event_name == 'push'
env:
OVERRIDES: ${{ github.event_name == 'push' && format('{0} {1} {2}', '--overrides', env.GLOBAL_OVERRIDES, join( matrix.overrides, ' ')) || '' }}

Check failure on line 188 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

property "overrides" is not defined in object type {arch: string; is_special: bool; platform: string}
BASE_REF: ${{ github.event_name == 'push' && github.ref_name || inputs.ref_name }}
run: |
[ -d "${VIRTUAL_ENV_DIR}" ] && source ${VIRTUAL_ENV_DIR}/bin/activate
Expand Down Expand Up @@ -402,6 +402,7 @@
overrides: ["CMAKE_BUILD_TYPE=Debug"]
- image: alma10
- image: ubuntu22
python_venv: "/py-venv-3.12/ROOT-CI"
overrides: ["imt=Off", "CMAKE_BUILD_TYPE=Debug"]
- image: ubuntu2404
overrides: ["CMAKE_BUILD_TYPE=Debug"]
Expand Down
16 changes: 6 additions & 10 deletions bindings/pyroot/pythonizations/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,12 @@ set(libname ROOTPythonizations)

add_library(${libname} SHARED ${cpp_sources})

# Use what is in the limited API since Python 3.11, if we build with a lower
# Python version, we don't bother using the limited API.
if (Python3_VERSION VERSION_GREATER_EQUAL "3.11")
# On Windows we can't use the stable ABI yet: it requires linking against a
# different libpython, so as long as we don't build all translation units in
# the ROOT Pythonization library with the stable ABI we should not use it.
# Free-threaded (Py_GIL_DISABLED) interpreters don't support the limited API.
if(NOT MSVC AND NOT Python3_GIL_DISABLED)
target_compile_options(${libname} PRIVATE -DPy_LIMITED_API=0x030B0000)
endif()
# On Windows we can't use the stable ABI yet: it requires linking against a
# different libpython, so as long as we don't build all translation units in
# the ROOT Pythonization library with the stable ABI we should not use it.
# Free-threaded (Py_GIL_DISABLED) interpreters don't support the limited API.
if(NOT MSVC AND NOT Python3_GIL_DISABLED)
target_compile_options(${libname} PRIVATE -DPy_LIMITED_API=0x030B0000)
endif()

# Set the suffix to '.so' and the prefix to 'lib'
Expand Down
16 changes: 6 additions & 10 deletions bindings/tpython/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,12 @@ ROOT_STANDARD_LIBRARY_PACKAGE(ROOTTPython
Python3::Python
)

# Use what is in the limited API since Python 3.10, if we build with a lower
# Python version, we don't bother using the limited API.
if (Python3_VERSION VERSION_GREATER_EQUAL "3.10")
# On Windows we can't use the stable ABI yet: it requires linking against a
# different libpython, so as long as we don't build all translation units in
# the ROOT Pythonization library with the stable ABI we should not use it.
# Free-threaded (Py_GIL_DISABLED) interpreters don't support the limited API.
if(NOT MSVC AND NOT Python3_GIL_DISABLED)
target_compile_options(ROOTTPython PRIVATE -DPy_LIMITED_API=0x030A0000)
endif()
# On Windows we can't use the stable ABI yet: it requires linking against a
# different libpython, so as long as we don't build all translation units in
# the ROOT Pythonization library with the stable ABI we should not use it.
# Free-threaded (Py_GIL_DISABLED) interpreters don't support the limited API.
if(NOT MSVC AND NOT Python3_GIL_DISABLED)
target_compile_options(ROOTTPython PRIVATE -DPy_LIMITED_API=0x030A0000)
endif()

if(MSVC)
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/SearchInstalledSoftware.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ endif()
if(tmva-pymva)
list(APPEND python_components NumPy)
endif()
find_package(Python3 3.10 COMPONENTS ${python_components})
find_package(Python3 3.11 COMPONENTS ${python_components})

# Detect whether the found Python interpreter is a free-threaded build
# (Py_GIL_DISABLED is defined in pyconfig.h). The limited C API is not
Expand Down
Loading