The problem is not the Python3 FakeModule class; it has support for
retarget() and is working for hook-distutils.

The problem is that in my system, compat.is_venv is False, even though this
is a virtualenv. As a result, hook-site does nothing and the error follows.

hook-distutils uses a different method of checking for a venv and is
working correctly.

The test in compat.py is sys.base_prefix != sys.prefix. This should
correctly detect virtualenv, per the 3.4 doc[0].

In my system it does not. In fact in my system there exists a
sys.real_prefix which is an attribute from Python 2.7 that is not even
documented in Python 3.

Python 3.4.2 (default, Oct  8 2014, 13:18:07)
> [GCC 4.9.1] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import sys
> >>> sys.prefix
> '/home/dcortesi/VENV3'
> >>> sys.base_prefix
> '/home/dcortesi/VENV3'
> >>> sys.real_prefix
> '/usr'
>

So I am very confused about how this test should be made in Python 3. Any
comments would be helpful.


[0] https://docs.python.org/3.4/library/sys.html#sys.base_prefix

-- 
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