提交 53985ea6 编写于 作者: A Amador Pahim

setup.py: fix the virtualenv detection

VIRTUAL_ENV variable might not be always present. That's the
case for ReadTheDocs. On the other hand, sys.real_prefix seems to
be a more reliable way to detect we are under a virtualenv.
Signed-off-by: NAmador Pahim <apahim@redhat.com>
上级 e43e59cc
......@@ -15,12 +15,13 @@
import glob
import os
import sys
# pylint: disable=E0611
from setuptools import setup, find_packages
VIRTUAL_ENV = 'VIRTUAL_ENV' in os.environ
VIRTUAL_ENV = hasattr(sys, 'real_prefix')
def get_dir(system_path=None, virtual_path=None):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册