Edit history

Edit: -1 of 1
Time: 2007-01-20 22:08:13
Note: /dabosite/wiki/SitePackages/reparent

changed:
-
This is a standard directory in any Python installation that contains all installed modules. Since Dabo is an installed Python module, it needs to either be installed in [site-packages], or a '''dabo.pth''' file that points to the actual directory containing Dabo.

How to find where python's site-packages dir is:
{{{
>>> import distutils.sysconfig
>>> distutils.sysconfig.get_python_lib()
'/usr/lib/python2.4/site-packages'
}}}

with a little bash magic you can CD to it:
{{{
carl@asus17:~$ cd $(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
carl@asus17:/usr/lib/python2.4/site-packages$
}}}

The directory you want to use is the one that has this __init__.py:
{{{
carl@asus17:~/src/projects/dabo$ head -n 1 __init__.py
""" Dabo: A Framework for developing data-driven business applications
}}}


Then you either create a link to the dabo framework dir:
{{{ln -s /Users/ed/projects/dabo}}}
or create a text file that references the dir that contains the dabo package dir:
{{{
C:\Python24\Lib\site-packages>type dabo.pth
c:\home\daboproject\dabo
}}}


To test to make sure you have it working right:
{{{carl@asus17:~$ python
Python 2.4.3 (#2, Oct  6 2006, 07:52:30)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import dabo
'/usr/local/lib/python2.4/site-packages/dabo' not versioned, and not exported
>>>}}}