From 62e3a4480811ac6625d84dd12285587c66a2b6e2 Mon Sep 17 00:00:00 2001 From: Jimmy Wu Date: Tue, 13 Jan 2026 19:04:57 -0800 Subject: [PATCH] Add pyproject.toml for uv/pip install support - Add scikit-build-core build backend for modern Python packaging - Update CMakeLists.txt to install to wheel root and set RPATH - Assumes PXREARobotSDK is system-installed via .deb package --- CMakeLists.txt | 7 +++---- pyproject.toml | 11 +++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 pyproject.toml diff --git a/CMakeLists.txt b/CMakeLists.txt index 654b7b6..75d196c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,16 +39,15 @@ if(UNIX) target_include_directories(xrobotoolkit_sdk PUBLIC ${PROJECT_SOURCE_DIR}/include ) - target_link_directories(xrobotoolkit_sdk PUBLIC ${PROJECT_SOURCE_DIR}/lib) + target_link_directories(xrobotoolkit_sdk PUBLIC ${PROJECT_SOURCE_DIR}/lib /opt/apps/roboticsservice/SDK/x64) endif() target_link_libraries(xrobotoolkit_sdk PUBLIC PXREARobotSDK ) + set_target_properties(xrobotoolkit_sdk PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE INSTALL_RPATH /opt/apps/roboticsservice/SDK/x64) endif() # Install the Python module install(TARGETS xrobotoolkit_sdk - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} # Installs to /lib - # You might want a Python-specific path like: - # DESTINATION lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages + LIBRARY DESTINATION . # Installs to wheel root for uv/pip ) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d04796b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,11 @@ +[build-system] +requires = ["scikit-build-core>=0.8", "pybind11>=2.11"] +build-backend = "scikit_build_core.build" + +[project] +name = "xrobotoolkit_sdk" +version = "1.0.2" +requires-python = ">=3.10" + +[tool.scikit-build] +wheel.install-dir = "."