Using relative python path in exe files generated by `ScriptMaker`
Ilya Kazakevich via python-win32 <[email protected]> Tue, 10 Dec 2024 01:03:33 +0100
| Newsgroups | gmane.comp.python.windows |
|---|---|
| Message-ID | <CAMQsgbQEzR-oHZfCbfjx6=+fdQ-RH917XwPNzmGE4WAPJCG0-Q@mail.gmail.com> |
Hello, I create an environment on one Windows machine and then move it to another one. Once I call `pip install` it creates `.exe` files for tools i.e `poetry.exe`, `django-admin.exe` e.t.c. This is done by a class called `ScriptMaker` as I see. The problem is it sets a full path (`sys.executable`) so I can't move it to another machine or directory. To fix it I can use relative path ``` ScriptMaker.executable = "../python.exe" ``` for example, but how can I "patch" the pip? I can put this code into `sitecustomize.py` but it looks like a hack. Any suggestions on how to fix it in a proper way? Thank you in advance, Ilya.