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

Rene Liebscher R.Liebscher@gmx.de
Mon Feb 19 11:39:01 2001


"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.

Kind regards
Rene Liebscher