I have found the source of the confusing code -- it was easy when I 
followed the history of hook-site.py.

The code was added by matysik to the Python3 branch only in June 2014 in a 
series of commits all related to issue #85.

commit 8eb40c 
<https://github.com/pyinstaller/pyinstaller/commit/8eb40c371a84091da5788110269acc019037bf73>
 
says to use real site.py instead of the one from virtualenv. Not clear why 
it needs to use ANY site.py, because the preceding commit had completely 
gutted hook-site.py as unnecessary.

commit 36e6fe 
<https://github.com/pyinstaller/pyinstaller/commit/38e6fea6725ee9cf8404d85ea0a02a1f43d78931>
 
fixed a typo in that code.

commit cf2b5a 
<https://github.com/pyinstaller/pyinstaller/commit/cf2b5ac2cd80fc30e8b21cfd1170d370d5af828e>
 
changed commit.py to stop looking at sys.base_prefix and made both 
commit.py and hook-site.py use sys.real_prefix directly.

commit 1587a1 
<https://github.com/pyinstaller/pyinstaller/commit/1587a19a6071257c05a29a8aec3dd0b8595abe17>
 
changed that again in compat.py and changed hook-site and several other 
hooks to use the new code in compat.py.

None of this activity happened on the Develop branch or the 2.1 tag; they 
still have the "use a fake site.py" code.

So in a way this deepens the mystery -- why use site.py only in a VENV, and 
why only under Python3?

What I need to do now is figure out either (a) what exactly is going wrong 
with that code in my Ubuntu test, or (b) how to use Git to un-do exactly 
those commits from my clone and see if it will run without that code.

Well, it's all good experience. If I wanted experience I would be very 
happy.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.

Reply via email to