From 95fbff3b00db08debb820ee2af960a4bff47291d Mon Sep 17 00:00:00 2001 From: Ken Conley Date: Thu, 19 Jan 2012 02:40:01 +0000 Subject: [PATCH] stack.xml and setup.py now get version numbers from stack.yaml --- CMakeLists.txt | 2 +- setup.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7fca25a2..25ec9fba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ find_package(Boost COMPONENTS thread) # call catkin_stack() so we can configure stack.xml catkin_stack() -configure_file(stack.xml.in ${CMAKE_CURRENT_SOURCE_DIR}/stack.xml) +configure_file(stack.xml.in ${CMAKE_CURRENT_SOURCE_DIR}/stack.xml @ONLY) # Must call catkin_export_python() early, to ensure that things like # rosunit are symlinked into build/bin, and can be found by things like diff --git a/setup.py b/setup.py index 73247d40..68ae718e 100644 --- a/setup.py +++ b/setup.py @@ -5,8 +5,16 @@ from setuptools import setup import sys sys.path.insert(0, 'src') +version = '0.0.0' +try: + import yaml + d = yaml.load(open('stack.yaml')) + version = d['Version'] +except: + pass + setup(name='roslib', - version= '1.7.1', + version=version, packages=['ros', 'roslib', 'rosunit', 'rosmake', 'rosclean', 'roscreate', 'rosboost_cfg'], package_dir = {'ros':'core/roslib/src/ros', 'roslib':'core/roslib/src/roslib',