Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
40c9103
Build system for python-wrapper
Mar 14, 2025
7302be2
Added wrapper dependencies to Dockerfiles
Mar 14, 2025
3703c20
Python-Wrapper bindings
Mar 14, 2025
76ec913
Added Tests for the Python-Wrapper
Mar 14, 2025
24abdb7
node.cpp Bugfix
Mar 14, 2025
640e815
CMake Python-Wrapper test integration, build fix
Mar 24, 2025
862d498
Applied changes as per feedback.
Mar 24, 2025
c48be8f
Merge branch 'master' into python-wrapper
al3xa23 Apr 7, 2025
73ce98f
Fixed typo
Apr 8, 2025
168df21
Explicitly disallowed copy and assignment
Apr 8, 2025
e710de5
CMakeLists.txt fix
Apr 8, 2025
b1e9a2f
Removed unnecessary dockerfile dependencies
May 14, 2025
365f88b
Renamed wrapper -> binding, LLVM format
May 14, 2025
6806d24
Changes for pipeline test integration
May 14, 2025
c5026a2
Merge branch 'master' into python-wrapper
al3xa23 May 15, 2025
9216366
Binding test formatted with black
May 15, 2025
2d7628f
Format Python binding test with black-jupyter
May 22, 2025
07cffec
Align python-devel package for consistency
Jun 12, 2025
d9d12de
Moved clients/python-binding/ to python/binding/
Jul 17, 2025
a146ecb
python-binding unit test split, socket fixes
Jul 17, 2025
22714fe
unit tests: add test and enable test discovery
Sep 8, 2025
052f419
integration tests: added and enable test discovery
Sep 8, 2025
be2b770
python binding: add wrapper and binding tweaks
Sep 9, 2025
5b887a4
binding tests: add binding wrapper tests
Sep 9, 2025
279eb80
binding tests: CI fix and reformat
Sep 9, 2025
66e1f14
binding wrapper: CI/build fix, add binding stubs
Sep 10, 2025
f73fc67
binding stubs: add missing SPDX header
Sep 12, 2025
124a1f5
python binding: install and fix CI
Sep 12, 2025
f023f4d
Merge branch 'master' into python-wrapper
Sep 12, 2025
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
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ test:unit:
script:
- cmake -S . -B build ${CMAKE_OPTS}
- cmake --build build ${CMAKE_BUILD_OPTS} --target run-unit-tests run-unit-tests-common
- cmake --build build ${CMAKE_BUILD_OPTS} --target python-wrapper-tests
- cmake --build build ${CMAKE_BUILD_OPTS} --target run-python-wrapper-tests
needs:
- job: "build:source: [fedora]"
artifacts: true
Expand Down
2 changes: 1 addition & 1 deletion clients/python-wrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(PYBIND11_FINDPYTHON ON)
find_package(pybind11 CONFIG)

if(pybind11_FOUND)
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)

execute_process(
COMMAND "${Python3_EXECUTABLE}" -c "import sysconfig; print(sysconfig.get_path('stdlib') + '/lib-dynload')"
Expand Down
3 changes: 3 additions & 0 deletions clients/python-wrapper/villas-python-wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class Array {
smps = new vsample *[len]();
this->len = len;
}
Array(const Array&) = delete;
Array& operator= (const Array&) = delete;

~Array() {
for(unsigned int i = 0; i < len; ++i) {
sample_decref(smps[i]);
Expand Down
1 change: 1 addition & 0 deletions tests/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ add_custom_target(run-unit-tests
USES_TERMINAL
)

find_package(Python3 REQUIRED COMPONENTS Interpreter)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this is needed? I dont see the variables/targets defined by find_package being used in this file.

Normally, such transitive dependencies should be defined using the PUBLIC keyword in the target_link_library, so they propagate downstream.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was not necessary.
The idea behind it was to have CMake find the path of the Python interpreter.
I wanted to ensure that the Python executable was properly found, but just calling with python or python3 instead of ${PYTHON_EXECUTABLE} does the trick as well.

I ran into some permission issues during testing within in a local docker container and was worried that this could have caused the error, but it was an error during testing on my part.

add_custom_target(run-python-wrapper-tests
COMMAND
${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tests/unit/python_wrapper.py
Expand Down