Skip to content

Commit

Permalink
Migrate from 'scripts' to 'entry_points.console_scripts'
Browse files Browse the repository at this point in the history
Modern Python projects use 'entry_points.console_scripts' over the
installation of pre-made 'scripts'. Importantly, this makes the
executables usable on Windows.
  • Loading branch information
cottsay committed Jun 28, 2024
1 parent 6015280 commit 927b6e2
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@
'python_requires': '>=3.6',
'packages': find_packages('src'),
'package_dir': {'': 'src'},
'scripts': [
# 'scripts/rosdistro',
'scripts/rosdistro_build_cache',
'scripts/rosdistro_freeze_source',
# 'scripts/rosdistro_convert',
# 'scripts/rosdistro_generate_cache',
'scripts/rosdistro_migrate_to_rep_141',
'scripts/rosdistro_migrate_to_rep_143',
'scripts/rosdistro_reformat'
],
'entry_points': {
'console_scripts': [
# 'rosdistro = rosdistro.cli.rosdistro:main',
'rosdistro_build_cache = rosdistro.cli.rosdistro_build_cache:main',
'rosdistro_freeze_source = rosdistro.cli.rosdistro_freeze_source:main',
# 'rosdistro_convert = rosdistro.cli.rosdistro_convert:main',
# 'rosdistro_generate_cache = rosdistro.cli.rosdistro_generate_cache:main',
'rosdistro_migrate_to_rep_141 = rosdistro.cli.rosdistro_migrate_to_rep_141:main',
'rosdistro_migrate_to_rep_143 = rosdistro.cli.rosdistro_migrate_to_rep_143:main',
'rosdistro_reformat = rosdistro.cli.rosdistro_reformat:main'
]},
'extras_require': {
'test': [
'pytest',
Expand Down Expand Up @@ -53,7 +54,7 @@
kwargs['package_dir'] = {}
elif 'SKIP_PYTHON_SCRIPTS' in os.environ:
kwargs['name'] += '_modules'
kwargs['scripts'] = []
kwargs['entry_points'] = []
else:
kwargs['install_requires'] += ['catkin_pkg', 'rospkg']

Expand Down
Empty file added src/rosdistro/cli/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 927b6e2

Please sign in to comment.