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

Phillip J. Eby pje at telecommunity.com
Sun Jul 20 18:48:43 CEST 2008


At 02:34 PM 7/20/2008 +0200, Gustavo Narea wrote:
>Hello, Phillip.
>
>On Saturday 19 July 2008 20:35:54 Phillip J. Eby wrote:
> > It doesn't sound like you read what I wrote below, or that you did
> > any of what I said to do, so I'm not sure what other help I can
> > offer.
>
>I did do what you said, and sorry for not letting you know about the result I
>got.
>
>The output is basically the same; the environment contents are exactly the
>same (which you can verify, because the output is attached). The only thing
>that changes is that with the build system I get
> > Animador 1.0a1 is already the active version in easy-install.pth
>while with `setup.py develop' I get
> > Adding Animador 1.0a1 to easy-install.pth file

I think you should probably dump the contents of your 
easy-install.pth file before and after running each one, so we can 
see what's happening there, exactly.


>But that's the only difference.
>
>I found that if I remove "build", the test suite finally works, and therefore
>I didn't try to understand what's the problem with setuptools' develop in my
>script if the environment contents are the same as in `setup.py develop'.
>
> > (Also, your statements about "develop" and "build" are
> > mutually inconsistent.)
>
>I don't understand why you think that.

You said:

"""If I don't run "build" my script works.  However I need "develop" 
because the Ant-like tool runs my test suite on a different folder 
for every svn revision. If I remove "build", I get an import error 
because my modules are not accessible."""

In other words, you said that you need develop because if you don't 
use build you get an error.  But also that if you remove build it 
works.  So, your statements are not such that I can make any kind of 
consistent sense of what is happening.

Also, "build" should have zero effect on testing or installing, and 
"develop" should be unnecessary for testing, regardless of what 
directory your code is unpacked in.  You should simply be able to run 
"setup.py test" and skip all this build and develop stuff, because 
the "test" command puts the code on sys.path while the tests are 
running, and it also executes any build steps that are necessary.


>Regarding "develop", I had to include it in my script because otherwise my
>packages' modules wouldn't be accessible - I got import errors when I didn't
>use it.

What import errors, specifically?



More information about the Distutils-SIG mailing list