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

Ease packaging by not trying to write stuff alongside the python code #122

Open
Mynacol opened this issue Jul 25, 2024 · 0 comments
Open
Labels
enhancement New feature or request question Further information is requested

Comments

@Mynacol
Copy link

Mynacol commented Jul 25, 2024

Is your feature request related to a problem? Please describe.
I am packaging botright for NixOS, which places the resulting package below the read-only /nix/store. This led to multiple issues in hcaptcha_challenger and botright by throwing permission errors.

Describe the solution you'd like
Modify the code to not depend being able to write alongside the python code. That'd ease packaging.

The offending place here is this line. Changing it to tmp_dir = Path("./hcaptcha-challenger/tmp_dir") fixes this problem.
I'm open to another path to store this data. Maybe as it is temporary, /tmp or /var/tmp are useful places? (by just using a mktempdir function). Alternatively, a configurable place for this data is also fine by me.

Describe alternatives you've considered
Continue needing to patch the source while packaging. This is unpleasant and makes updates harder.

Additional context
FYI two other patches are in place in my packaging script:

  1. Removing all undetected_playwright imports because it is not available, I was unable to package it and just use playwright anyways. Without it, python errors out because it cannot find the module.
  2. The chrome browser is not found (code). I know this is a problem of the browsers library you use.
@Mynacol Mynacol added enhancement New feature or request question Further information is requested labels Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant