You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Thank you for opening an issue. Would you be able to confirm that os.path.exists("/lib/python3.10/site-packages/laby/resources/tiles_png/nweb.png") returns True?
I misread the issue. This will definitely return False if
Expected behavior: the archive contain the package data.
Got: the package contains only the Python code
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.
jtpio
transferred this issue from jupyterlite/xeus-python-kernel
Feb 14, 2024
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: