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

Arguments in Setup.py

asked 2013-07-31 11:07:08 -0500

David Lu gravatar image

Can someone please explain the arguments to generate_distutils_setup (reference)?

I have two use cases that I have not been able to get working with my catkin releases.

1) Release a script so I can rosrun it

2) Release a library so I can import it in other rospy code.

The 'scripts' argument I've gathered actually means GLOBAL scripts that are run without rosrun. The relevant code is actually not too helpful for this.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-07-31 11:15:17 -0500

joq gravatar image

The Installing Python scripts and modules how-to may be more helpful for your use cases.

You are correct that the scripts argument is not recommended (or needed) for normal rosrun scripts.

edit flag offensive delete link more

Comments

Thanks for your reply. I've updated the wiki to include a link to that page. One related followup question not addressed there is: What is this mapping? package_dir={'': 'src'})

David Lu gravatar image David Lu  ( 2013-07-31 13:05:04 -0500 )edit
1

It makes the `src/` subdirectory the root of your Python modules.

joq gravatar image joq  ( 2013-07-31 13:35:24 -0500 )edit

Okay, but why is it a dictionary?

David Lu gravatar image David Lu  ( 2013-07-31 17:45:30 -0500 )edit

ROS is simply using the standard Python interface. I suppose it allows multiple root directories for resolving module imports. I've never needed anything except the `{'': 'src'}`.

joq gravatar image joq  ( 2013-08-06 05:47:35 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-07-31 11:07:08 -0500

Seen: 391 times

Last updated: Jul 31 '13