I want to package my Docopt app which consist of one class file and an other file which imports the class file and implements Docopt (https://gist.github.com/itsnauman/4d9e40459ff56106edcf). How should I package it so that I only enter the package's name $ package_name --help and it executes?
Packaging A Docopt CLI Application
269 views Asked by Delete Me At
1
You will need a
setup.pyfile in the root folder of your project. It has to contain something in the line of:You could just include the docopt source in your
mypackagefolder, as docopt is not very long, and this will remove the dependency also.The folder structure for this example should look like:
In
script.pyyou would then do:From the project root you can now run:
python setup.py installorpython setup.py develop.