-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[FR] External Data Support #3191
Comments
Hi @blink1073 thank you very much for putting up this issue. Regarding the "deprecated" status of The behaviour of installing files to arbitrary locations as it used to do in the distutils and then in the easy_install era is definitely deprecated. But I don't see the feature itself disappearing in the future (just that users have to understand its limitations and know exactly when to use it). Other maintainers might disagree, but I do appreciate that there are genuine use cases for it (like jupyter). |
Jupyter looks in I think the current semantics of I think with a new API we can offer a simpler, safer alternative and eventually remove |
If there's buy-in I can take a crack at implementation. |
I am sold on that. It would be nice to hear the opinion of @jaraco. For more information, there is a in-depth discussion about why jupyter needs data dirs in the discourse, this is also relevant. If I understood correctly jupyter needs to be able to share/read/use files from extensions. These files need to be found in the disk in a reliable way, even if the package providing them has not been imported yet. The performance of searching for entry-points on disk also seems to be an issue for jypyter. |
@blink1073 Hey! I saw this linked on your slides from the packaging summit. Hatchling supports a |
Hi @ofek, thanks for pointing that out! The consensus at the summit was that I should draft a PEP to standardize the handling of the As for Jupyter, we could have used |
What's the problem this feature will solve?
Project Jupyter uses
data_files
for discovery of runtime extensions. This feature was deprecated without a viable alternative.Describe the solution you'd like
The
flit
project recently added support forexternal_data
, which is a simplified and constrained version ofdata_files
. We could support an equivalent feature insetuptools
, with caveats about when it is appropriate to use it.Alternative Solutions
Project Jupyter and other current consumers of
data_files
could instead switch to using aflit
backend, which we have been actively exploring.Additional context
Project Jupyter uses
data_files
to allow libraries to provide shared setting and static assets files that are consumed by Jupyter at runtime. We have explored usingentry_points
for this purpose, but it did not scale well.Code of Conduct
The text was updated successfully, but these errors were encountered: