py3: Switch almost all shebang lines to use `python3`.
This causes `upgrade-zulip-from-git`, as well as a no-option run of
`tools/build-release-tarball`, to produce a Zulip install running
Python 3, rather than Python 2. In particular this means that the
virtualenv we create, in which all application code runs, is Python 3.
One shebang line, on `zulip-ec2-configure-interfaces`, explicitly
keeps Python 2, and at least one external ops script, `wal-e`, also
still runs on Python 2. See discussion on the respective previous
commits that made those explicit. There may also be some other
third-party scripts we use, outside of this source tree and running
outside our virtualenv, that still run on Python 2.
2017-08-02 23:15:16 +02:00
|
|
|
#!/usr/bin/env python3
|
2014-02-03 21:43:52 +01:00
|
|
|
|
|
|
|
# This script is only meant to be run from run-dev.py, which sets up the
|
|
|
|
# environment correctly and passes the correct arguments for manage.py. It is a
|
|
|
|
# separate script so that the import from zerver.worker.queue_processors (which
|
|
|
|
# is slow) can be done in parallel with the rest of the work in bringing up the
|
|
|
|
# dev server.
|
|
|
|
import sys
|
|
|
|
import os
|
|
|
|
import subprocess
|
|
|
|
|
2017-02-05 21:24:28 +01:00
|
|
|
# check for the venv
|
|
|
|
from lib import sanity_check
|
|
|
|
sanity_check.check_venv(__file__)
|
|
|
|
|
|
|
|
import django
|
2014-02-03 21:43:52 +01:00
|
|
|
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
|
2016-11-14 11:03:06 +01:00
|
|
|
django.setup()
|
|
|
|
|
2015-08-21 00:30:50 +02:00
|
|
|
args = sys.argv[1:]
|
2016-11-22 01:44:16 +01:00
|
|
|
subprocess.Popen(['./manage.py', 'process_queue', '--all'] + args,
|
2015-11-24 07:01:35 +01:00
|
|
|
stderr=subprocess.STDOUT)
|