Mercurial > piecrust2
comparison garcon/documentation.py @ 800:d4b9d86d3d6f
cm: Allow generating documentation from inside the virtualenv.
Hopefully it goes well...?
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 08 Sep 2016 19:28:34 -0700 |
parents | a409a7bb3948 |
children | 22cf13b86cc3 |
comparison
equal
deleted
inserted
replaced
799:59147dd04d49 | 800:d4b9d86d3d6f |
---|---|
24 if not tmp_dir: | 24 if not tmp_dir: |
25 tmp_dir = os.path.join(base_dir, '_docs-counter') | 25 tmp_dir = os.path.join(base_dir, '_docs-counter') |
26 | 26 |
27 if not venv_dir: | 27 if not venv_dir: |
28 venv_dir = os.path.join(base_dir, 'venv') | 28 venv_dir = os.path.join(base_dir, 'venv') |
29 | |
30 if sys.prefix == venv_dir: | |
31 raise Exception( | |
32 "Don't run this script in the PieCrust virtual environment.") | |
33 | 29 |
34 if not os.path.isdir(venv_dir): | 30 if not os.path.isdir(venv_dir): |
35 print("Creating virtual environment in: %s" % venv_dir) | 31 print("Creating virtual environment in: %s" % venv_dir) |
36 run('virtualenv -p python3 "%s"' % venv_dir) | 32 run('virtualenv -p python3 "%s"' % venv_dir) |
37 | 33 |