[Distutils] virtualenv & pypi-server
PJ Eby
pje at telecommunity.com
Wed Oct 26 16:24:44 CEST 2011
On Wed, Oct 26, 2011 at 9:22 AM, Andrea Crotti <andrea.crotti.0 at gmail.com>wrote:
> 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?
>
See the official setuptools documentation links at
http://pypi.python.org/pypi/setuptools#using-setuptools-and-easyinstall
(Note, however, that if your application consists of scripts that you run
from a location they were installed to with either setup.py develop or
easy_install, then you don't need to require() them; just list them in your
setup.py's install_requires.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20111026/e2ff575d/attachment.html>
More information about the Distutils-SIG
mailing list