On 10/25/2011 09:59 PM, PJ Eby wrote:


If you use the "-m" option to easy_install, the easy-install.pth won't be changed (or even created, if it doesn't exist). Instead, the application scripts will simply add the needed eggs to their path at runtime.

This is the most flexible approach; the only downside to it is if you just start a Python interpreter, none of the eggs will be on sys.path unless you explicitly pkg_resources.require() them. But for stable app deployment, or even app development (using "setup.py develop" or "setup.py test") it works rather well.


Another thing, how should I call a setup.py from python itself?
I don't like too much the idea of using subprocess to pass arguments to something which
is already in python, but it appears that this is how it's done...

I've also seen doing for example
sys.argv = ['develop']
execfile('setup.py')

which also doesn't look very nice.

And last thing, do you have any example of using "-m" and where/how I have to
require the needed packages with pkg_resources?
_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to