mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
Merge branch 'master' into 'master'
post-py3 fixes This is a collection of fixes related to running on py3 on various platforms. See merge request !110
This commit is contained in:
commit
c1ac6f4e88
6 changed files with 20 additions and 15 deletions
22
.travis.yml
22
.travis.yml
|
|
@ -22,21 +22,21 @@ licenses:
|
||||||
# the pip thing is a hack that can go away with trusty
|
# the pip thing is a hack that can go away with trusty
|
||||||
install:
|
install:
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||||
brew update;
|
brew update > /dev/null;
|
||||||
brew install android-sdk dash gnu-sed jpeg python;
|
brew install android-sdk dash gnu-sed jpeg python3;
|
||||||
sudo pip install pep8 pyflakes pylint;
|
sudo pip3 install pep8 pyflakes pylint;
|
||||||
sudo pip install -e .;
|
sudo pip3 install -e .;
|
||||||
sudo rm -rf fdroidserver.egg-info;
|
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
|
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||||
sudo add-apt-repository ppa:guardianproject/fdroidserver -y;
|
sudo add-apt-repository ppa:guardianproject/fdroidserver -y;
|
||||||
sudo apt-get -q update -y;
|
sudo apt-get -q update -y;
|
||||||
sudo apt-get -q install -y --no-install-recommends python
|
sudo apt-get -q install -y --no-install-recommends python3 python3-dev
|
||||||
python-git python-imaging python-libcloud python-logilab-astng
|
python3-git python3-pil python3-libcloud python3-logilab-astng
|
||||||
python-paramiko python-pip python-pyasn1 python-pyasn1-modules
|
python3-paramiko python3-pip python3-pyasn1 python3-pyasn1-modules
|
||||||
python-requests python-virtualenv python-yaml rsync
|
python3-requests python3-virtualenv python3-yaml rsync
|
||||||
pylint pep8 dash bash ruby
|
pyflakes pylint3 pep8 dash bash ruby libjpeg-dev zlib1g-dev;
|
||||||
python-dev libjpeg-dev zlib1g-dev;
|
sudo pip3 install pylint;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
|
|
||||||
6
fdroid
6
fdroid
|
|
@ -76,9 +76,11 @@ def main():
|
||||||
import subprocess
|
import subprocess
|
||||||
try:
|
try:
|
||||||
output = subprocess.check_output(['git', 'describe'],
|
output = subprocess.check_output(['git', 'describe'],
|
||||||
stderr=subprocess.STDOUT)
|
stderr=subprocess.STDOUT,
|
||||||
|
universal_newlines=True)
|
||||||
except subprocess.CalledProcessError:
|
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'):
|
elif os.path.exists('setup.py'):
|
||||||
import re
|
import re
|
||||||
m = re.search(r'''.*[\s,\(]+version\s*=\s*["']([0-9a-z.]+)["'].*''',
|
m = re.search(r'''.*[\s,\(]+version\s*=\s*["']([0-9a-z.]+)["'].*''',
|
||||||
|
|
|
||||||
|
|
@ -176,6 +176,7 @@ def get_clean_vm(reset=False):
|
||||||
os.mkdir('builder')
|
os.mkdir('builder')
|
||||||
|
|
||||||
p = subprocess.Popen(['vagrant', '--version'],
|
p = subprocess.Popen(['vagrant', '--version'],
|
||||||
|
universal_newlines=True,
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
vver = p.communicate()[0].strip().split(' ')[1]
|
vver = p.communicate()[0].strip().split(' ')[1]
|
||||||
if vver.split('.')[0] != '1' or int(vver.split('.')[1]) < 4:
|
if vver.split('.')[0] != '1' or int(vver.split('.')[1]) < 4:
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ find_command() {
|
||||||
for suff in "3" "-python3" ""; do
|
for suff in "3" "-python3" ""; do
|
||||||
cmd=${1}${suff}
|
cmd=${1}${suff}
|
||||||
if cmd_exists $cmd; then
|
if cmd_exists $cmd; then
|
||||||
echo -n $cmd
|
echo $cmd
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ echo "apt_package_cache = True" >> $WORKSPACE/makebuildserver.config.py
|
||||||
# this can be handled in the jenkins job, or here:
|
# this can be handled in the jenkins job, or here:
|
||||||
if [ -e fdroiddata ]; then
|
if [ -e fdroiddata ]; then
|
||||||
cd fdroiddata
|
cd fdroiddata
|
||||||
|
git checkout master
|
||||||
git pull
|
git pull
|
||||||
cd ..
|
cd ..
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@ def vagrant(params, cwd=None, printout=False):
|
||||||
is the stdout (and stderr) from vagrant
|
is the stdout (and stderr) from vagrant
|
||||||
"""
|
"""
|
||||||
p = subprocess.Popen(['vagrant'] + params, cwd=cwd,
|
p = subprocess.Popen(['vagrant'] + params, cwd=cwd,
|
||||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
|
||||||
|
universal_newlines=True)
|
||||||
out = ''
|
out = ''
|
||||||
if printout:
|
if printout:
|
||||||
while True:
|
while True:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue