mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-02 21:15:20 +01:00
c8a3c8feb6
The first version took the folders from sysconfig, which isn't always what the site module added: on Windows site also put python64 itself on sys.path, and on Linux a distribution's patched Python can give sysconfig another install scheme than site uses (Debian's posix_local), while linuxpython64 is a venv whose packages are where site looks. The folders now come from site.getsitepackages(), the ones that exist, added with site.makepath() as site.addsitepackages() does, still without the .pth files. Importing site doesn't run its main() when the interpreter was started without it (sys.flags.no_site). Tried again with the stale easy-install.pth and egg planted in python64: "Python Interpreter: setup complete", no ImportError. The snippet under python -S adds the same folders as site, minus the user site folder.