Some more kivy wip

This commit is contained in:
Ciaran Gultnieks 2013-11-26 22:02:33 +00:00
parent 1390704c91
commit 53781f913b
5 changed files with 24 additions and 5 deletions

View file

@ -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..."

View file

@ -61,7 +61,8 @@ def read_config(opts, config_file='config.py'):
'update_stats': False,
'archive_older': 0,
'max_icon_size': 72,
'stats_to_carbon': False
'stats_to_carbon': False,
'repo_maxage': 0
}
if options.verbose:
print "Reading %s..." % config_file

View file

@ -467,11 +467,15 @@ def make_index(apps, apks, repodir, archive, categories):
repoel = doc.createElement("repo")
if archive:
repoel.setAttribute("name", config['archive_name'])
if config['repo_maxage'] != 0:
repoel.setAttribute("maxage", str(config['repo_maxage']))
repoel.setAttribute("icon", os.path.basename(config['archive_icon']))
repoel.setAttribute("url", config['archive_url'])
addElement('description', config['archive_description'], doc, repoel)
else:
repoel.setAttribute("name", config['repo_name'])
if config['repo_maxage'] != 0:
repoel.setAttribute("maxage", str(config['repo_maxage']))
repoel.setAttribute("icon", os.path.basename(config['repo_icon']))
repoel.setAttribute("url", config['repo_url'])
addElement('description', config['repo_description'], doc, repoel)