Shiv Deepak
Shiv Deepak

Reputation: 3126

How to organize the directory used for a distributable Python module?

I'm creating a Python module. My question is how can I organize the distribution such that it has a directory structure similar to most of the standard Python modules. Is there anything similar to MakeFile in Python which has setup.py file name?

Directory Structure:

pymodule_x-y.tar.gz/
                   + pymodule/
                             + __init__.py
                             + pymodule.py
                   + setup.cfg
                   + setup.py
                   + test/
                         + test_case.py

Upvotes: 4

Views: 824

Answers (1)

Rafe Kettler
Rafe Kettler

Reputation: 76965

You have several options, including distributing egg files, tarballs, etc. A great resource on distributing Python packages is The Hitchhiker's Guide to Packaging (still under development, but good nonetheless).

Upvotes: 7

Related Questions