Commit Graph

83 Commits

Author SHA1 Message Date
Eklavya Sharma 0365a4a9f2 Factor out apt dependencies for setting up virtualenv.
Move apt dependencies for creating a virtualenv from provision.py
to scripts/lib/setup_venv.py.
2016-06-23 14:17:17 -07:00
Tim Abbott 4b2e661705 travis: Skip development service restarts in production tests. 2016-06-22 10:41:09 -07:00
Tim Abbott 5a109cf816 travis: Skip development database setup in production tests.
This saves about 20s on the runtime of the production build.
2016-06-22 10:41:09 -07:00
Tim Abbott c74a74dc74 provision: Use --no-install-recommends when installing deps. 2016-06-22 09:34:49 -07:00
Eklavya Sharma fc8d4f9ef5 Factor out venv-creating code from provision.py.
Move setup_virtualenv and do_setup_virtualenv from provision.py to
scripts/lib/setup_venv.py.
2016-06-21 11:25:41 -07:00
Umair Khan 4149b0bb56 Fix path to hash_req.py in provision.py.
Fixes #1081.
2016-06-21 07:01:45 -07:00
Eklavya Sharma 81ecfc5a43 Split requirements.txt into multiple files. 2016-06-20 11:09:20 -07:00
Eklavya Sharma 500cc32e64 provision.py: Use tools/hash_reqs.py.
Use tools/hash_reqs.py to generate hash of requirements.txt in
provision.py while setting up virtualenv.
2016-06-20 11:09:20 -07:00
Tim Abbott 5c92639f81 Move mypy requirements to requirements/ directory. 2016-06-18 16:41:40 -07:00
Tim Abbott ce938ca39c Annotate provision.py.
Annotations aren't particularly important here, but it will prevent
coveralls from complaining whenever someone patches provision.py.
2016-06-15 12:12:23 -07:00
Umair Khan 7d3dc5d0b3 Cache npm for Travis CI.
This should speed up all the major Zulip builds in Travis CI.

Fixes #712.
2016-06-15 09:32:50 -07:00
Umair Khan 08045241a7 Cache node_modules in Travis.
Fixes: #712
2016-06-09 14:36:22 -07:00
Nathan Florea 04c71fadc6 More removal of mutable default arguments.
I've left a few that clearly aren't being passed and aren't being mutated, but
I think I've gotten the rest of them.
2016-06-03 09:17:04 -07:00
Umair Khan 072551a94e Fix most redownloading in 'vagrant reload --provision'.
Fixes #264.
2016-06-02 22:32:56 -07:00
Umair Khan 0278ce9102 Move tools/py3_test_reqs.txt to tools/setup/.
Fixes #708
2016-05-26 18:43:24 +05:00
Umair Khan 57f477dd8b Move tools/install-phantomjs to tools/setup/. 2016-05-26 18:28:14 +05:00
Umair Khan 1161862b07 Move tools/emoji_dump to tools/setup/. 2016-05-26 18:28:14 +05:00
Umair Khan b85526576a Move tools/postgres-init-dev-db to tools/setup/. 2016-05-26 18:28:10 +05:00
Umair Khan b0991966ab Move tools/postgres-init-test-db to tools/setup/. 2016-05-26 18:28:05 +05:00
Umair Khan d5f3a82284 Move tools/download-zxcvbn to tools/setup. 2016-05-26 16:05:23 +05:00
Eklavya Sharma 1c04560def Re-enable pyflakes in linter and remove python 3 pyflakes errors. 2016-05-25 19:25:13 +05:30
Umair Khan e56d3196ef Update provisioning/release scripts to build `.mo` files.
We need to update provision.py to compile the messages files, since
they are needed for the new i18n tests.  And of course we need to
include the .mo files in release tarballs; there's a bit of complexity
there around how the tarball archives are created.
2016-05-18 19:30:00 -07:00
Tim Abbott bfdde2e9b9 provision: Add missing dependency on python3-dev.
This fixes an issue introduced by
b21454d05e, where the typed_ast module
wouldn't build properly when provisioning, because we didn't have the
necessary headers installed.
2016-05-07 13:31:26 -07:00
Tim Abbott 6a335fc090 Travis: Use /srv/zulip-venv-cache cache. 2016-05-03 14:48:21 -07:00
Tim Abbott 9970341ede Fix caching of install-phantomjs library in Travis CI. 2016-05-03 14:48:21 -07:00
Tim Abbott 9f786a5131 provision: Add caching of virtualenvs by sha1sum of requirements.txt.
This should save a couple minutes on the time it takes to provision a
Zulip environment on a machine that has provisioned with the same
requirements.txt file content before.

We can't yet use this in Travis CI because Travis CI doesn't support
using both sudo and caching in the same build.
2016-05-02 23:08:59 -07:00
Tim Abbott ef95917da5 provision: Refactor virtualenv creation into a function. 2016-05-02 22:35:18 -07:00
Eklavya Sharma 1041115b38 Add code to install mypy from provision.py. 2016-04-28 12:28:24 -07:00
Tim Abbott 7d64bd51f5 provision: Don't install recursive pip dependencies.
This should prevent future issues like the wrong cryptography module
being in requirements.txt.
2016-04-10 17:37:52 -07:00
Tim Abbott b29cb1dfb8 provision: Remove now-unnecessary patching of PATH. 2016-04-10 17:37:52 -07:00
Tim Abbott 6de15606f9 provision: Add preliminary support for Ubuntu Xenial.
This won't actually work because we don't have a tsearch_extras
package built for postgres 9.5.
2016-04-10 17:37:52 -07:00
Tim Abbott 3c74bf000f provision: Add installing recent npm to provisioning process.
This fixes a problem where the version of NPM installed in development
environments was too old.
2016-04-10 17:37:43 -07:00
Tim Abbott 5733c32705 Fix install-phantomjs being called before chdir to ZULIP_PATH. 2016-04-10 17:33:37 -07:00
Tim Abbott 52fc1c71bc provision: Rewrite using subprocess module instead of sh.
The `with sh.sudo` pattern that we were using in python-sh was
deprecated, and emperically hangs on Ubuntu xenial.  Since in general
the use of python-sh/python-pbs caused trouble (requiring extra
dependencies, confusing syntax), this just removes it.

We replace it with a new zulip_tools.py library function that echoes
the command line and streams the output.

We do the same to install-phantomjs so we can remove that dependency.
2016-04-10 17:33:19 -07:00
Tim Abbott 877b4af24a Replace platform.codename and friends with lsb_release.
The old code was producing incorrect output of "debian" as the release
on Travis CI's Ubuntu Trusty nodes.
2016-04-08 12:35:08 -07:00
Tim Abbott 6969c26dfa provision: Fix hardcoding of trusty codename. 2016-04-08 12:17:45 -07:00
Tim Abbott 64973fc4e6 provision: Refactor postgres version to be a variable. 2016-04-08 12:17:45 -07:00
Tim Abbott 7fe9a6b74b provision: check arch and codename earlier in setup process. 2016-04-08 12:17:45 -07:00
Tim Abbott 7dd9e93f9b provision: Exit with an error with unsupported platform. 2016-04-08 12:17:45 -07:00
Tim Abbott 5d13d62057 provision: simplify logging configuration. 2016-04-08 12:17:45 -07:00
Tim Abbott fc4e8730f3 provision: Compute ZULIP_PATH dynamically. 2016-04-08 12:17:45 -07:00
Tim Abbott 10777c85d4 Move `npm install` to end of development installation process.
This should make it easier for users to recover from failed `npm
install` commands when setting up their environment.
2016-03-29 21:56:19 -07:00
Tim Abbott c16749d783 Add missing dependency on netcat in both dev and prod.
Fixes #474.
2016-03-29 21:30:48 -07:00
Tim Abbott d8493b071b Fetch tsearch_extras packages from GitHub dist repository. 2016-03-29 21:25:33 -07:00
goelakash 36cf398ec3 Factor out phantomjs download script for use in by-hand instructions.
Also, modify README.dev.md to document need to run this script to
download PhantomJS.

Fixes #499.

[cleaned up a bit by tabbott]
2016-03-29 20:10:17 -07:00
Vladislav Manchev 294030ca04 Fix Travis failures due to redirects when downloading PhantomJS. 2016-03-23 21:54:56 -07:00
Tim Abbott 307f25308c provision: Add support for 32-bit x86 platform.
The only places we use the architecture were for finding the
tsearch_extras and phantomjs binaries; Luke Faraone kindly uploaded
both 32-bit and 64-bit binaries for tsearch_extras 0.1.3, so with a
bit of refactoring, we can now support 32-bit.

Fixes #505.
2016-03-13 10:11:19 -07:00
Luke Faraone c89d675462 Add missing wget dependency to provision.py
We also explicitly include `ca-certificates`, as it is needed for the install
to complete. Usually this is brought in as a `Recommends` of `wget`, but some
systems may not automatically include such dependencies.

Fixes #470.
2016-02-18 03:41:16 +00:00
Tim Abbott ff3555734d provision: Return success from main function. 2016-02-03 19:25:19 -08:00
Tim Abbott bed847e029 travis: Cache the phantomjs package downloads between builds.
This should hopefully fix the issue we've been seeing with
bitbucket.org rejecting connections from Travis CI by not needing to
connect to them.
2016-01-09 15:46:29 -08:00