Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoferigo committed Jun 16, 2021
1 parent 518b653 commit 9f461f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
18 changes: 4 additions & 14 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,30 +42,20 @@ else()
endif()

# Setup installation path
install(TARGETS manifpy DESTINATION "${PYTHON_INSTDIR}/bindings")
install(TARGETS manifpy DESTINATION "${PYTHON_INSTDIR}")

# Create the Python package in the build tree for testing purposes
set(BUILD_TREE_PYTHON_PACKAGE "${CMAKE_BINARY_DIR}/manifpy")
set_target_properties(
manifpy PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${BUILD_TREE_PYTHON_PACKAGE}/bindings")

# Create the bindings/__init__.py file
file(
GENERATE
OUTPUT "${BUILD_TREE_PYTHON_PACKAGE}/bindings/__init__.py"
CONTENT "import manifpy")
OUTPUT_NAME bindings
LIBRARY_OUTPUT_DIRECTORY "${BUILD_TREE_PYTHON_PACKAGE}")

# Create the __init__.py file
file(
GENERATE
OUTPUT "${BUILD_TREE_PYTHON_PACKAGE}/__init__.py"
CONTENT "from .bindings.manifpy import *")

# Install the bindings/__init__.py file
install(
FILES "${BUILD_TREE_PYTHON_PACKAGE}/bindings/__init__.py"
DESTINATION ${PYTHON_INSTDIR}/bindings)
CONTENT "from . import bindings\nfrom .bindings import *")

# Install the __init__.py file
install(
Expand Down
2 changes: 1 addition & 1 deletion python/bindings_manif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ void wrap_SE3(pybind11::module &m);

void wrap_SE_2_3(pybind11::module &m);

PYBIND11_MODULE(manifpy, m) {
PYBIND11_MODULE(bindings, m) {
m.doc() = "Python bindings for the manif library, "
"a small library for Lie theory.";

Expand Down

0 comments on commit 9f461f3

Please sign in to comment.