Python `.pth` files and using relative paths
- by kRON
I have a lot of development versions of packages installed with virtualenv under the default /src directory in the environment. Normally, I decided to do the development of my project under the /src directory afterwards.
To add my directory to the Python path, I decided to eschew from using any absolute paths, since I'm going to have to move the project around with my friends. It's a Django application, so I was happy with putting environment.pth under the root that contained the path to my project and a wsgi in the same directory would call the sites module to parse environment.pth. All good.
I was also looking to move the .pth file into site-packages, but I'm having trouble with relative paths that move up the directory tree.
For:
/env
/lib
/site-pacakges
/src
/myproject
So, the .pth entry in site-packages to myproject should look like ../../src/myproject, but this doesn't seem to be working for me on Windows.