diff --git a/setup.py b/setup.py index b79a84d1ed8e5e7a4c27836f2713378986b2816a..2daa9a369560d620e78867e8eb820e94ae5426ea 100755 --- a/setup.py +++ b/setup.py @@ -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):