[gdal-dev] Python Wheels for gdal
sean at mapbox.com
Fri Jan 31 11:57:14 PST 2020
On Fri, Jan 31, 2020 at 7:53 AM Even Rouault <even.rouault at spatialys.com>
> On vendredi 31 janvier 2020 15:14:39 CET Mateusz Loskot wrote:
> > On Fri, 31 Jan 2020 at 10:58, Christoph Paulik <cpaulik at vandersat.com>
> > > My initial motivation was that I would like `pip install gdal` to just
> > > work.
> > I do share your view.
> > The pip install is always the canonical Pythonic way for me and
> > I'd be very happy myself to be able to install GDAL that way.
> > > I guess that it is unrealistic to fix any of that, so let's get back on
> > > topic.
> > My point is that, IMO, such initiative is best to be run as a project
> > independent from GDAL development, outside GDAL repository,
> > for practical reasons.
> Except that if we wanted "pip install gdal" to include wheels, that should
> done as part of the gdal Pyython package that is managed in swig/python of
> GDAL repository. Something outside should use another package name
Speaking of package name, "gdal" and "ogr" are modules of an "osgeo"
package. Maybe it should be "pip install osgeo"? Doesn't need to be, of
course, but it's nice when distribution and package names match.
> Thinking about Sean's very valid point about wheels and symbol clashes
> loading different version of the same library (or perhaps even the same
> version twice), I'm wondering if using symbol versioning, at least on
> wouldn't solve this. Imagine that you'd recompile GDAL and all its
> dependencies such that all exported symbols (functions & global
> with some "gdal_wheel" marker, then those libraries would be effectively
> private to the Python package. I know that at some past point (GDAL 1.8 I
> think), Debian packaged GDAL with versionned symbols (from a distribution
> point of view, versionned symbols aren't necessarily that great from what
> read, but for the use case we discuss here, that could perhaps be an
> Hopefully, there would be some existing tools to automate this. At linking
> time. Or perhaps as a post processing stage, messing directly with the ELF
There are existing tools. Multibuild uses https://github.com/pypa/auditwheel.
It says in the project README that the result is "like static linking", but
as I've found between rasterio and h5py wheels (which both have been
through auditwheel), it's not proof against conflicts.
https://github.com/matthew-brett/delocate is the OS X analog of auditwheel.
> I could imagine thought that symbol renaming/versionning wouldn't fly very
> well with dlopen()/dlsym() use that libraries could make. But I don't
> this is extensive used in the GDAL use case. On top of my head, a few
> might be:
> * typically the old way GDAL loaded PROJ4. But no longer an issue with
> GDAL 3,
> or can be avoided with GDAL 2.x as well when building with --with-
> * the OGDI library loading its plugin. But OGDI is sufficiently a odd
> that we don't need/want this in a general purpose wheel.
Even though I'm not a user of GDAL's python bindings, it's clear that my
project is going to benefit from having your Linux expertise focussed on
the problem of getting GDAL and its dependencies to Python users, and I'm
grateful for that.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev