ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Third Party Release of Python Package

asked 2015-11-20 23:17:37 -0500

asmodehn gravatar image

Hello,

Since I have a lot of python dependencies to manage, and I don't want to maintain all of the fork of these repositories just to add a file, I am currently experimenting with Third Party Release ( on indigo ), which is conceptually what I am trying to do anyway. http://wiki.ros.org/bloom/Tutorials/R...

I am using a simple and stable python package for a first try : https://github.com/marshmallow-code/m...

I managed to get my patches into the release repo, and do a bloom release properly : https://github.com/asmodehn/marshmall...

However it seems that catkin_make does something strange with the setup.py:

-- ==> add_subdirectory(marshmallow-rosrelease)
Traceback (most recent call last):
  File "/opt/ros/indigo/share/catkin/cmake/interrogate_setup_dot_py.py", line 253, in <module>
    main()
  File "/opt/ros/indigo/share/catkin/cmake/interrogate_setup_dot_py.py", line 244, in main
    exec(fh.read())
  File "<string>", line 24, in <module>
  File "<string>", line 14, in find_version
NameError: global name 're' is not defined
CMake Error at /opt/ros/indigo/share/catkin/cmake/safe_execute_process.cmake:11 (message):

  execute_process(/home/alexv/Projects/testws/build/catkin_generated/env_cached.sh
  "/usr/bin/python"
  "/opt/ros/indigo/share/catkin/cmake/interrogate_setup_dot_py.py"
  "python-marshmallow"
  "/home/alexv/Projects/testws/src/marshmallow-rosrelease/setup.py"
  "/home/alexv/Projects/testws/build/marshmallow-rosrelease/catkin_generated/setup_py_interrogation.cmake")
  returned error code 1
Call Stack (most recent call first):
  /opt/ros/indigo/share/catkin/cmake/catkin_python_setup.cmake:69 (safe_execute_process)
  marshmallow-rosrelease/CMakeLists.txt:5 (catkin_python_setup)


-- Configuring incomplete, errors occurred!

As a side note, running python setup.py install works fine, and even running build/marshmallow-rosrelease/catkin_generated/python_distutils_install.sh seems to work fine.

Thanks for any hint on what might be going wrong there. Also if there is a third party release of a pip package that works somewhere, please point me to it so I can compare...

Cheers

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-11-22 21:21:21 -0500

William gravatar image

Based on the output I'd say that your setup.py uses re but doesn't import it.

Also the setup.py used in catkin packages have some special considerations:

http://docs.ros.org/api/catkin/html/u...

edit flag offensive delete link more
0

answered 2015-11-23 23:24:59 -0500

asmodehn gravatar image

This package is a normal python package that works fine with pip and other python tools. It s not a new module made especially for ROS.

As it turns out I investigated a bit, and I saw this in interrogate_setup_dot_py.py in catkin :

with open(args.setupfile_path, 'r') as fh:
    exec(fh.read())

And I also found this : http://bugs.python.org/issue16781

I ll make a PR in catkin for this soon, so that we can interrogate a usual setup.py with something like :

execfile(fh,{})
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2015-11-20 23:17:37 -0500

Seen: 390 times

Last updated: Nov 23 '15