[gdal-dev] gdal swig python's setup.py not python3 compatible

Vincent Schut schut at sarvision.nl
Thu Dec 30 05:54:38 EST 2010



On 12/30/2010 11:39 AM, Even Rouault wrote:
>> I guess my question actually boils down to: how can I specify in the
>> configure phase, which python to use for the bindings? E.g. I have both
>> 2 and 3 on my system, and 3 is the default, but I want gdal to build and
>> install the bindings for 2. Could I specify
>> --with-python=/usr/bin/python2 when running configure? (Or even better,
>> build and install it for both pythons in one run...)
>
> No, AFAIK you can't specify the name of the python executable. --with-python
> just accept yes or no.
>
> Don't bother with --with-python in configure, it doesn't do much, apart from
> automating the process. So just try :
>
> cd swig/python
> /usr/bin/python2 setup.py build
> /usr/bin/python2 setup.py install
> /usr/bin/python[3] setup.py build
> /usr/bin/python[3] setup.py install
>
> and you'll have the bindings built and installed for the 2 versions

OK, thanks. I think I was just hoping for something more elegant...

Vincent


More information about the gdal-dev mailing list