ros: converting to top-level setup.py that installs 'roslib' (plus rosmake, rosclean, and rosunit)

This commit is contained in:
Ken Conley 2012-01-03 23:43:54 +00:00
parent 31a380a3a5
commit 02118d9c72
4 changed files with 43 additions and 79 deletions

View File

@ -1,29 +0,0 @@
#!/usr/bin/env python
from setuptools import setup
import sys
sys.path.insert(0, 'src')
from roslib import __version__
setup(name='roslib',
version= __version__,
packages=['roslib'],
package_dir = {'':'src'},
install_requires=['rospkg'],
scripts = ['scripts/gendeps'],
author = "Ken Conley",
author_email = "kwc@willowgarage.com",
url = "http://www.ros.org/wiki/roslib",
download_url = "http://pr.willowgarage.com/downloads/roslib/",
keywords = ["ROS"],
classifiers = [
"Programming Language :: Python",
"License :: OSI Approved :: BSD License" ],
description = "roslib",
long_description = """\
This is a deprecated library that is being phased out starting in the ROS Fuerte release. It contains base dependencies and support libraries for ROS. roslib contains many of the common data structures and tools that are shared across ROS client library implementations.
""",
license = "BSD"
)

35
setup.py Normal file
View File

@ -0,0 +1,35 @@
#!/usr/bin/env python
from setuptools import setup
import sys
sys.path.insert(0, 'src')
setup(name='roslib',
version= '1.7.1',
packages=['ros', 'roslib', 'rosmake', 'rosunit', 'rosclean'],
package_dir = {'ros':'core/roslib/src/ros',
'roslib':'core/roslib/src/roslib',
'rosunit':'tools/rosunit/src/rosunit',
'rosmake':'tools/rosmake/src/rosmake',
'rosclean':'tools/rosclean/src/rosclean',
},
install_requires=['rospkg'],
scripts = ['tools/rosclean/scripts/rosclean',
'tools/rosmake/scripts/rosmake',
],
author = "Ken Conley",
author_email = "kwc@willowgarage.com",
url = "http://www.ros.org/wiki/roslib",
download_url = "http://pr.willowgarage.com/downloads/roslib/",
keywords = ["ROS"],
classifiers = [
"Programming Language :: Python",
"License :: OSI Approved :: BSD License" ],
description = "roslib",
long_description = """\
Internal Python libraries for low-level 'ros' stack. This also installs the rosmake and rosclean tools.
This does *not* include the ROS communication libraries.
""",
license = "BSD"
)

View File

@ -34,28 +34,16 @@ from __future__ import print_function
import os
import sys
import subprocess
def assert_rospack_built():
if os.path.exists(os.path.join(os.environ["ROS_ROOT"], "tools/rospack", "ROS_NOBUILD")):
# Do not try to build rospack if a ROS_NOBUILD flag is present
return True
#cmd = ["make", "-C", os.path.join(os.environ["ROS_ROOT"], "tools/rospack")] Doesn't work with cmake 2.6, will trigger rebuilds due to different paths. Fixed in 2.8.
cmd = ["bash", "-c", "cd %s && make"%(os.path.join(os.environ["ROS_ROOT"], "tools/rospack"))]
if subprocess.call(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) :
print("Rospack failed to build")
return False
if subprocess.call(["which", "rospack"], stdout=subprocess.PIPE, stderr=subprocess.PIPE):
print("Rospack not in path. Please add ROS_ROOT/bin to PATH")
return False
return True
## make sure that rospack is built, it is a requirement for rosmake
if not assert_rospack_built():
sys.exit(-1)
import threading
import rosmake
## make sure that rospack is built, it is a requirement for rosmake
def assert_rospack_built():
if subprocess.call(["rospack","help"], stdout=subprocess.PIPE, stderr=subprocess.PIPE):
print("rospack not available.\nPlease install rospack before using rosmake and make sure it is available on your path.", file=sys.stderr)
sys.exit(-1)
result = 1
with rosmake.Printer():
rma = rosmake.RosMakeAll()
@ -65,7 +53,6 @@ with rosmake.Printer():
#make sure the thread is done
rosmake.Printer().join()
import threading
for t in threading.enumerate():
if t != threading.currentThread():
# Join all threads before exiting

View File

@ -1,29 +0,0 @@
#!/usr/bin/env python
from setuptools import setup
import sys
sys.path.insert(0, 'src')
from rosmake import __version__
setup(name='rosmake',
version= __version__,
packages=['rosmake'],
package_dir = {'':'src'},
install_requires=['rospkg'],
scripts = ['scripts/rosmake'],
author = "Tully Foote",
author_email = "tfoote@willowgarage.com",
url = "http://www.ros.org/wiki/rosmake",
download_url = "http://pr.willowgarage.com/downloads/rosmake/",
keywords = ["ROS"],
classifiers = [
"Programming Language :: Python",
"License :: OSI Approved :: BSD License" ],
description = "rosmake multi-process launchers",
long_description = """\
rosmake is a tool for easily launching multiple ROS nodes locally and remotely via SSH, as well as setting parameters on the Parameter Server. It includes options to automatically respawn processes that have already died. rosmake takes in one or more XML configuration files (with the .launch extension) that specify the parameters to set and nodes to launch, as well as the machines that they should be run on.
""",
license = "BSD"
)