You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the current development head outside a virtual env, the original site-package is included. So we need to revert 12de5e2 and re-establish the fake-site module, see e47e4a2.
This reverts 12de5e2 and re-establish the fake-site
module, see e47e4a2.
David Vierra wrote:
I'm wondering why, exactly, this hook is trying to bring in the actual
site.py. In the past (e47e4a2), PyInstaller explicitly avoided
bundling the original site.py, inserting a fake site module instead.
It did this because importing the real site module may cause items to
be added to sys.path, fouling the module search process at runtime.
(See pyinstaller#510 for discussion). Later (12de5e2), after setting the
interpreter option to disable automatic import of site.py, PyInstaller
dropped the fake-site module entirely.
This meant that the real site.py would still be bundled, but it
wouldn't be imported except when some other module explicitly imports
it (...for whatever reason). Almost immediately afterward (8eb40c3),
the current hook-site.py was added, to bundle the site.py from the
base installation when running in a virtualenv.
When some other module does explicitly import site, this does the same
sys.path manipulation for site-specific folders (and .pth files)
that's normally done on interpreter startup when we don't tell it
otherwise (via -s or Py_NoSite=1).
I think including the real site.py is not correct for the reasons
given in pyinstaller#510 - PyInstaller built apps are self-contained so all the
concepts related to "site-specific" stuff don't apply. hook-site.py
should go back to inserting a fake site module that just does the bare
minimum of what is needed to support modules that import site
directly.
This closespyinstaller#1536.
When running the current development head outside a virtual env, the original
site-package
is included. So we need to revert 12de5e2 and re-establish the fake-site module, see e47e4a2.See also #1393 (comment) and #1507.
The text was updated successfully, but these errors were encountered: