Pages

Saturday, 9 June 2012

Python package structure

I always forgot what should be - the project structure - the contents of setup.py Basically it is just a duplication of The Hitchhiker's Guide to Packaging v1.0 documentation/Creating a Package
TowelStuff/
    bin/
    CHANGES.txt
    docs/
    LICENSE.txt
    MANIFEST.in
    README.txt
    setup.py
    towelstuff/
        __init__.py
        location.py
        utils.py
        test/
            __init__.py
            test_location.py
            test_utils.py
And your setup.py should look like this:
from setuptools import setup

setup(
    name="TowelStuff",
    version="0.1",
    packages=["towelstuff"],
    install_requires=["nose"]
    )
The other question: What should the subversion structure look like? I looked the Trac guys, to see how they do:
http://svn.edgewall.org/repos/trac/trunk/
  ...
  trac
  setup.py
  ...
So I will use the same setup.

No comments:

Post a Comment