Skip to content

Commit

Permalink
Update Python package name to bipedal_locomotion_framework
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoferigo committed Nov 11, 2020
1 parent f52478a commit 5b00071
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions bindings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@ if(FRAMEWORK_COMPILE_PYTHON_BINDINGS)

# Install the resulting Python package for the active interpreter
if(FRAMEWORK_DETECT_ACTIVE_PYTHON_SITEPACKAGES)
set(PYTHON_INSTDIR ${Python3_SITELIB}/bipedal_locomotion)
set(PYTHON_INSTDIR ${Python3_SITELIB}/bipedal_locomotion_framework)
else()
set(PYTHON_MAJ_MIN ${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR})
set(PYTHON_INSTDIR
${CMAKE_INSTALL_LIBDIR}/python${PYTHON_MAJ_MIN}/dist-packages/bipedal_locomotion)
${CMAKE_INSTALL_LIBDIR}/python${PYTHON_MAJ_MIN}/dist-packages/bipedal_locomotion_framework)
endif()

# Folder of the Python package within the build tree.
# It is used for the Python tests.
set(BIPEDAL_LOCOMOTION_PYTHON_PACKAGE "${CMAKE_BINARY_DIR}/bipedal_locomotion")
set(BLF_PYTHON_PACKAGE "${CMAKE_BINARY_DIR}/bipedal_locomotion_framework")

# Add the bindings directory
add_subdirectory(python)

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

# Install the __init__.py file
install(FILES "${BIPEDAL_LOCOMOTION_PYTHON_PACKAGE}/__init__.py"
install(FILES "${BLF_PYTHON_PACKAGE}/__init__.py"
DESTINATION ${PYTHON_INSTDIR})

endif()
12 changes: 6 additions & 6 deletions bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This software may be modified and distributed under the terms of the
# GNU Lesser General Public License v2.1 or any later version.

pybind11_add_module(pybind11_BipedalLocomotion MODULE
pybind11_add_module(pybind11_blf MODULE
# Main module
bipedal_locomotion.h
bipedal_locomotion.cpp
Expand All @@ -15,19 +15,19 @@ pybind11_add_module(pybind11_BipedalLocomotion MODULE
TimeVaryingDCMPlanner.cpp
)

target_link_libraries(pybind11_BipedalLocomotion PUBLIC
target_link_libraries(pybind11_blf PUBLIC
BipedalLocomotion::ParametersHandler
BipedalLocomotion::Planners
BipedalLocomotion::System
)

target_include_directories(pybind11_BipedalLocomotion PRIVATE
target_include_directories(pybind11_blf PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)

# The generated Python dynamic module must have the same name as the pybind11
# module, i.e. `bindings`.
set_target_properties(pybind11_BipedalLocomotion PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${BIPEDAL_LOCOMOTION_PYTHON_PACKAGE}"
set_target_properties(pybind11_blf PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${BLF_PYTHON_PACKAGE}"
OUTPUT_NAME "bindings")

if(FRAMEWORK_COMPILE_tests)
Expand All @@ -40,4 +40,4 @@ endif()
# |-- __init__.py (generated from main bindings CMake file)
# `-- bindings.<cpython_extension>
#
install(TARGETS pybind11_BipedalLocomotion DESTINATION ${PYTHON_INSTDIR})
install(TARGETS pybind11_blf DESTINATION ${PYTHON_INSTDIR})
2 changes: 1 addition & 1 deletion bindings/python/tests/test_contact.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
pytestmark = pytest.mark.planners

import bipedal_locomotion.bindings as bl
import bipedal_locomotion_framework.bindings as bl
import numpy as np


Expand Down
2 changes: 1 addition & 1 deletion bindings/python/tests/test_parameters_handler_std.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
pytestmark = pytest.mark.parameters_handler

import bipedal_locomotion.bindings as bl
import bipedal_locomotion_framework.bindings as bl
import numpy as np


Expand Down
2 changes: 1 addition & 1 deletion bindings/python/tests/test_quintic_spline.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
pytestmark = pytest.mark.planners

import bipedal_locomotion.bindings as bl
import bipedal_locomotion_framework.bindings as bl
import numpy as np


Expand Down
2 changes: 1 addition & 1 deletion bindings/python/tests/test_swing_foot_planner.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
pytestmark = pytest.mark.planners

import bipedal_locomotion.bindings as bl
import bipedal_locomotion_framework.bindings as bl
import numpy as np


Expand Down
2 changes: 1 addition & 1 deletion bindings/python/tests/test_time_verying_dcm_planner.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
pytestmark = pytest.mark.planners

import bipedal_locomotion.bindings as bl
import bipedal_locomotion_framework.bindings as bl
import numpy as np


Expand Down

0 comments on commit 5b00071

Please sign in to comment.