Skip to content
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

FilesystemResourceDirectory does not handle zipped eggs #11

Open
do3cc opened this issue Mar 29, 2016 · 1 comment
Open

FilesystemResourceDirectory does not handle zipped eggs #11

do3cc opened this issue Mar 29, 2016 · 1 comment

Comments

@do3cc
Copy link
Member

do3cc commented Mar 29, 2016

files would probably be found when using pkg_resources api.

@do3cc
Copy link
Member Author

do3cc commented Mar 30, 2016

I've looked a bit into it yesterday night nad figured out that the required changes are a bit of effort.
The FileSystemDirectoryLoader supports both loading from absolute paths and loading from packages.
This loader gets created by a zcml statement.
My preferred solution would be:

  1. write a second FileSystemDirectoryLoader for files from eggs.
  2. Let the zcml file dispatch to the proper Loader

While this looks backwards compatible, I found at least two instances where happens an isinstance check for the file loader. While I didn't look to close, I believe they then also use the os.path api to extract resources, so these packages would need to have code for handling this new FileSystemDirectoryLoader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants