Skip to content

Commit dce4b0d

Browse files
committed
bugfix
1 parent fcb40f7 commit dce4b0d

6 files changed

Lines changed: 25 additions & 35 deletions

File tree

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
11
name: "Python Bindings Unit Tests"
2-
32
on:
43
push:
54
branches:
65
- main
76
pull_request:
87
branches:
98
- main
10-
119
concurrency:
1210
group: build-python-${{ github.event.pull_request.number || github.ref }}
1311
cancel-in-progress: true
14-
1512
jobs:
1613
python-tests:
1714
name: "Test Python bindings"
1815
strategy:
1916
matrix:
20-
os: [ 'ubuntu-24.04', 'macos-15-intel', 'macos-26' ]
17+
on: [ 'ubuntu-24.04', 'macos-15-intel', 'macos-26' ]
2118
python: [ '3.10', '3.11', '3.12', '3.13' ]
2219

23-
runs-on: ${{ matrix.os }}
20+
runs-on: ${{ matrix.on }}
2421
env:
2522
INSTALL_PREFIX: "/usr/local"
2623

@@ -35,37 +32,27 @@ jobs:
3532

3633
# Install platform build dependencies
3734
- name: "Install system packages (Ubuntu)"
38-
if: startsWith(matrix.os, 'ubuntu-')
35+
if: startsWith(matrix.on, 'ubuntu-')
3936
run: sudo apt-get update && sudo apt-get install -y ninja-build g++ cmake
4037

4138
- name: "Setup Homebrew (macOS)"
42-
if: startsWith(matrix.os, 'macos-')
39+
if: startsWith(matrix.on, 'macos-')
4340
uses: Homebrew/actions/setup-homebrew@main
4441

4542
- name: "Install system packages (macOS)"
46-
if: startsWith(matrix.os, 'macos-')
43+
if: startsWith(matrix.on, 'macos-')
4744
run: brew install ninja gcc cmake
4845

4946
# Install Python build dependencies
50-
- name: "Install Python build tools"
47+
- name: "Build and Install Python wheel"
5148
run: |
5249
python -m pip install --upgrade pip
5350
python -m pip install -r build-requirements.txt
54-
python -m pip install build pytest
55-
56-
# Build wheel from pyproject.toml
57-
- name: "Build Python wheel"
58-
run: |
5951
python -m build
60-
ls -lh dist/
61-
62-
# Install built wheel for testing
63-
- name: "Install built package"
64-
run: |
6552
pip install dist/*.whl
66-
python -c "import importlib.metadata; print('Installed:', importlib.metadata.version('py-capio-cl'))"
6753
6854
# Run unit tests
6955
- name: "Run Python tests"
7056
run: |
57+
python -m pip install -r test-requirements.txt
7158
pytest -v tests/python/test_*

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ project(CAPIO-CL
99
VERSION 1.0.0
1010
)
1111

12-
# Used to infer release when building pyhton bindings
13-
file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt" "${PROJECT_VERSION}")
14-
15-
1612
set(CMAKE_CXX_STANDARD 17)
1713
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
1814
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,15 @@ These bindings expose the core C++ APIs—such as `Engine`, `Parser`, directly
9393
to Python, allowing the CAPIO-CL logic to be used within python projects.
9494

9595
### 🔧 Building the Bindings
96-
To include Python support when building CAPIO-CL:
96+
You can build and install the Python bindings directly from the CAPIO-CL source tree using:
9797

9898
```bash
99-
cmake -DBUILD_PYTHON_BINDINGS=ON ..
100-
cmake --build . --target py_capio_cl
99+
pip install --upgrade pip
100+
pip install -r build-requirements.txt
101+
python -m build
102+
pip install dst/*.whl
101103
```
104+
Now you will be able to directly import the package **py_capio_cl** in your project!
102105

103106
---
104107

build-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
build
1+
build==1.3.0

pyproject.toml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
[build-system]
22
requires = [
3-
"scikit-build-core[pyproject]",
4-
"pybind11",
5-
"setuptools",
6-
"wheel"
3+
"scikit-build-core[pyproject]==0.11.6",
4+
"pybind11==3.0.1",
5+
"setuptools==80.9.0",
6+
"wheel==0.45.1"
77
]
88
build-backend = "scikit_build_core.build"
99

1010
[project]
1111
name = "py_capio_cl"
1212
dynamic = ["version"]
13-
description = "High-performance collective I/O bindings for CAPIO (pybind11)"
13+
description = "Python bindings for the CAPIO-CL coordination language"
1414
readme = "README.md"
1515
license = { text = "MIT" }
1616
requires-python = ">=3.10"
1717
authors = [
1818
{ name = "Marco Edoardo Santimaria", email = "marcoedoardo.santimaria@unito.it" }
1919
]
20-
urls = { Homepage = "https://github.com/High-Performance-IO/CAPIO-CL" }
21-
dependencies = []
20+
21+
[project.urls]
22+
Homepage = "https://capio.hpc4ai.it"
23+
Documentation = "https://capio.hpc4ai.it/docs/coord-language/"
24+
Repository = "https://github.com/High-Performance-IO/CAPIO-CL"
25+
Issues = "https://github.com/High-Performance-IO/CAPIO-CL/issues"
2226

2327

2428
[tool.scikit-build.metadata.version]

0 commit comments

Comments
 (0)