Use virtualenv to get a newer setuptools that doesn't munge Python versions. No issue #
authorTom Clegg <tom@curoverse.com>
Sat, 7 Feb 2015 09:56:15 +0000 (04:56 -0500)
committerTom Clegg <tom@curoverse.com>
Sat, 7 Feb 2015 09:56:15 +0000 (04:56 -0500)
jenkins/run-build-packages.sh

index 1dae4bcd783e9ebf905c82ad08c8ab71ab2a1aef..cdf1d17a251b6b5fa0cfbb43d0b102ae92e592e4 100755 (executable)
@@ -85,6 +85,14 @@ if [[ "$DEBUG" != 0 ]]; then
   echo "Workspace is $WORKSPACE"
 fi
 
+# We need a recent setuptools. Older ones replace + with - in our
+# version numbers, making them non-PEP-440-compliant and
+# non-uploadable.
+VENV=$(mktemp -d)
+echo "Using virtualenv $VENV"
+virtualenv "$VENV"
+. "$VENV/bin/activate"
+
 version_from_git() {
   # Generates a version number from the git log for the current working
   # directory, and writes it to stdout.
@@ -477,7 +485,8 @@ else
   fi
 fi
 
-# clean up temporary GOPATH
+# clean up temporary GOPATH and VENV
 rm -rf "$GOPATH"
+rm -rf "$VENV"
 
 exit $EXITCODE