diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e42511..d24e4f8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,8 @@ on: push: tags: - "v*" + pull_request: + branches: ["main", "master"] workflow_dispatch: permissions: diff --git a/python_bindings/CMakeLists.txt b/python_bindings/CMakeLists.txt index 66504ed..749f4dc 100644 --- a/python_bindings/CMakeLists.txt +++ b/python_bindings/CMakeLists.txt @@ -5,7 +5,13 @@ if(PYTHON_EXECUTABLE AND NOT Python_EXECUTABLE) endif() # 2. Locate Python, NumPy, and pybind11 from the active Python environment. -find_package(Python REQUIRED COMPONENTS Interpreter Development NumPy) +# CMake 3.18+ can request only the module-development files. This avoids +# requiring libpython for embedding, which manylinux images do not provide. +if(CMAKE_VERSION VERSION_LESS 3.18) + find_package(Python REQUIRED COMPONENTS Interpreter Development NumPy) +else() + find_package(Python REQUIRED COMPONENTS Interpreter Development.Module NumPy) +endif() find_package(pybind11 CONFIG REQUIRED) # 3. Define the shared pybind11 module.