Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build wheels with namespace package and optional dependencies that include rasterio #22

Closed
dazza-codes opened this issue Dec 12, 2020 · 2 comments

Comments

@dazza-codes
Copy link

Since both fiona and rasterio rely on the same binaries for gdal (and others), it seems reasonable to request that the fiona package provide an optional extra to include rasterio (and vice versa), with the setup.py keeping their release cycles in lock-step and their dependency on lib versions in lock step (gdal, etc). While there may be good reasons to release these packages as separate projects, it is also reasonable to manage them as joint projects, for consumers that often require both. Perhaps a namespace package could help to resolve the shared, common dependencies and packaging solution for projects that require both. (Elsewhere, I've tried to engage in some discussion about shared libraries that is too complex to resolve at the level of the packaging system while rasterio and fiona are separate projects without any way to package them as a complete package.) Perhaps the idea is to create a namespace package that works something like the following (this uses pygdal as the namespace package, substitute anything that works without conflicts):

pip install pygdal[fiona] # for fiona only
pip install pygdal[rasterio] # for rasterio only
pip install pygdal[all] # for both

The dask packaging provides a top-level package with optional extras like this and a complete option to get everything.

This issue also applies to rasterio-wheels, but it's not duplicated there in it's entirety.

@sgillies
Copy link
Owner

In my own work, I'm more likely to install fiona or rasterio, not both. I observe this in other projects as well and that installing them together is less common. If that changed, and more projects required both than only one or the other, I would consider reorganizing the projects. This is not the place to discuss that, however.

@dazza-codes
Copy link
Author

2c - with respect - the purpose of a namespace package is to allow separate installation within a common namespace, it does not entail that all the sub-packages in the namespace are required to be installed together at all times. Since this project builds duplicate wheels that are also in the rasterio project - a common root project to build the common wheels is required in a namespace that would be shared by any packages in the namespace - and this is a reasonable space to raise the issue. The root package should provide the common shared libs (gdal, maybe others) and the sub-packages can both depend on it. The implication for both rasterio and fiona is that they should share a common root package in the namespace so they belong to a tree of dependencies that is one leaf deep at this time. If this is not the place to raise this issue, raise it wherever and link back to this issue or translate/paraphrase the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants