From e0655e4fafd8143c1cabb0868d198ec1ecdb33d7 Mon Sep 17 00:00:00 2001 From: Ben Spoor Date: Sat, 6 Mar 2021 10:25:36 +0100 Subject: [PATCH] Use entry_points instead of scripts As decribed in https://click.palletsprojects.com/en/7.x/setuptools/ shebangs only work in unix and OSX (and in cygwin on windows). By using the entry_points mechanism Python will handle all cross-platform issues making it useable for everybody. --- setup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index bf91b58..83d71f6 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,11 @@ It is released under the GNU GPL license.""", 'Topic :: Software Development :: Testing' ], python_requires = '>=2.7', - scripts = [ 'flawfinder' ], + entry_points={ + 'console_scripts': [ + 'flawfinder = flawfinder:main', + ], + }, data_files = [ ('share/man/man1', [ 'flawfinder.1.gz' ]) ], - py_modules = [ ], + py_modules = ['flawfinder'], )