Commit Graph

71 Commits

Author SHA1 Message Date
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
Javier Ros ab89ef501f Add support for a development environment with Docker. 2015-12-14 18:22:56 -08:00
Allie Jones 4de0325a9d Install node dependencies using npm.
The node packages 'jQuery' and 'jquery' are different--'jQuery' is the
legacy support package that is needed for Zulip so the require statements
in the tests were updated.

Travis uses node 4.0 by default and we are using 0.10, so the command to
install the correct version had to be added to the .travis.yml file.
2015-11-06 09:08:59 -08:00
Allie Jones 46e267f4dc Add node-legacy package.
Some dependencies aren't configured to find the node binary correctly on
Debian (since it is called nodejs instead of node). The node-legacy package
fixes this.
2015-11-06 09:08:50 -08:00
Shumbashi 123791bfdd Fix 'manage.py makemessages' errors.
Running 'manage.py makemessages' produced two errors previously.

Closes #265.
2015-11-04 07:39:48 -08:00
Tim Abbott f3783fb4a1 Apply Python 3 futurize transform libfuturize.fixes.fix_print_with_import. 2015-11-01 09:26:16 -08:00
Tim Abbott 3e735d36d1 Rename tools/postgres-init-db to tools/postgres-init-dev-db.
The previous name was confusing because we also have
scripts/setup/postgres-init-db.
2015-10-15 09:14:21 -04:00
Tim Abbott 5ee50cdced Install libfreetype6-dev in the development environment.
This fixes a problem where the emoji_dump tool was not generating the
black-and-white emoji.  The issue is that Pillow compiled without
libfreetype cannot extract those emoji (and gives an error of the form
"The _imagingft C module is not installed"), and if libfreetype-dev
isn't installed, pip will happily build and install Pillow without
libfreetype.
2015-10-14 18:58:36 -04:00
Tim Abbott c6761e8604 provision.py: Check whether git repository is present.
Fixes #148.
2015-10-14 10:18:59 -04:00
Tim Abbott 1f2f497cab Unrevert run Zulip tests automatically using Travis CI.
This contains a fix written by nemeth from PR #63 for doing argument
parsing properly.
2015-09-28 09:18:51 -07:00
Luke Faraone 578f769f60 Revert "Run Zulip tests automatically using Travis CI."
Improper list access from `sys.argv` would result in an exception if no
arguments are passed.

This reverts commit d2f5937d89.
2015-09-28 14:33:13 +00:00
Tim Abbott d2f5937d89 Run Zulip tests automatically using Travis CI.
This is a bit hackish in that ideally we'd use proper options parsing
in provision.py, but it works and I even ran the tests 100x for tests
for flakes and didn't get any, so it's definitely an improvement!

With this we'll be both testing the runtime and effectively the Dev VM
setup process, which is awesome; the additional thing I'd want to add
tests for is the production setup process...
2015-09-27 16:29:20 -07:00
Tim Abbott 9c0c5c57a7 Download zxcvbn.js rather than vendoring it.
(imported from commit 8d55b6b903dc2292852636dfb444219b643b5f64)
2015-09-25 02:24:07 -07:00