Install PhantomJS 1.9.8 from binary download

Now the tests don't crash for me all the time.

(imported from commit bbecff2840f888ca44115f83eed84709434500b2)
This commit is contained in:
Reid Barton 2015-08-21 13:28:07 -07:00
parent 3cfebbd9c0
commit f25f935c02
1 changed files with 10 additions and 1 deletions

View File

@ -30,7 +30,6 @@ APT_DEPENDENCIES = {
"python-virtualenv",
"supervisor",
"git",
"phantomjs",
"npm",
"node-jquery",
"yui-compressor",
@ -105,6 +104,16 @@ def main():
with sh.sudo:
sh.dpkg("--install", temp_deb_path, **LOUD)
with sh.sudo:
PHANTOMJS_PATH = "/srv/phantomjs"
PHANTOMJS_TARBALL = os.path.join(PHANTOMJS_PATH, "phantomjs-1.9.8-linux-x86_64.tar.bz2")
sh.mkdir("-p", PHANTOMJS_PATH, **LOUD)
sh.wget("https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2",
output_document=PHANTOMJS_TARBALL, **LOUD)
sh.tar("xj", directory=PHANTOMJS_PATH, file=PHANTOMJS_TARBALL, **LOUD)
sh.ln("-sf", os.path.join(PHANTOMJS_PATH, "phantomjs-1.9.8-linux-x86_64", "bin", "phantomjs"),
"/usr/local/bin/phantomjs", **LOUD)
with sh.sudo:
sh.rm("-rf", VENV_PATH, **LOUD)
sh.mkdir("-p", VENV_PATH, **LOUD)