mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 23:10:29 +03:00
Import support for kivy projects (with buildozer spec)
This commit is contained in:
parent
752105c884
commit
157fe2a1fd
1 changed files with 23 additions and 11 deletions
|
|
@ -22,6 +22,7 @@ import os
|
||||||
import shutil
|
import shutil
|
||||||
import urllib
|
import urllib
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
from ConfigParser import ConfigParser
|
||||||
import common, metadata
|
import common, metadata
|
||||||
|
|
||||||
# Get the repo type and address from the given web page. The page is scanned
|
# Get the repo type and address from the given web page. The page is scanned
|
||||||
|
|
@ -229,18 +230,29 @@ def main():
|
||||||
|
|
||||||
# Extract some information...
|
# Extract some information...
|
||||||
paths = common.manifest_paths(root_dir, None)
|
paths = common.manifest_paths(root_dir, None)
|
||||||
if not paths:
|
if paths:
|
||||||
print "No android project could be found. Specify --subdir?"
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
version, vercode, package = common.parse_androidmanifests(paths)
|
version, vercode, package = common.parse_androidmanifests(paths)
|
||||||
if not package:
|
if not package:
|
||||||
print "Couldn't find package ID"
|
print "Couldn't find package ID"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
if not version:
|
if not version:
|
||||||
print "WARNING: Couldn't find latest version name"
|
print "WARNING: Couldn't find latest version name"
|
||||||
if not vercode:
|
if not vercode:
|
||||||
print "WARNING: Couldn't find latest version code"
|
print "WARNING: Couldn't find latest version code"
|
||||||
|
else:
|
||||||
|
spec = os.path.join(root_dir, 'buildozer.spec')
|
||||||
|
if os.path.exists(spec):
|
||||||
|
defaults = {'orientation': 'landscape', 'icon': '',
|
||||||
|
'permissions': '', 'android.api': "18"}
|
||||||
|
bconfig = ConfigParser(defaults, allow_no_value=True)
|
||||||
|
bconfig.read(spec)
|
||||||
|
package = bconfig.get('app', 'package.domain') + '.' + bconfig.get('app', 'package.name')
|
||||||
|
version = bconfig.get('app', 'version')
|
||||||
|
vercode = None
|
||||||
|
else:
|
||||||
|
print "No android or kivy project could be found. Specify --subdir?"
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
# Make sure it's actually new...
|
# Make sure it's actually new...
|
||||||
for app in apps:
|
for app in apps:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue