<div dir="ltr"><div>Hi Sean<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 16 Nov 2023 at 12:10, Even Rouault via gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">><br>
> I think this makes great sense for the project. I don't yet understand <br>
> what it means for an enterprise like Rasterio's PyPI wheels.<br>
<br>I'd say it probably changes nothing. The RFC just postpones the time <br>
where the plugins are loaded, but the fact that they are dlopen()'ed <br>
(early or late) probably makes them non discoverable by delocate, since <br>
libgdal doesn't link to them in a way that is advertised in its shared <br>
library metadata. If your plan is to still have a rasterio wheel with a <br>
monolithic GDAL, then you don't need to build GDAL drivers as plugins <br>
and this RFC doesn't change anything to the status quo.<br><br>
I'm not familiar at all with the wheel Python packaging tools, but if <br>
you'd want to have GDAL plugins in separate package(s) then you'd need <br>
to have a way of having the gdal_XXX.so / ogr_XXX.so be put in some <br>
known location that can be advertized to libgdal core with GDAL_DRIVER_PATH.<br></blockquote><div><br></div><div>PyInstaller has a set of hooks for this, where custom behaviour can be scripted for packages that need it. AFAICS auditwheel & delocate don't, and also don't have `--include=my.so` options to override it and "force" libraries to be processed — the same issue crops up for stuff using ctypes IIUC.<br></div><div><br></div><div>My horrible workaround idea: building a shim _gdalplugins python module which does nothing except link to all the plugin libraries — that would allow them all to be processed by delocate/auditwheel alongside the real libgdal — so you get libgdal, and all the driver plugin libraries, and their dependencies. Since _gdalplugins is never used/loaded (ideally it'd be dropped) gdal would work via runtime plugin loading. The library renaming that auditwheel/delocate do might get in the way, but hopefully there's a path through that.</div><div><br></div><div>Cheers,<br></div><div><br></div><div>Rob :)<br></div></div></div>