> The bin/python3 executable in a framework is a small stub that > execv's the real interpreter that is stuffed in a Python.app bundle > inside the Python framework. That's done to ensure that GUI code can > work from the command-line, Apple's GUI framework refuse to work when > the executable is not in an application bundle. > > Because of this trick pyvenv won't know which executable the user > actually called and hence cannot find the pyvenv configuration file > (which is next to the stub executable). I don't understand. The "executable that the user actually called": does that refer to a) the stub (which the user *actually* called) or b) the eventual binary (which is what gets *actually* run). If a), then I think argv[0] just needs to continue to refer to the stub, which is easy to achieve in execv. If b), I wonder why the code needs to know the location to the binary inside the bundle. But if this is needed to know, I suggest that some environment variable is passed from the stub to the actual binary (akin PYTHONHOME). How does the stub normally find out where the framework is located? Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4