[gdal-dev] building python bindings after cmake compilation

Greg Troxel gdt at lexort.com
Thu Jun 2 16:03:50 PDT 2022


Saulteau Don <sault.don at gmail.com> writes:

> I have gdal 3.5.0 built using the new cmake system.
> /chroot/src/build <- cmake build directory
> /chroot/src/gdal <- src directory
> /chroot/src/gdal/swig/python
>
> My cmake is ran from the /chroot directory:
>
>> cmake -B build -S gdal \
>>       -DCMAKE_BUILD_TYPE='None' \
>>       -DCMAKE_INSTALL_PREFIX='/usr' \
>>       -DBUILD_PYTHON_BINDINGS='OFF' \
>>       -Wno-dev
>> cmake --build build
>
>
> Then to make the python bindings via swig:
>
>> cd gdal/swig/python
>> python setup.py build
>
>
> When the `python setup.py build` is running it can't find gdal-config with
> the following errors:

This may not be how you want to do this, but if you install the lib and
then build python as a separate step, it will probably go better.    I
am unclear on how this is supposed to work; pkgsrc builds non-python
libs and then python as separate packages.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220602/4efaf76a/attachment.sig>


More information about the gdal-dev mailing list