From dad763a86c379080340ddcbab4d6dee32e797c64 Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Tue, 26 Nov 2013 22:06:45 +0000 Subject: [PATCH] Some more kivy wip --- buildserver/cookbooks/kivy/recipes/default.rb | 5 +++-- fdroidserver/build.py | 10 ++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/buildserver/cookbooks/kivy/recipes/default.rb b/buildserver/cookbooks/kivy/recipes/default.rb index d4cadc8b..916c5bce 100644 --- a/buildserver/cookbooks/kivy/recipes/default.rb +++ b/buildserver/cookbooks/kivy/recipes/default.rb @@ -1,7 +1,7 @@ user = node[:settings][:user] -%w{cython python-pygame python-opengl python-gst0.10 python-enchant libgl1-mesa-dev libgles2-mesa-dev}.each do |pkg| +%w{cython python-pygame python-pip python-opengl python-gst0.10 python-enchant libgl1-mesa-dev libgles2-mesa-dev}.each do |pkg| package pkg do action :install end @@ -13,7 +13,7 @@ script "install-kivy" do code " tar xf /vagrant/cache/Kivy-1.7.2.tar.gz cd Kivy-1.7.2 - sudo python setup.py install + python setup.py install cd .. rm -rf Kivy* " @@ -25,6 +25,7 @@ script "install-p4a" do interpreter "bash" code " git clone git://github.com/kivy/python-for-android + chown -R vagrant:vagrant python-for-android cd python-for-android git checkout ca369d774e2 " diff --git a/fdroidserver/build.py b/fdroidserver/build.py index 6650106c..5ab4488d 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -539,13 +539,19 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d bconfig = ConfigParser(defaults, allow_no_value=True) bconfig.read(spec) + distdir = 'python-for-android/dist/fdroid' + if os.path.exists(distdir): + shutil.rmtree(distdir) + + modules = bconfig.get('app', 'requirements').split(',') cmd = 'ANDROIDSDK=' + config['sdk_path'] cmd += ' ANDROIDNDK=' + config['ndk_path'] cmd += ' ANDROIDNDKVER=r9' cmd += ' ANDROIDAPI=' + str(bconfig.get('app', 'android.api')) cmd += ' ./distribute.sh' - cmd += ' -m ' + bconfig.get('app', 'requirements') + cmd += ' -m ' + "'" + ' '.join(modules) + "'" + cmd += ' -d fdroid' if subprocess.call(cmd, cwd='python-for-android', shell=True) != 0: raise BuildException("Distribute build failed") @@ -577,7 +583,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d cmd.extend(['--icon', os.path.join(root_dir, icon)]) cmd.append('release') - p = FDroidPopen(cmd, cwd='python-for-android/dist/default') + p = FDroidPopen(cmd, cwd=distdir) elif thisbuild.get('gradle', 'no') != 'no': print "Building Gradle project..."