[Distutils] Adding --compiler pass-through option to install

M.-A. Lemburg mal@lemburg.com
Mon Feb 19 12:40:03 2001


Rene Liebscher wrote:
> 
> "M.-A. Lemburg" wrote:
> >
> > Rene Liebscher wrote:
> > >
> > > Andrew Kuchling wrote:
> > > >
> > > > On Sat, Feb 17, 2001 at 03:15:59PM +0100, M.-A. Lemburg wrote:
> > > > >Wouldn't it make sense to add a --compiler pass-through option
> > > > >to the install command ?
> > > >
> > > > IMHO that leads down the slippery slope of having to pass everything
> > > > through; --libraries and --debug and --define &c. would also all have
> > > > to be passed through, and applied to the proper command.  If you need
> > > > special arguments, run the passes separately.
> > > >
> > > If you have to specify it for every package you compile, because
> > > you want to use a particular compiler, then you should write
> > > a personal configuration file as described in
> > > http://www.python.org/sigs/distutils-sig/doc/inst/sec:config-filenames.html
> >
> > Good point. So adding a section
> >
> > [build]
> > compiler = cygwin
> >
> > in Lib\distutils\pydistutils.cfg should take care of such a
> > setting once and for all.
> >
> > Still, someone reported that splitting the build and install
> > steps in two runs of distutils doesn't give the expected behaviour,
> > so we may have a more difficult problem to solve here...
> >
> > Would it work to put multiple commands on a single distutils
> > command line call (associating the options with the command
> > immediatly preceding it) ?!
> >
> > python setup.py build --compiler=foobar install
> >
> If you want to do an install where the intern build uses a particular
> compiler then
> 
> python setup.py install build --compiler=foobar
> 
> should work.
> 
> Each option is for the last mentioned command, but only the first
> command is really executed. If it executes internal other commands
> then they have already set their options.

Thanks for the insight. Looks like Greg has borrowed the time
machine from Guido here ;-)

Still, I would find the scheme: scan the options and commands
from left to right and execute then in the same order more intuitive
-- but maybe just me... it seems too late to change anyway.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Company:                                        http://www.egenix.com/
Consulting:                                    http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/