Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install xacro using console_scripts entrypoint #304

Merged
merged 4 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 8 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ cmake_minimum_required(VERSION 3.5)
project(xacro)

find_package(ament_cmake REQUIRED)
find_package(ament_cmake_python REQUIRED)

install(FILES scripts/completion.bash DESTINATION share/${PROJECT_NAME}/environment)

## The following manually installs the python package and the entry-point script
## Using ament_cmake, we cannot actually use setup.py to install these...
# install xacro python package and it's console_script entry-point script
ament_python_install_package(${PROJECT_NAME} SCRIPTS_DESTINATION lib/${PROJECT_NAME})

# install xacro python package
ament_python_install_package(xacro)
# install main script
install(PROGRAMS scripts/xacro DESTINATION bin)
install(PROGRAMS scripts/xacro DESTINATION lib/${PROJECT_NAME})
# install entry-point script(s) in bin as well
install(
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ament_cmake_python/${PROJECT_NAME}/scripts/
DESTINATION bin/
USE_SOURCE_PERMISSIONS)

if(BUILD_TESTING)
## run linters as defined in package.xml
Expand Down
2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<author>Robert Haschke</author>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_python</buildtool_depend>

<depend>ament_index_python</depend>
<depend>python3-yaml</depend>
<test_depend>ament_lint_auto</test_depend>
Expand Down
33 changes: 0 additions & 33 deletions scripts/xacro

This file was deleted.

3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[options.entry_points]
console_scripts =
xacro = xacro:main
35 changes: 0 additions & 35 deletions setup.py

This file was deleted.