android/build.py: add parameter that specifies a subdirectory
This commit is contained in:
parent
8fe004e98e
commit
61161269d8
|
@ -127,11 +127,15 @@ def download_tarball(url, md5):
|
||||||
|
|
||||||
class Project:
|
class Project:
|
||||||
def __init__(self, url, md5, installed, name=None, version=None,
|
def __init__(self, url, md5, installed, name=None, version=None,
|
||||||
|
base=None,
|
||||||
use_cxx=False, use_clang=False):
|
use_cxx=False, use_clang=False):
|
||||||
basename = os.path.basename(url)
|
if base is None:
|
||||||
m = re.match(r'^(.+)\.(tar(\.(gz|bz2|xz|lzma))?|zip)$', basename)
|
basename = os.path.basename(url)
|
||||||
if not m: raise
|
m = re.match(r'^(.+)\.(tar(\.(gz|bz2|xz|lzma))?|zip)$', basename)
|
||||||
self.base = m.group(1)
|
if not m: raise
|
||||||
|
self.base = m.group(1)
|
||||||
|
else:
|
||||||
|
self.base = base
|
||||||
|
|
||||||
if name is None or version is None:
|
if name is None or version is None:
|
||||||
m = re.match(r'^([-\w]+)-(\d[\d.]*[a-z]?)$', self.base)
|
m = re.match(r'^([-\w]+)-(\d[\d.]*[a-z]?)$', self.base)
|
||||||
|
|
Loading…
Reference in New Issue