Skip to content

Commit 22a1ce8

Browse files
committed
Fix for cmake and new workflow strategy
1 parent 7ce4f93 commit 22a1ce8

File tree

3 files changed

+47
-50
lines changed

3 files changed

+47
-50
lines changed

.github/workflows/python_wheel_build.yml

Lines changed: 37 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -14,68 +14,65 @@ on:
1414
- cron: '01 1 * * *'
1515

1616
jobs:
17-
python_wheel:
18-
runs-on:
19-
- self-hosted
20-
- linux
21-
- x64
22-
env:
23-
WORKDIR: /home/runner/work/root
24-
container:
25-
image: registry.cern.ch/root-ci/ubuntu2404:buildready
26-
options: '--security-opt label=disable --user="ubuntu" --rm'
17+
cp38-manylinux_x86_64:
18+
runs-on: ubuntu-latest
2719
steps:
2820
- name: Checkout
2921
uses: actions/checkout@v4
3022
with:
3123
ref: ${{ inputs.branch }}
3224

33-
- name: Setup Python
34-
uses: actions/setup-python@v5
25+
# - name: Build wheel
26+
# uses: pypa/[email protected]
27+
# env:
28+
# CIBW_BUILD: cp38-manylinux_x86_64
29+
# with:
30+
# output-dir: ${{ env.WORKDIR }}/wheelhouse
31+
32+
- name: Mock step
33+
run: |
34+
mkdir -p wheelhouse
35+
touch wheelhouse/wheel1.whl
36+
touch wheelhouse/wheel2.whl
37+
38+
- name: Upload wheel
39+
uses: actions/upload-artifact@v4
3540
with:
36-
python-version: 3.13
41+
name: cp38-manylinux_x86_64
42+
path: wheelhouse/*
3743

38-
# - name: Set up Python Virtual Environment
39-
# run: |
40-
# python -m venv /py-venv/cibuildwheel-env
41-
# . /py-venv/cibuildwheel-env/bin/activate
42-
# echo PATH=$PATH >> $GITHUB_ENV
44+
create_and_upload_wheel_registry:
45+
needs: cp38-manylinux_x86_64
46+
runs-on: ubuntu-latest
47+
steps:
4348

44-
- name: Update repositories
45-
run: apt-get update
49+
- name: Download artifact
50+
uses: actions/download-artifact@v4
51+
with:
52+
name: cp38-manylinux_x86_64
53+
54+
- name: Setup Python
55+
uses: actions/setup-python@v5
4656

4757
- name: Install Kerberos utilities
48-
run: apt-get install -y krb5-user
58+
run: sudo apt-get install -y krb5-user
4959

5060
- name: Install XRootD client
51-
run: apt-get -y install xrootd-client
52-
53-
- name: Configure large ccache
54-
if: ${{ matrix.is_special }}
55-
run: |
56-
ccache -o max_size=5G
57-
ccache -p || true
58-
ccache -s || true
59-
60-
- name: Build wheels
61-
env:
62-
PIP_ROOT_USER_ACTION: ignore
63-
PIP_DISABLE_PIP_VERSION_CHECK: 1
64-
uses: pypa/[email protected]
65-
with:
66-
output-dir: ${{ env.WORKDIR }}/wheelhouse
61+
run: sudo apt-get -y install xrootd-client
6762

6863
- name: Create PEP503-compliant wheel registry
6964
run: |
65+
mkdir -p wheelhouse
66+
mv *.whl wheelhouse
7067
python -m pip install --upgrade pip
7168
python -m pip install simple503
72-
simple503 ${{ env.WORKDIR }}/wheelhouse
69+
simple503 wheelhouse
7370
7471
- name: Upload wheel registry to github
7572
uses: actions/upload-artifact@v4
7673
with:
77-
name: cibw-wheels-test
78-
path: ${{ env.WORKDIR }}/wheelhouse/*
74+
name: cibw-wheels-registry
75+
path: wheelhouse
7976

8077
- name: Upload wheel to EOS
8178
env:

bindings/pyroot/cppyy/cppyy-backend/CMakeLists.txt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ if(MSVC)
3131
endif()
3232
# Set the suffix to '.so' and the prefix to 'lib'
3333
set_target_properties(${libname} PROPERTIES ${ROOT_LIBRARY_PROPERTIES})
34+
35+
target_link_libraries(${libname} Core ${CMAKE_DL_LIBS})
36+
37+
# cppyy uses ROOT headers from binary directory
38+
add_dependencies(${libname} move_headers)
39+
40+
set_property(GLOBAL APPEND PROPERTY ROOT_EXPORTED_TARGETS ${libname})
41+
3442
# It is crucial to add the path to the other ROOT libraries for compatibility with pip build backends.
3543
# After the `pip install` step, the target install user directory will look like:
3644
# site-packages/
@@ -42,14 +50,6 @@ set_target_properties(${libname} PROPERTIES ${ROOT_LIBRARY_PROPERTIES})
4250
# -- ROOT/
4351
# With most of the ROOT libraries being stored in `ROOT/lib`. The RPATH must then be updated for the CPython extension
4452
# shared libraries.
45-
set_target_properties(${libname} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:$ORIGIN/ROOT/lib")
46-
target_link_libraries(${libname} Core ${CMAKE_DL_LIBS})
47-
48-
# cppyy uses ROOT headers from binary directory
49-
add_dependencies(${libname} move_headers)
50-
51-
set_property(GLOBAL APPEND PROPERTY ROOT_EXPORTED_TARGETS ${libname})
52-
5353
if(NOT MSVC)
5454
# Make sure that relative RUNPATH to main ROOT libraries is always correct.
5555

@@ -64,7 +64,8 @@ if(NOT MSVC)
6464
else()
6565
set_target_properties(${libname} PROPERTIES
6666
BUILD_RPATH "$ORIGIN/${pymoduledir_to_libdir_build}"
67-
INSTALL_RPATH "$ORIGIN/${pymoduledir_to_libdir_install}"
67+
# ATTENTION: CRUCIAL! See comment above
68+
INSTALL_RPATH "$ORIGIN/${pymoduledir_to_libdir_install}:${CMAKE_INSTALL_RPATH}:$ORIGIN/ROOT/lib"
6869
)
6970
endif()
7071

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ root = "ROOT._rootcli:main"
2222
[tool.cibuildwheel]
2323
# Increase pip debugging output
2424
build-verbosity = 1
25-
build="cp3{8,9,10,11,12,13}-manylinux_x86_64"
2625
manylinux-x86_64-image = "manylinux_2_28"
2726

2827
# Install system libraries

0 commit comments

Comments
 (0)