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 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 6 additions & 7 deletions CMakeLists.txt
Expand Up @@ -2,17 +2,16 @@ 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(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/ament_cmake_python/${PROJECT_NAME}/scripts/xacro
DESTINATION bin)
rhaschke marked this conversation as resolved.
Show resolved Hide resolved

if(BUILD_TESTING)
## run linters as defined in package.xml
Expand Down
2 changes: 2 additions & 0 deletions package.xml
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
@@ -0,0 +1,3 @@
[options.entry_points]
console_scripts =
xacro = xacro:main
35 changes: 0 additions & 35 deletions setup.py

This file was deleted.