[gdal-dev] Python Wheels for gdal
even.rouault at spatialys.com
Fri Jan 31 06:53:24 PST 2020
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 be
done as part of the gdal Pyython package that is managed in swig/python of
GDAL repository. Something outside should use another package name
Thinking about Sean's very valid point about wheels and symbol clashes when
loading different version of the same library (or perhaps even the same
version twice), I'm wondering if using symbol versioning, at least on Linux,
wouldn't solve this. Imagine that you'd recompile GDAL and all its
dependencies such that all exported symbols (functions & global variables),
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 I
read, but for the use case we discuss here, that could perhaps be an option).
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
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 think
this is extensive used in the GDAL use case. On top of my head, a few cases
* 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 beast
that we don't need/want this in a general purpose wheel.
Spatialys - Geospatial professional services
More information about the gdal-dev