create-production-venv: Remove Python 2 support.

We still create a Python 2 virtualenv for thumbor but that’s
separate (/srv/zulip-thumbor-venv from
scripts/lib/create-thumbor-venv).

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2019-01-09 16:30:44 -08:00
committed by Tim Abbott
parent 4c603990d2
commit 2ad1a27b28
5 changed files with 7 additions and 7 deletions

View File

@@ -40,7 +40,7 @@ python_version = sys.version_info[0]
# relative path in requirements/common.in works. # relative path in requirements/common.in works.
os.chdir(ZULIP_PATH) os.chdir(ZULIP_PATH)
venv_name = "zulip-venv" if sys.version_info[0] == 2 else "zulip-py3-venv" venv_name = "zulip-py3-venv"
cached_venv_path = setup_virtualenv( cached_venv_path = setup_virtualenv(
os.path.join(args.deploy_path, venv_name), os.path.join(args.deploy_path, venv_name),
os.path.join(ZULIP_PATH, "requirements", "prod.txt"), os.path.join(ZULIP_PATH, "requirements", "prod.txt"),

View File

@@ -191,7 +191,7 @@ Now you can test using Zulip itself, or curl on the command line.
Using `manage.py` from within the Zulip development environment: Using `manage.py` from within the Zulip development environment:
``` ```
(zulip-venv)vagrant@vagrant-ubuntu-trusty-64:/srv/zulip$ (zulip-py3-venv)vagrant@vagrant-ubuntu-trusty-64:/srv/zulip$
./manage.py send_webhook_fixture_message \ ./manage.py send_webhook_fixture_message \
--fixture=zerver/webhooks/helloworld/fixtures/hello.json \ --fixture=zerver/webhooks/helloworld/fixtures/hello.json \
'--url=http://localhost:9991/api/v1/external/helloworld?api_key=<api_key>' '--url=http://localhost:9991/api/v1/external/helloworld?api_key=<api_key>'
@@ -303,7 +303,7 @@ Once you have written some tests, you can run just these new tests from within
the Zulip development environment with this command: the Zulip development environment with this command:
``` ```
(zulip-venv)vagrant@vagrant-ubuntu-trusty-64:/srv/zulip$ (zulip-py3-venv)vagrant@vagrant-ubuntu-trusty-64:/srv/zulip$
./tools/test-backend zerver/webhooks/helloworld ./tools/test-backend zerver/webhooks/helloworld
``` ```
@@ -352,7 +352,7 @@ stream name:
To trigger a notification using this webhook, use To trigger a notification using this webhook, use
`send_webhook_fixture_message` from the Zulip command line: `send_webhook_fixture_message` from the Zulip command line:
(zulip-venv)vagrant@vagrant-ubuntu-trusty-64:/srv/zulip$ (zulip-py3-venv)vagrant@vagrant-ubuntu-trusty-64:/srv/zulip$
./manage.py send_webhook_fixture_message \ ./manage.py send_webhook_fixture_message \
--fixture=zerver/tests/fixtures/helloworld/hello.json \ --fixture=zerver/tests/fixtures/helloworld/hello.json \
'--url=http://localhost:9991/api/v1/external/helloworld?api_key=&lt;api_key&gt;' '--url=http://localhost:9991/api/v1/external/helloworld?api_key=&lt;api_key&gt;'

View File

@@ -97,7 +97,7 @@ Your remote Zulip dev server has been created!
`ssh zulipdev@<username>.zulipdev.org` on the command line `ssh zulipdev@<username>.zulipdev.org` on the command line
(Terminal for macOS and Linux, Bash for Git on Windows). (Terminal for macOS and Linux, Bash for Git on Windows).
- There is no password; your account is configured to use your ssh keys. - There is no password; your account is configured to use your ssh keys.
- Once you log in, you should see `(zulip-venv) ~$`. - Once you log in, you should see `(zulip-py3-venv) ~$`.
- To start the dev server, `cd zulip` and then run `./tools/run-dev.py`. - To start the dev server, `cd zulip` and then run `./tools/run-dev.py`.
- While the dev server is running, you can see the Zulip server in your browser - While the dev server is running, you can see the Zulip server in your browser
at http://<username>.zulipdev.org:9991. at http://<username>.zulipdev.org:9991.

View File

@@ -206,7 +206,7 @@ Your remote Zulip dev server has been created!
`ssh zulipdev@{0}.zulipdev.org` on the command line `ssh zulipdev@{0}.zulipdev.org` on the command line
(Terminal for macOS and Linux, Bash for Git on Windows). (Terminal for macOS and Linux, Bash for Git on Windows).
- There is no password; your account is configured to use your ssh keys. - There is no password; your account is configured to use your ssh keys.
- Once you log in, you should see `(zulip-venv) ~$`. - Once you log in, you should see `(zulip-py3-venv) ~$`.
- To start the dev server, `cd zulip` and then run `./tools/run-dev.py`. - To start the dev server, `cd zulip` and then run `./tools/run-dev.py`.
- While the dev server is running, you can see the Zulip server in your browser at - While the dev server is running, you can see the Zulip server in your browser at
http://{0}.zulipdev.org:9991. http://{0}.zulipdev.org:9991.

View File

@@ -15,7 +15,7 @@ To trigger a notification using this webhook, use
`send_webhook_fixture_message` from the Zulip command line: `send_webhook_fixture_message` from the Zulip command line:
``` ```
(zulip-venv)vagrant@vagrant-ubuntu-trusty-64:/srv/zulip$ (zulip-py3-venv)vagrant@vagrant-ubuntu-trusty-64:/srv/zulip$
./manage.py send_webhook_fixture_message \ ./manage.py send_webhook_fixture_message \
> --fixture=zerver/tests/fixtures/helloworld/hello.json \ > --fixture=zerver/tests/fixtures/helloworld/hello.json \
> '--url=http://localhost:9991/api/v1/external/helloworld?api_key=&lt;api_key&gt;' > '--url=http://localhost:9991/api/v1/external/helloworld?api_key=&lt;api_key&gt;'