views:

21

answers:

1

I'm installing a python egg using setuptools with the "python setup.py develop" command. It's important that all install paths be relative. I see that I can do:

python setup.py develop --egg-path ../../../../my_directory

and the .egg-link file uses that relative path. However, the path added to easy-install.pth still is an absolute path. How do I make the path in the easy-install.pth file a relative path?

A: 

If your sourcecode is in a subdirectory of the installation directory, it will be made relative automatically.

Why do you need it to be relative, anyway?

pjeby
The source is not installed in the site-packages directory (we use setup.py develop), but the site-packages directory and the source both live in a directory that needs to be relocatable. It's for the Sage (http://sagemath.org) project. For now, we just use a sed script after installation to make the path in easy-install.pth a relative path.
Jason