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

[Question] Ease packaging by not requiring a writable directory #985

Open
Mynacol opened this issue Jul 25, 2024 · 0 comments
Open

[Question] Ease packaging by not requiring a writable directory #985

Mynacol opened this issue Jul 25, 2024 · 0 comments

Comments

@Mynacol
Copy link

Mynacol commented Jul 25, 2024

Brief description

Change the storage path to another location.

I am packaging this program for NixOS. It places all packages at /nix/store, which is read-only. At first launch I got a permission error because this program tried to write alongside the python code, which is read-only.

Patching the above linked offending line from at_dir = Path(__file__).parent to at_dir = Path('./hcaptcha-challenger') fixes the error. If you have a better directory, you can also use that or even make it configurable.

Additionally, multiple places (example) try to access a models/ directory alongside the python code. For now I fixed this by symlinking this directory to somewhere else, but again it would be nice to not have to patch the packaging process and removing flexibility by setting the target at package build time.
Those two fixes make this program fully runnable in my setup.

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

No branches or pull requests

1 participant