setup.py and adding file to /bin/

Consider using console_scripts:

from setuptools import setup
setup(name="some-name",
      ...
      entry_points = {
              'console_scripts': [
                  'command-name = package.module:main_func_name',                  
              ],              
          },
)

Where main_func_name is a main function in your main module.
command-name is a name under which it will be saved in /usr/local/bin/ (usually)

Leave a Comment