[Distutils] `develop' doesn't appends my package's directory to sys.path

Gustavo Narea gustavo at gnulinuxmatters.org
Fri Jul 18 22:07:06 CEST 2008

Hello, everyone.

I have an script which is supposed to run my test suite periodically, and the 
routine is basically this:
 1.- It checkouts my app's source from the repository, and stores it in a 
different directory on every checkout.
 2.- It runs setuptools build.
 3.- It runs setuptools develop.
 4.- It runs my test suite (via setuptools unittest).

But setuptools' develop doesn't append my project's path to sys.path; I don't 
know what is going on, but I'm absolutely sure about that. Here is part of 
the verbose output of the script (it's actually not an script per se; I'm 
using an Ant like app, part of the Bitten continuous integration system):

> [DEBUG   ] Executing <function exec_ at 0x83ccdf4> with arguments:
> {'executable': './setup.py', 'args': 'develop'}
> [DEBUG   ] Executing  ['./setup.py', 'develop']

And because my package is not accessible, its modules are not accessible 
> ImportError: No module named build.lib.animador.config

Then, from the Python interpreter, I check sys.path and I find that my 
package's path is not included. But if I manually run `setup.py develop', and 
then open the Python interpreter again, the path is included.

Here's the output of my script http://paste.turbogears.org/paste/3255 and 
here's the full output of `setup.py develop' 

Also, here's my repository https://svn.gnulinuxmatters.org:81/animador/trunk/ 
and here you can browse the source code: 

I hope someone can help me out; I have spent days trying to fix this.

Thanks in advance.
Gustavo Narea.
General Secretary. GNU/Linux Matters.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20080718/1490a1ee/attachment.pgp>

More information about the Distutils-SIG mailing list