Skip to content

pyinstaller fails packaging jsonschema 3.0.0 and anyconfig on alpine #530

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

Closed
gsemet opened this issue Feb 25, 2019 · 4 comments
Closed

pyinstaller fails packaging jsonschema 3.0.0 and anyconfig on alpine #530

gsemet opened this issue Feb 25, 2019 · 4 comments
Labels
Invalid Not a bug, PEBKAC, or an unsupported setup

Comments

@gsemet
Copy link

gsemet commented Feb 25, 2019

When using anyconfig:


  File "importlib/__init__.py", line 166, in reload
  File "<frozen importlib._bootstrap>", line 618, in _exec
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages/anyconfig/__init__.py", line 20, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages/anyconfig/api.py", line 93, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages/anyconfig/schema.py", line 25, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages/jsonschema/__init__.py", line 33, in <module>
  File "site-packages/pkg_resources/__init__.py", line 564, in get_distribution
  File "site-packages/pkg_resources/__init__.py", line 436, in get_provider
  File "site-packages/pkg_resources/__init__.py", line 984, in require
  File "site-packages/pkg_resources/__init__.py", line 870, in resolve
pkg_resources.DistributionNotFound: The 'jsonschema' distribution was not found and is required by the application

Only happen on alpine build. Linux and windows builds works. No pbl on jsonschema <3.0.0

@Julian
Copy link
Member

Julian commented Feb 25, 2019

Hi. Sorry you're having trouble.

Possibly this is the same issue as in #500 -- or at least my response would be the same, which is to say pyinstaller isn't a tested configuration in jsonschema's CI, so it's not really supported unless someone wants to contribute adding one. In general those tools do weird things to accomplish the goal (some of those weird things necessary ones!).

@Julian Julian closed this as completed Feb 25, 2019
@gsemet
Copy link
Author

gsemet commented Feb 25, 2019

Isn’t it possible to use importlib_resource which is the recommended way for future compatibility to get packages data ? Don’t know really if this comes from here, but future version of python will break compatibility with get_distribition and so on.

@Julian
Copy link
Member

Julian commented Feb 25, 2019

@gsemet what's there now comes directly from the setuptools_scm documentation.

I'm happy to try whatever, but yeah like I said, if the goal is to support pyinstaller, it'd have to be by also getting that under CI.

@gsemet
Copy link
Author

gsemet commented Feb 25, 2019

Ok. I use more and more https://importlib-resources.readthedocs.io/en/latest/ knowing that pkg_resource is end of life, at least for python 3.8+.

PS: I use PBR for similar feature than setuptools_scm. Don't know this package, but PBR works great :)

@Julian Julian added the Invalid Not a bug, PEBKAC, or an unsupported setup label Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Invalid Not a bug, PEBKAC, or an unsupported setup
Projects
None yet
Development

No branches or pull requests

2 participants