summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen West <bewest@gmail.com>2015-05-14 19:34:20 -0700
committerBen West <bewest@gmail.com>2015-05-14 19:34:20 -0700
commitb2b986fc71982fcafe9e6aff66ccf9497782a63c (patch)
treef33f5553a20cc1d4e9bb9ea2e3b2796d6b855a63
parent55c5cf9f43b92d1c419800546f5249ae9f4cfd31 (diff)
more debugging
-rw-r--r--setup.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 28f1979..b332abf 100644
--- a/setup.py
+++ b/setup.py
@@ -3,11 +3,15 @@
3from setuptools import setup, find_packages 3from setuptools import setup, find_packages
4import platform 4import platform
5import subprocess 5import subprocess
6import sys
6 7
7def is_virtualenv ( ): 8def 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