ASPN ActiveState Programmer Network
  ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups | Web Services
SEARCH

Reference
ActivePython 2.5
Python Documentation
Distributing Python Modules
2. Writing the Setup Script
2.1 Listing whole packages
2.2 Listing individual modules
2.3 Describing extension modules
2.4 Relationships between Distributions and Packages
2.5 Installing Scripts
2.6 Installing Package Data
2.7 Installing Additional Files
2.8 Additional meta-data
2.9 Debugging the setup script

MyASPN >> Reference >> ActivePython 2.5 >> Python Documentation >> Distributing Python Modules >> 2. Writing the Setup Script
ActivePython 2.5 documentation


2.2 Listing individual modules

For a small module distribution, you might prefer to list all modules rather than listing packages--especially the case of a single module that goes in the ``root package'' (i.e., no package at all). This simplest case was shown in section 1.2; here is a slightly more involved example:

py_modules = ['mod1', 'pkg.mod2']

This describes two modules, one of them in the ``root'' package, the other in the pkg package. Again, the default package/directory layout implies that these two modules can be found in mod1.py and pkg/mod2.py, and that pkg/__init__.py exists as well. And again, you can override the package/directory correspondence using the package_dir option.

See About this document... for information on suggesting changes.

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState 2004 All rights reserved