Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ament Python setup.cfg File Incorrectly Generated #730

Open
808brick opened this issue Jun 27, 2022 · 1 comment
Open

Ament Python setup.cfg File Incorrectly Generated #730

808brick opened this issue Jun 27, 2022 · 1 comment
Labels
more-information-needed Further information is required

Comments

@808brick
Copy link

Bug report

Required Info:

  • Operating System:
    • Ubuntu 20.04
  • Installation type:
    • ROS Foxy Binary
  • DDS implementation:
    • Default
  • Client library (if applicable):
    • N/A

Steps to reproduce issue

  • Create a new ament-python package
  • Add your script files to package python directory
  • Add scripts to setup.py file
  • Run colcon build
  • Source Package
  • Try to run script with ros2 run command
  • Receive an error saying executable not found

Expected behavior

Scripts run as expected

Actual behavior

Receive an error saying executable not found

Additional information

In terminal when creating a package using ament_python configuration, the setup.cfg files that get autogenerated appear to use "-" instead of "_" to separate the words for the directory variables, which ends up causing all ros2 run commands on scripts in that package to fail with an error "No executable found". (Terminal and directory picture at bottom)

It seems when the command is run, the setup.cfg file is created like so:

[develop]
script-dir=$base/lib/hello-world-python
[install]
install-scripts=$base/lib/hello-world-python

When it should be :

[develop]
script_dir=$base/lib/hello-world-python
[install]
install_scripts=$base/lib/hello-world-python

Where the difference is a underscore vs the hyphen. (Should be script_dir vs the autogenerated script-dir)

So I believe there is an error wherever the default setup.cfg file gets configured. This did not use to be an issue, so I think something may have happened in a relatively recent push.

This may be related to issues such as #715

Photo of error
image

@clalancette
Copy link
Contributor

In terminal when creating a package using ament_python configuration, the setup.cfg files that get autogenerated appear to use "-" instead of "_" to separate the words for the directory variables, which ends up causing all ros2 run commands on scripts in that package to fail with an error "No executable found". (Terminal and directory picture at bottom)

That should not be the case; both - and _ are valid (though in later versions of setup tools, _ is preferred). Up until Humble, we always use the -, so that is not likely the cause of the problem.

Please provide a full working example with your problem. Likely the issue lies somewhere else. Thanks.

@clalancette clalancette added the more-information-needed Further information is required label Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-information-needed Further information is required
Projects
None yet
Development

No branches or pull requests

2 participants