From e54fcaaecfbaeaa45f5ace25c2b2a959ed5b2b1d Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Tue, 25 Mar 2014 08:58:12 +0100 Subject: [PATCH] urdf-parser-py: install scripts use catkin_python_setup To install urdf-parser-py properly with the bitbake recipe in the meta-ros layer, the install scripts, CMakeLists.txt and setup.py are adjusted. The package.xml file is needed for the new CMakeLists.txt due to using catkin. The files were obtained from the urdfdom_py release repository at: https://github.com/ros-gbp/urdfdom_py-release/tree/4664fc1445f4c75b427dcc6fbad579ba285c1901/hydro The obtained files were slightly adjusted: - The version in the package.xml is fixed. - Paths in CMakeLists.txt and setup.py were changed for use with the bitbake recipe. Upstream-Status: Inappropriate [source repository shall work without catkin] --- urdf_parser_py/CMakeLists.txt | 16 ++++++++++------ urdf_parser_py/package.xml | 28 ++++++++++++++++++++++++++++ urdf_parser_py/setup.py | 18 ++++++------------ 3 files changed, 44 insertions(+), 18 deletions(-) create mode 100644 urdf_parser_py/package.xml diff --git a/urdf_parser_py/CMakeLists.txt b/urdf_parser_py/CMakeLists.txt index c811815..6a48657 100644 --- a/urdf_parser_py/CMakeLists.txt +++ b/urdf_parser_py/CMakeLists.txt @@ -1,7 +1,11 @@ -find_program(PYTHON "python") +cmake_minimum_required(VERSION 2.8.3) +project(urdfdom_py) -if (PYTHON) - set(SETUP_PY "${CMAKE_CURRENT_SOURCE_DIR}/setup.py") - install(CODE "execute_process(COMMAND \"${PYTHON}\" \"${SETUP_PY}\" build --build-base \"${CMAKE_CURRENT_BINARY_DIR}/pybuild\" install --install-layout deb --prefix \"${CMAKE_INSTALL_PREFIX}\" - WORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\")") -endif() +find_package(catkin) +catkin_python_setup() +catkin_package() + +install(PROGRAMS + scripts/display_urdf + DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} + ) diff --git a/urdf_parser_py/package.xml b/urdf_parser_py/package.xml new file mode 100644 index 0000000..c9d2285 --- /dev/null +++ b/urdf_parser_py/package.xml @@ -0,0 +1,28 @@ + + + urdfdom_py + 0.2.10 + A library to access URDFs using the DOM model. + Ioan Sucan + + BSD + + Thomas Moulard + David Lu + Kelsey Hawkins + Antonio El Khoury + Eric Cousineau + + http://ros.org/wiki/urdf + https://github.com/ros/urdfdom/issues + https://github.com/ros/urdfdom + + catkin + python-catkin-pkg + + python + + python + catkin + + diff --git a/urdf_parser_py/setup.py b/urdf_parser_py/setup.py index eeb4c6d..45478d9 100644 --- a/urdf_parser_py/setup.py +++ b/urdf_parser_py/setup.py @@ -1,16 +1,10 @@ #!/usr/bin/env python - from distutils.core import setup - -d = {'author': u'Thomas Moulard , David Lu , Kelsey Hawkins , Antonio El Khoury , Eric Cousineau ', - 'description': 'The urdf_parser_py package contains a Python implementation of the\nurdf_parser modeling various aspects of robot information, specified in the\nXml Robot Description Format (URDF).', - 'license': 'BSD', - 'maintainer': u'Thomas Moulard', - 'maintainer_email': 'thomas.moulard@gmail.com', - 'name': 'urdf_parser_py', - 'package_dir': {'': 'src'}, - 'packages': ['urdf_parser_py', 'urdf_parser_py.xml_reflection'], - 'url': 'http://ros.org/wiki/urdf_parser_py', - 'version': '0.3.0'} +from catkin_pkg.python_setup import generate_distutils_setup + +d = generate_distutils_setup( + packages=['urdf_parser_py', 'urdf_parser_py.xml_reflection'], + package_dir={'': 'src'} +) setup(**d) -- 1.8.3.2