At 04:44 PM 10/19/2008 -0700, Garrett Cooper (garrcoop) wrote:
> -----Original Message----- > From: Phillip J. Eby [mailto:[EMAIL PROTECTED] > Sent: Sunday, October 19, 2008 4:31 PM > To: Garrett Cooper (garrcoop); [email protected] > Subject: Re: [Distutils] Potential issue with multiple > easy_install instances and single easy_install.pth > > At 07:14 PM 10/18/2008 -0700, Garrett Cooper (garrcoop) wrote: > >Hi Python folks, > > As part of a build system I work with, my group installs > >multiple Python packages via source using easy_install. One > such issue > >I've seen before in the past is that when using multiple > easy_install > >instances (via multiple make jobs), the last instance that opened up > >easy_install.pth records its changes; the file should > contain entries > >for all packages installed by easy_install. > > easy_install doesn't support simultaneous parallel > installations to the same target directory, and there are no > plans at the moment to add that support. > > Note, however, that if you use the -m (--multi-version) > option, then easy_install will not save the .pth file unless > there was already a default version of the target package > present. However, if you begin by deleting the .pth file > altogether, then using -m will avoid creating or updating it. > > Of course, the downside of -m is that you will not be able to > access the installed packages except via setuptools-built > scripts or by using explicit require() calls.Phillip, Do you or anyone else know where would I need to look into the distutils source to implement this enhancement?
It's setuptools, not distutils, and the module in question is setuptools.command.easy_install.
I forsee using Python's version of flock, with possibly the use of a simple semaphore like-system.
Note that you can probably also do this in your makefile, or in a script wrapper around easy_install. For that matter, you can create an easy_install subclass that does this, and then register it under a new command name and script. See the setuptools manual for more info.
_______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
