[gdal-dev] Problem importing osgeo module in Python
Mateusz Loskot
mateusz at loskot.net
Sat Aug 9 07:56:37 EDT 2008
Christopher Barker wrote:
> Mateusz Loskot wrote:http://trac.osgeo.org/gdal/browser/trunk
>> I don't think so. I presume Roger used custom --prefix and --pymoddir
>> while configuring.
>
> If that's the case, then he could set --pmoddir to the regular python
> location.
>
> But if setting --prefix changes where the python stuff goes too, then
> that's an unfortunate limitation in the build/install scripts.
Christopher,
--prefix does not affect where Python stuff goes.
GDAL ./configure tries to detect Python location using sys.prefix
property what is Python version dependent:
$python_prefix/$PYLIB/python${python_version}/site-packages
On x64 systems, PYLIB=lib64.
Here is the whole logic implemented:
http://trac.osgeo.org/gdal/browser/trunk/gdal/m4/acinclude.m4
If Python location can not be determined properly, then it falls back with:
pythondir='$(prefix)/lib/site-python'
Perhaps this last case is suspicious, but I'm not an expert of Python
installations.
Anyway, if anyone has noticed bugs in the Python detection logic, please
don't hesitate to report a ticket at http://trac.osgeo.org/gdal/
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
More information about the gdal-dev
mailing list