[gdal-dev] Python Wheels for gdal
sean at mapbox.com
Thu Jan 30 08:03:11 PST 2020
On Thu, Jan 30, 2020 at 7:33 AM Robert Coup <robert.coup at koordinates.com>
> Hi Christoph,
> For what it's worth, I'm doing some very minimal GDAL builds at the moment
> with Python bindings. The problem you'll very quickly run into is that GDAL
> has an enormous set of dependencies. This is what the default Homebrew gdal
> package depends on in macOS: cfitsio, epsilon, expat, freexl, geos, giflib,
> hdf5, jasper, jpeg, json-c, libdap, libgeotiff, libpng, libpq,
> libspatialite, libtiff, libxml2, netcdf, numpy, pcre, poppler, proj,
> python, sqlite, unixodbc, webp, xerces-c, xz, zstd. Debian's list is even
> And each of those mostly have yet more dependencies... and if things are
> missed then issues arrive where one dependency is talking to one version of
> a library, and another dependency is talking to another. With usual
> difficult to debug hilarity ensuing.
> Sean has done a pile of this work already with respect to the GDAL wheels
> for RasterIO & Fiona, and Christoph Gohlke has done the same for the
> windows GDAL wheels Even linked to. They're both fairly minimal sets of
> drivers though. I'd definitely suggest building on their work if you want
> to make a start.
> Good luck!
> Rob :)
The dependency issues that Rob mentions are real, and there's yet another
level of DLL Hell that you can get into with Python extension modules. The
late-loading of shared libraries and possibilities for loading conflicting
versions are problems that 99% of users don't anticipate and don't know how
to begin to debug. With a compiled program, you have to go out of your way
to link and load different versions of, for example, libhdf5 within that
one program. With Python, on the other hand, it's very easy to do so by
accident. All you need is "import rasterio; import h5py" et voila, trouble
that only 10 people on the internet know how to debug.
I'm semi-sympathetic to the GDAL wheel cause and you are welcome to borrow
from rasterio-wheels (all the hard work was done by Matthew Brett, the
creator of multibuild), but I'm not going to actively help. Partly because
I want people to use Rasterio instead, and wheels are a competitive
advantage, and partly because more versions of GDAL on PyPI will mean more
conflicts and more confused users.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev