Clean up, comment more in provision.py.

Also remove unused import.

(imported from commit 8ba0020758ad842085b4f7dae7bfa3560281bd3a)
This commit is contained in:
Luke Faraone 2015-08-18 19:18:49 -07:00 committed by Tim Abbott
parent 75d0146d33
commit 7e78dc4ca1
1 changed files with 5 additions and 3 deletions

View File

@ -91,6 +91,8 @@ with sh.sudo:
sh.virtualenv(VENV_PATH)
# Add the ./tools and ./sctipts/setup directories inside the repository root to
# the system path; we'll reference them later.
orig_path = os.environ["PATH"]
os.environ["PATH"] = os.pathsep.join((
os.path.join(ZULIP_PATH, "tools"),
@ -98,17 +100,17 @@ os.environ["PATH"] = os.pathsep.join((
orig_path
))
# Switch current Python context to the virtualenv.
activate_this = os.path.join(VENV_PATH, "bin", "activate_this.py")
execfile(activate_this, dict(__file__=activate_this))
sh.pip.install(r="requirements.txt")
sh.pip.install(requirement=os.path.join(ZULIP_PATH, "requirements.txt"))
with sh.sudo:
sh.cp(REPO_STOPWORDS_PATH, TSEARCH_STOPWORDS_PATH)
# Management commands expect to be run from the root of the project.
os.chdir(ZULIP_PATH)
import sys
sh.configure_rabbitmq()
sh.postgres_init_db()
sh.do_destroy_rebuild_database()