[Tutor] Need some help with setuptools for my project.

Dylan Evans dylanlee.evans95 at gmail.com
Mon Apr 6 22:22:59 CEST 2015


On 6 April 2015 at 18:56:57, tutor-request at python.org (tutor-request at python.org) wrote:
> Any help would be greatly appreciated. I apologize if my question does not
> belongs to this mailing list. My project is hosted on github[1].
>  
> Thank you.
>  
> [1] https://github.com/neo1691/scorer.py

You might consider packaging your project as a script so that it can be run by the user from the command line. See: https://docs.python.org/2/distutils/setupscript.html#installing-scripts

Provided that you add something like #!/usr/bin/python to the top of scorer.py, 'python setup.py install’ will make it executable and move it to /usr/local/bin (on mac anyway) so that it can be run from the command line without the need to be in a specific directory or use the python command. You can even drop the .py from the file name so the user would just type in ‘scorer’ to start the script.

If you’d like to make your script available to the wider community, you can put it on PyPI. See: https://docs.python.org/2/distutils/packageindex.html

—

Dylan Evans


More information about the Tutor mailing list