Skip to content

Commit

Permalink
Merge pull request #153 from phargogh/master
Browse files Browse the repository at this point in the history
Support @paver.virtual.virtualenv on Windows
  • Loading branch information
Almad committed Oct 5, 2015
2 parents 3d697ef + 9a17720 commit be2426b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion paver/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import itertools
import operator
import traceback
import platform

from os.path import *

Expand Down Expand Up @@ -316,7 +317,11 @@ def __init__(self, func):
def __call__(self, *args, **kw):
if self.use_virtualenv and self.virtualenv_dir:
#TODO: Environment recovery?
activate_this = join(self.virtualenv_dir, "bin", "activate_this.py")
if platform.system() == 'Windows':
bin_dir = 'Scripts'
else:
bin_dir = 'bin'
activate_this = join(self.virtualenv_dir, bin_dir, "activate_this.py")
with open(activate_this) as f:
s = f.read()
code = compile(s, activate_this, 'exec')
Expand Down

0 comments on commit be2426b

Please sign in to comment.