Difference between revisions of "PyOGP Client Library File System"

From Second Life Wiki
Jump to navigation Jump to search
m
(No difference)

Revision as of 12:38, 27 June 2008

the buildout filesystem structure

Here is a rundown of the Filesystem structure of the pyogp development sandbox:

  • bin - contains all executable which might be provided by the library eggs. Also contains the buildout script which is needed later for updating packages.
  • bootstrap.py - only used for the buildout bootstrapping process.
  • buildout.cfg - the buildout configuration file. This is explained in more detail in the Buildout Introduction
  • develop-eggs - contains links to eggs which are in development right now (usually links to src/)
  • eggs - contains the eggs (python packages) which are installed locally in this buildout
  • parts - used by buildout for downloading and installing packages
  • src - contains the actual source code of the library, test harness and so on.


the src/ directory

The src/ directory contains all the packages we are developing right now. These packages are also called Python Eggs. Each package usually has a namespace like 'pyogp.lib.base'. This can later be used like this:

 from pyogp.lib.base import *

Other packages can claim part of the same namespace like 'pyogp.lib.somethingelse'. This is a feature of Python Eggs.

Because of this the packages are named like their namespace. The contents of these packages is also following this path structure and 'pyogp.lib.base' for instance looks like this:

pyogp/
pyogp/lib
pyogp/lib/base

The actual code is to be found in 'pyogp/lib/base'.

The top directory of each egg (pyogp.lib.base in our example) also contains a file called 'setup.py' which is a configuration file for that egg. This will be explained later.

For more information on how the actual source code is structure inside a package look at Package Best Practices.