Shipping python modules - best practices?

rambius rambiusparkisanius at gmail.com
Sat Oct 27 10:02:23 EDT 2012


Hello,

I developed some moderate-sized python scripts that I would like to distribute as python modules. I have never shipped modules before and I read http://docs.python.org/distutils/index.html. I was able to generate a source distribution, but I still have some questions.

1) My module contains some unit tests in separate scripts. I want to execute them when I generate the source distribution. How can I do it?

2) When I install 3rd party modules, I see some of them executing their unit tests during the installation. How can I do it? How can I provide an option to the user to ignore possible test failures?

3) I generate some html documentation with pydoc. How shall I distribute it with the module?

Thank you very much in advance.

Regards
rambius



More information about the Python-list mailing list