From 7638a3be1e2f5270119b89e9a7c33a27b401728a Mon Sep 17 00:00:00 2001 From: vitaut Date: Wed, 28 Oct 2015 12:21:57 -0700 Subject: [PATCH] Fixed virtualenv activation on Windows Thanks to @mapgccv. --- doc/build.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/build.py b/doc/build.py index 50dc6a01..4536b8d2 100755 --- a/doc/build.py +++ b/doc/build.py @@ -23,7 +23,10 @@ def build_docs(): doc_dir = os.path.dirname(os.path.realpath(__file__)) virtualenv_dir = 'virtualenv' check_call(['virtualenv', virtualenv_dir]) - activate_this_file = os.path.join(virtualenv_dir, 'bin', 'activate_this.py') + import sysconfig + scripts_dir = os.path.basename(sysconfig.get_path('scripts')) + activate_this_file = os.path.join(virtualenv_dir, scripts_dir, + 'activate_this.py') with open(activate_this_file) as f: exec(f.read(), dict(__file__=activate_this_file)) # Upgrade pip because installation of sphinx with pip 1.1 available on Travis