chiark / gitweb /
Merge branch 'master' into 'master'
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 14 Mar 2016 12:54:10 +0000 (12:54 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Mon, 14 Mar 2016 12:54:10 +0000 (12:54 +0000)
post-py3 fixes

This is a collection of fixes related to running on py3 on various platforms.

See merge request !110

.travis.yml
fdroid
fdroidserver/build.py
hooks/pre-commit
jenkins-build-makebuildserver
makebuildserver

index bf7c479a0a1354abaf377741791f22bf9dbad7b8..8fe558745cded8daa60328bd665c22764c885d1c 100644 (file)
@@ -22,21 +22,21 @@ licenses:
 # the pip thing is a hack that can go away with trusty
 install:
   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
-      brew update;
-      brew install android-sdk dash gnu-sed jpeg python;
-      sudo pip install pep8 pyflakes pylint;
-      sudo pip install -e  .;
+      brew update > /dev/null;
+      brew install android-sdk dash gnu-sed jpeg python3;
+      sudo pip3 install pep8 pyflakes pylint;
+      sudo pip3 install -e  .;
       sudo rm -rf fdroidserver.egg-info;
-      echo y | android --verbose update sdk --no-ui --filter platform-tools,build-tools-23.0.2;
+      echo y | android --verbose update sdk --no-ui --all --filter platform-tools,build-tools-23.0.2;
       elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
       sudo add-apt-repository ppa:guardianproject/fdroidserver -y;
       sudo apt-get -q update -y;
-      sudo apt-get -q install -y --no-install-recommends python
-      python-git python-imaging python-libcloud python-logilab-astng
-      python-paramiko python-pip python-pyasn1 python-pyasn1-modules
-      python-requests python-virtualenv python-yaml rsync
-      pylint pep8 dash bash ruby
-      python-dev libjpeg-dev zlib1g-dev;
+      sudo apt-get -q install -y --no-install-recommends python3 python3-dev
+      python3-git python3-pil python3-libcloud python3-logilab-astng
+      python3-paramiko python3-pip python3-pyasn1 python3-pyasn1-modules
+      python3-requests python3-virtualenv python3-yaml rsync
+      pyflakes pylint3 pep8 dash bash ruby libjpeg-dev zlib1g-dev;
+      sudo pip3 install pylint;
       fi
 
 script:
diff --git a/fdroid b/fdroid
index 045f2aacf8e5f133c61fff43c126d7bcb1add75b..53cc00c5dcc5eff9a1bf1e65fdf261300a28141b 100755 (executable)
--- a/fdroid
+++ b/fdroid
@@ -76,9 +76,11 @@ def main():
                     import subprocess
                     try:
                         output = subprocess.check_output(['git', 'describe'],
-                                                         stderr=subprocess.STDOUT)
+                                                         stderr=subprocess.STDOUT,
+                                                         universal_newlines=True)
                     except subprocess.CalledProcessError:
-                        output = 'git commit ' + subprocess.check_output(['git', 'rev-parse', 'HEAD'])
+                        output = 'git commit ' + subprocess.check_output(['git', 'rev-parse', 'HEAD'],
+                                                                         universal_newlines=True)
                 elif os.path.exists('setup.py'):
                     import re
                     m = re.search(r'''.*[\s,\(]+version\s*=\s*["']([0-9a-z.]+)["'].*''',
index 10f40dc478da8dc214373adc271ac01ab4b67b9a..3837694bd8450a8acaa3f3bd6215d4c2d9515db7 100644 (file)
@@ -176,6 +176,7 @@ def get_clean_vm(reset=False):
         os.mkdir('builder')
 
         p = subprocess.Popen(['vagrant', '--version'],
+                             universal_newlines=True,
                              stdout=subprocess.PIPE)
         vver = p.communicate()[0].strip().split(' ')[1]
         if vver.split('.')[0] != '1' or int(vver.split('.')[1]) < 4:
index f0e4d657d4b92f40294154a6b27d2d6b48e800eb..0f083d00f3f397d6b50d47a86fc8829a479465f6 100755 (executable)
@@ -75,7 +75,7 @@ find_command() {
        for suff in "3" "-python3" ""; do
                cmd=${1}${suff}
                if cmd_exists $cmd; then
-                       echo -n $cmd
+                       echo $cmd
                        return 0
                fi
        done
index 193718b2fe7750c40ae72bd38082143f856bdb4d..36df83afe7fe7d290b5ed904503855c53944bd33 100755 (executable)
@@ -51,6 +51,7 @@ echo "apt_package_cache = True" >> $WORKSPACE/makebuildserver.config.py
 # this can be handled in the jenkins job, or here:
 if [ -e fdroiddata ]; then
     cd fdroiddata
+    git checkout master
     git pull
     cd ..
 else
index dc9d1f44ae022af28dd317772a75f26f1a667f5a..48e0f197ec100d8adc2cd81cc74e2ae90b0443b0 100755 (executable)
@@ -19,7 +19,8 @@ def vagrant(params, cwd=None, printout=False):
                is the stdout (and stderr) from vagrant
     """
     p = subprocess.Popen(['vagrant'] + params, cwd=cwd,
-                         stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+                         stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
+                         universal_newlines=True)
     out = ''
     if printout:
         while True: