-
Notifications
You must be signed in to change notification settings - Fork 12
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 for package data #66
Comments
I misread the issue. This will definitely return False if
So this has to do with either the empack filtering logic or the way we add package data for the pip dependencies. I'd bet on the empack filtering logic. |
Hello! Bumping this issue, as this is a blocker for making our «Introduction to programming Python course» available outside of Paris-Saclay using JupyterLite. Is this a hard problem? Do we have some estimate of when this could be fixed? Thank you in advance! |
As a workaround , one can mount any file/dir "by hand" https://github.com/jupyterlite/xeus?tab=readme-ov-file#mounting-additional-files
@martinRenou reminder: we should get rid of empack completely and just load the conda-pkg itself (and do the relocation on the fly), or at least completely drop the empack filtering... |
Yeah 👍🏽 I'd be curious to see what impact removing filtering would have in terms of size, but it would definitely make this situation better. |
I think I commented this somewhere, but I believe the filtering logic should be an opt-in and not an opt-out. We should not filter any file unless explicitly stated. |
I can have a look at this |
Thank you @DerThorsten and @martinRenou for the quick feedback! Happy to beta test anytime. |
Released empack with the fix and bumping the dependency in #96 |
I confirm that this works with #96 on my use case. Closing ticket. Thank you!!! |
Description
I have a Python package which includes package data, to be accessed
through
importlib.resources
. However, within jupyterlite,importlib.resources
fails do find the data.
Reproduce
Clone https://github.com/jupyterlite/xeus-python-demo
Add these dependencies to environment.yml
Build JupyterLite
Check the log, and notice the copying of the package data when building the wheel:
Browse
dist/extensions/@jupyterlite/xeus-python-kernel/static/laby_python-0.0.5-pip.tar.gz
Expected behavior: the archive contain the package data.
Got: the package contains only the Python code
Run JupyterLite and from a python kernel run:
Expected behavior: a list of files including 'nweb.png`.
Got: the empty list
Context
The text was updated successfully, but these errors were encountered: