Permalink
Browse files

changed how PROJECTENV_PATH is determined to fix issue with the syste…

…m site-packages folder being referenced when trying to install packages into a virtualenv
  • Loading branch information...
1 parent 8ffc3be commit 13561ff612d3083e80663991663946cfc4b2084b @jbgo jbgo committed Jul 19, 2011
Showing with 4 additions and 4 deletions.
  1. +1 −1 bin/projectenv.csh
  2. +1 −1 bin/projectenv.sh
  3. +1 −1 projectenv/commands.py
  4. +1 −1 test/commands_test.py
View
@@ -67,7 +67,7 @@ __projectenv__python:
setenv PYTHONPATH $PROJECTENV_PATH
endif
- python $PROJECTENV_PATH/projectenv $*
+ python $PROJECTENV_PATH $*
if ($?PROJECTENV_OLD_PYTHONPATH) then
setenv PYTHONPATH $PROJECTENV_OLD_PYTHONPATH
View
@@ -31,7 +31,7 @@ __projectenv__off() {
__projectenv__python() {
export _PROJECTENV_OLD_PYTHONPATH=$PYTHONPATH
export PYTHONPATH=$PROJECTENV_PATH:$PYTHONPATH
- python $PROJECTENV_PATH/projectenv $*
+ python $PROJECTENV_PATH $*
export PYTHONPATH=$_PROJECTENV_OLD_PYTHONPATH
unset _PROJECTENV_OLD_PYTHONPATH
}
@@ -36,7 +36,7 @@ def init():
run('virtualenv', '--no-site-packages', env_path())
def path():
- path = os.path.split(os.path.dirname(__file__))[0]
+ path = os.path.dirname(__file__)
print path # output for use in shell scripts
return path # for testing
@@ -51,7 +51,7 @@ def test_unfreeze_env(self):
class PathCommandTestCase(unittest.TestCase):
def test_path(self):
- self.assertEqual(commands.path(), os.path.abspath('.'))
+ self.assertEqual(commands.path(), os.path.abspath('./projectenv'))
class InitCommandTestCase(unittest.TestCase):

0 comments on commit 13561ff

Please sign in to comment.