one_file.py
contains some general functions, classes, and a main()
.
I'd like to make it pip
installable with a command line script that calls the main()
function.
What's a directory structure and setup.py
that will do this?
one_file.py
contains some general functions, classes, and a main()
.
I'd like to make it pip
installable with a command line script that calls the main()
function.
What's a directory structure and setup.py
that will do this?
You can get away with this with just a
setup.py
and your module--no additional directories. In yoursetup.py
just usesetup(..., py_modules=['one_file'], ...)
(you might want to check on the exact spelling). To install the script you can use theconsole_scripts
entry-point: