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

Use console_script entrypoint #12

Open
wants to merge 1 commit into
base: dashing-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions scripts/rqt_robot_steering

This file was deleted.

4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[develop]
script_dir=$base/lib/rqt_robot_steering
[install]
install_scripts=$base/lib/rqt_robot_steering
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
('share/' + package_name + '/resource', ['resource/RobotSteering.ui']),
('share/' + package_name, ['package.xml']),
('share/' + package_name, ['plugin.xml']),
('lib/' + package_name, ['scripts/rqt_robot_steering'])
],
install_requires=['setuptools'],
zip_safe=True,
Expand All @@ -30,5 +29,9 @@
'rqt_robot_steering provides a GUI plugin for steering a robot using Twist messages.'
),
license='BSD',
scripts=['scripts/rqt_robot_steering'],
entry_points={
'console_scripts': [
'rqt_robot_steering = ' + package_name + '.main:main',
],
},
)
12 changes: 12 additions & 0 deletions src/rqt_robot_steering/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import sys

from rqt_gui.main import Main


def main():
main = Main()
sys.exit(main.main(sys.argv, standalone='rqt_robot_steering.robot_steering.RobotSteering'))


if __name__ == '__main__':
main()