Add libwww-perl and python mock dependencies, so tests can run on ubuntu 14.04
authorTom Clegg <tom@curoverse.com>
Fri, 6 Nov 2015 17:41:24 +0000 (12:41 -0500)
committerTom Clegg <tom@curoverse.com>
Fri, 6 Nov 2015 17:41:24 +0000 (12:41 -0500)
If we let setuptools install mock for us (because it's listed in
tests_require), "python setup.py test" fails:

running test
Searching for mock>=1.0
Best match: mock 1.3.0
Processing mock-1.3.0-py2.7.egg

Using /tmp/arvados/sdk/python/.eggs/mock-1.3.0-py2.7.egg
Traceback (most recent call last):
  File "setup.py", line 49, in <module>
    cmdclass={'egg_info': tagger},
[...]
  File "/tmp/.cache/arvados-build/VENVDIR/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2910, in scan_list
    raise RequirementParseError(msg, line, "at", line[p:])
pkg_resources.RequirementParseError: Expected version spec in funcsigs;python_version<"3.3" at ;python_version<"3.3

No issue #

jenkins/run-tests.sh

index 8e845cb8ced5d0ef750cdbbbf8021d66973b2b7f..c528363e91787474138f207c28ef6fff1ffa606b 100755 (executable)
@@ -151,7 +151,7 @@ sanity_checks() {
     echo Checking dependencies:
     echo -n 'virtualenv: '
     virtualenv --version \
-        || fatal "No virtualenv. Try: apt-get install virtualenv"
+        || fatal "No virtualenv. Try: apt-get install virtualenv (on ubuntu: python-virtualenv)"
     echo -n 'go: '
     go version \
         || fatal "No go binary. See http://golang.org/doc/install"
@@ -173,7 +173,7 @@ sanity_checks() {
     for mod in ExtUtils::MakeMaker JSON LWP Net::SSL; do
         echo -n "perl $mod: "
         perl -e "use $mod; print \"\$$mod::VERSION\\n\"" \
-            || fatal "No $mod. Try: apt-get install perl-modules libcrypt-ssleay-perl libjson-perl"
+            || fatal "No $mod. Try: apt-get install perl-modules libcrypt-ssleay-perl libjson-perl libwww-perl"
     done
     echo -n 'gitolite: '
     which gitolite \
@@ -392,6 +392,8 @@ setup_virtualenv() {
         virtualenv --setuptools "$@" "$venvdest" || fatal "virtualenv $venvdest failed"
     fi
     "$venvdest/bin/pip" install 'setuptools>=18' 'pip>=7'
+    # ubuntu1404 can't seem to install mock via tests_require, but it can do this.
+    "$venvdest/bin/pip" install 'mock>=1.0'
 }
 
 export PERLINSTALLBASE