You need two files in addition to your source code:
setup.py
and
MANIFEST
setup.py is used to create the distributable package by the author and is also used by the enduser to install the package.
MANIFEST is a plain text file that just contains a list of files to include in the package (one file per line).
The author will then use the command;
python setup.py sdist
which creates a
dist sub-directory. This directory contains a zip file with all the files specified in the MANIFEST,
it also contains the PKG-INFO file which helps describe the package (usually a module description) for repositories like Pypi.
The end user will then unzip the package and run
python setup.py install
which typically would install the package into the site-packages sub-directory.
As a very simple example here are my setup.py and MANIFEST files for my ptypes.py module. You probably don't need so much info defined in the setup file but the principle should be clear. I used information defined in the ptypes.py module to help self document the package but you don't have to do it that way.
SETUP.PY
Code:
from distutils.core import setup
import ptypes
doc = ptypes.__doc__
sum = doc.split("\n")
classifiers = """\
Development Status :: 4 - Beta
Intended Audience :: Developers
License :: Freely Distributable
Programming Language :: Python
Topic :: Software Development :: Libraries :: Python Modules
Operating System :: Microsoft :: Windows
Operating System :: Unix
"""
setup(name="ptypes",
version = ptypes.__version__,
maintainer = "Paul Hardwick",
maintainer_email = "paul@peck.org.uk",
url = "http://www.peck.org.uk/p/python",
platforms = ["any"],
description = sum[0],
classifiers = filter(None, classifiers.split("\n")),
long_description = doc,
license = "GNU GPL",
py_modules = []
)
MANIFEST
Code:
README.txt
ptypes.py
setup.py
You should be able to modify that to your needs.
grim
