-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Support installing data_files in micropip.install #18
Comments
Thanks for the suggestion. +1 to add it. It looks like the the expected behavior is documented in https://setuptools.pypa.io/en/latest/deprecated/distutils/setupscript.html#installing-additional-files For instance, the nbconvert wheel contains,
so somehow we need to detect the |
The code for this in pip is here: As usual for pip it looks pretty complicated... |
I would suggest looking at https://github.com/pypa/installer instead, for reference code. It might actually be reasonable for micropip to switch to that package for performing the installations too. If you do end up going down this route, please feel welcome to mention me for inputs/review. :) |
Thanks for the pointer @pradyunsg and I agree we should definitely try to re-use more of the existing pypa tools. We would prefer not to add too many runtime dependencies to If you have any other feedback on micropip or the direction you think we should be going I would be very happy to hear it! The main idea is that we need a light installer, reduced functionality is OK, for instance, we don't think it makes sense to use a backtracking dependency solver when loading some web application (excluding the Jupyterlite use case which is a bit different), and most complex dependency solving should happen when deploying the app, not at runtime. The load time needs to be small and deterministic. We have a way to freeze dependencies though it's not very well documented yet. This is probably rather related to the "lockfiles for Python" work happening elsewhere in the ecosystem. |
🚀 Feature
When installing
.whl
files that containdata_files
, these should be copied to the expected locations.Motivation
A number of package ecosystems use
data_files
to deploy files to non-pythonic locations. In pyodide 0.21.0, these don't appear to be honored, which leaves some packages broken, such asnbconvert
.Pitch
nbconvert-6.5.3-py3-none-any.whl
data_files
e.g.nbconvert-6.5.3.data/data/*
data_files
tosys.prefix
e.g./
/share/jupyter/nbconvert/templates/lab/index.html.j2
Alternatives
Additional context
_package_loader.py
?The text was updated successfully, but these errors were encountered: