Use extras so downstream packages can depend on `uproot[xrootd]`
chrisburr opened this issue · comments
I couldn't find anything discussing this but I'd find it useful if there was an extra that let me declare the need for xrootd
support. I could also add a dependency on fspec-xrootd
but it feels a bit wrong to specify an implementation detail of uproot
.
I guess the same might also make sense for s3
and maybe a generic option for all compression related dependencies (less sure about the name for this one, maybe [compression]
?).
Compression has recently been solved by cramjam (PR #1090 and release 5.3.0); cramjam is a sufficiently robust dependency (self-contained, works on Pyodide) that it can be a strict dependency.
fsspec is also a strict dependency now (as of 5.2.0), so
pip install uproot[xrootd]
could (should) pull in fsspec-xrootd in specific. That could be true of uproot[http]
and uproot[s3]
, but how many? Can pip do the following?
pip install uproot[xrootd,http,s3]
If so, then it makes sense to include them all with fine granularity like this.
Ah nice, I hadn't heard of cramjam
but it looks very useful.
THat could be true of uproot[http] and uproot[s3], but how many? Can pip do the following?
pip install uproot[xrootd,http,s3]
If so, then it makes sense to include them all with fine granularity like this.
Yes, this is exactly how it works. You can event use something like uproot[xrootd]
from within uproot
the extras section to make something like uproot[all]
or uproot[dev]
. See sqlalchemy
for an example.