how can I make setup.py file for my own script? I have to make my script global.
(add it to /usr/bin) so I could run it from console just type: scriptName arguments.
OS: Linux.
EDIT:
Now my script is installable, but how can i make it global? So that i could run it from console just name typing.
how can I make setup.py file for my own script? I have to make
Share
EDIT: This answer deals only with installing executable scripts into
/usr/bin. I assume you have basic knowledge on howsetup.pyfiles work.Create your script and place it in your project like this:
In your
setup.pyfile do this:Then type
Basically that’s it. There’s a chance that your script will land not exactly in
/usr/bin, but in some other directory. If this is the case, typeand search for
--install-scriptsparameter and friends.