Difference between revisions of "PyOGP Client Library File System"
m (Pyogp/Filesystem Structure moved to Pyogp/Client Lib/Filesystem Structure: more logical) |
Enus Linden (talk | contribs) |
||
(11 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{PyOGP/navigation}} | |||
When using buildout, the PyOGP development sandbox file system has the following structure: | |||
* bin - contains all executable which might be provided by the library eggs. Also contains the buildout script | * '''bin''' - contains all executable which might be provided by the library eggs. Also contains the buildout script, needed for updating packages. Also contains some sample scripts. | ||
* bootstrap.py - only used for the buildout bootstrapping process. | * '''bootstrap.py''' - only used for the buildout bootstrapping process. | ||
* buildout.cfg - the buildout configuration file. | * '''buildout.cfg''' - the buildout configuration file. | ||
* develop-eggs - contains links to eggs which are in development right now (usually links to src/) | * '''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 | * '''eggs''' - contains the eggs (python packages) which are installed locally in this buildout | ||
* parts - used by buildout for downloading and installing packages | * '''parts''' - used by buildout for downloading and installing packages | ||
* src - contains the actual source code of the library, test harness and so on. | * '''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 [http://peak.telecommunity.com/DevCenter/PythonEggs Python Eggs]. | The src/ directory contains all the packages we are developing right now. These packages are also called [http://peak.telecommunity.com/DevCenter/PythonEggs Python Eggs]. | ||
Line 28: | Line 27: | ||
The actual code is to be found in 'pyogp/lib/base'. All the other directories should not be touched unless you know what you are doing. | The actual code is to be found in 'pyogp/lib/base'. All the other directories should not be touched unless you know what you are doing. | ||
The current packages in source are: | |||
pyogp.lib.base | |||
pyogp.lib.client | |||
pyogp.apps | |||
== More info on packages == | |||
Python eggs in src/ are usually subversion externals, meaning that they are just referenced. You can see the externals used in src/EXTERNALS.txt. This gives us the flexibility to use the source checkout of those eggs in different buildouts with different configurations and additionally also to use packages from other repositories if needed. | Python eggs in src/ are usually subversion externals, meaning that they are just referenced. You can see the externals used in src/EXTERNALS.txt. This gives us the flexibility to use the source checkout of those eggs in different buildouts with different configurations and additionally also to use packages from other repositories if needed. | ||
Line 33: | Line 40: | ||
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. You can read about these files in the [http://docs.python.org/dist/dist.html Distutils] and [http://peak.telecommunity.com/DevCenter/setuptools setuptool] documentation. | 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. You can read about these files in the [http://docs.python.org/dist/dist.html Distutils] and [http://peak.telecommunity.com/DevCenter/setuptools setuptool] documentation. | ||
[[Category: Pyogp_Client_Lib]] | |||
[[Category:Pyogp_Kitchen_Sink]] |
Latest revision as of 13:16, 31 August 2009
When using buildout, the PyOGP development sandbox file system has the following structure:
- bin - contains all executable which might be provided by the library eggs. Also contains the buildout script, needed for updating packages. Also contains some sample scripts.
- bootstrap.py - only used for the buildout bootstrapping process.
- buildout.cfg - the buildout configuration file.
- 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' without being in the same directory as it would be the case usually in Python. This is a feature of Python Eggs and explained here.
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'. All the other directories should not be touched unless you know what you are doing.
The current packages in source are:
pyogp.lib.base pyogp.lib.client pyogp.apps
More info on packages
Python eggs in src/ are usually subversion externals, meaning that they are just referenced. You can see the externals used in src/EXTERNALS.txt. This gives us the flexibility to use the source checkout of those eggs in different buildouts with different configurations and additionally also to use packages from other repositories if needed.
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. You can read about these files in the Distutils and setuptool documentation.