Skip to content

Pyoxidizer doesn't work for jsonschema_specifications #749

Description

@fabioz

The issue here is that the jsonschema_specifications._core._schemas() function does:

from importlib.resources import files

for version in files(__package__).joinpath("schemas").iterdir():

and then it will not really find anything to register.

Printing the return of the files(...) it gives:

<importlib._adapters.DegenerateFiles.Path object at 0x0000015E5D83A9B0>

I added

if "jsonschema_specifications" in resource.name:
    resource.add_location = "filesystem-relative:lib"
    resource.add_source = True

So, those resources even have a __file__, but still, importlib.resources.files(...) doesn't work as intended.

This was also reported at: python-jsonschema/jsonschema-specifications#61, but unfortunately the library can't be changed to accommodate a different API.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions