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

add pyinstaller support #92

Merged
merged 3 commits into from
Jun 1, 2022

Conversation

Lukasz87
Copy link
Contributor

Add support for pyinstaller.
When app with schwifty is compile to .exe there is a problem with path.
This change fix this problem.

schwifty/registry.py Outdated Show resolved Hide resolved
schwifty/registry.py Outdated Show resolved Hide resolved
Comment on lines +49 to +52
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
package_path = Path(getattr(sys, "_MEIPASS"))
else:
package_path = files(__package__)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PyInstaller maintainer here: Wherever you got this code snippet from, can you please delete/downvote/mark it as invalid/expunge it from the internet. It is misinformation.

PyInstaller expects you to preserve package structure (i.e. these data files would go into $app_root/schwifty/bank_registry instead of $app_route/bank_registry). Without this change, a user could have used --collect-data=schwifty and everything would have worked out fine. With this change, the user has to force their JSON files into the wrong place.

mdomke added a commit that referenced this pull request May 9, 2024
mdomke added a commit that referenced this pull request May 9, 2024
* main:
  chore: Add changelog for release 2024.05.2
  Install typing-extensions for Python <= 3.10
  chore: Add changelog for release 2024.05.1
  Revert "add pyinstaller support (#92)"
  Improve Pydantic support for BIC objects
  Remove the iso3166 library as we already have pycountry
  Use Self for more accurate typing (#201)
  Improve Pydantic support
  Update generated according to script spec (#199)
  Update missing Luxembourg bank (#198)
  Update IBAN registry spec (#197)
  chore: Update to GitHub actions setup-python@5
  Added manually curated bank registry for Montenegro
  Add CHANGELOG for 2024.04.0 release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants