diff options
author | Ben West <bewest@gmail.com> | 2015-05-14 19:34:20 -0700 |
---|---|---|
committer | Ben West <bewest@gmail.com> | 2015-05-14 19:34:20 -0700 |
commit | b2b986fc71982fcafe9e6aff66ccf9497782a63c (patch) | |
tree | f33f5553a20cc1d4e9bb9ea2e3b2796d6b855a63 /setup.py | |
parent | 55c5cf9f43b92d1c419800546f5249ae9f4cfd31 (diff) |
more debugging
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -3,11 +3,15 @@ | |||
3 | from setuptools import setup, find_packages | 3 | from setuptools import setup, find_packages |
4 | import platform | 4 | import platform |
5 | import subprocess | 5 | import subprocess |
6 | import sys | ||
6 | 7 | ||
7 | def is_virtualenv ( ): | 8 | def is_virtualenv ( ): |
8 | import os | 9 | import os, os.path |
9 | proc = subprocess.Popen(['which', 'virtualenvwrapper'], stderr=subprocess.PIPE, stdout=subprocess.PIPE) | 10 | proc = subprocess.Popen(['which', 'add2virtualenv'], stderr=subprocess.PIPE, stdout=subprocess.PIPE) |
11 | shell = os.path.dirname(sys.argv[0]) | ||
10 | has_venv = proc.poll( ) == 0 | 12 | has_venv = proc.poll( ) == 0 |
13 | print "shell root shares project root", shell, os.path.dirname(__file__) | ||
14 | print 'real_prefix', getattr(sys, 'real_prefix', '??') | ||
11 | print "RESULT", proc.poll( ), has_venv, os.environ.get('VIRTUAL_ENV') | 15 | print "RESULT", proc.poll( ), has_venv, os.environ.get('VIRTUAL_ENV') |
12 | return os.environ.get('VIRTUAL_ENV', has_venv) | 16 | return os.environ.get('VIRTUAL_ENV', has_venv) |
13 | 17 | ||