-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Made p4a use per-arch dist build dirs #1986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
53443c7
c49f5f3
1b5495c
532a1e7
06be964
d2220d5
cb961eb
5f99bcd
4709476
1222be3
ee77a12
d7e8bba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,6 +101,8 @@ def check_python_dependencies(): | |
toolchain_dir = dirname(__file__) | ||
sys.path.insert(0, join(toolchain_dir, "tools", "external")) | ||
|
||
APK_SUFFIX = '.apk' | ||
|
||
|
||
def add_boolean_option(parser, names, no_names=None, | ||
default=True, dest=None, description=None): | ||
|
@@ -163,6 +165,7 @@ def dist_from_args(ctx, args): | |
ctx, | ||
name=args.dist_name, | ||
recipes=split_argument_list(args.requirements), | ||
arch_name=args.arch, | ||
ndk_api=args.ndk_api, | ||
force_build=args.force_build, | ||
require_perfect_match=args.require_perfect_match, | ||
|
@@ -195,10 +198,10 @@ def build_dist_from_args(ctx, dist, args): | |
info('Dist will also contain modules ({}) installed from pip'.format( | ||
', '.join(ctx.python_modules))) | ||
|
||
ctx.dist_name = bs.distribution.name | ||
ctx.distribution = dist | ||
ctx.prepare_bootstrap(bs) | ||
if dist.needs_build: | ||
ctx.prepare_dist(ctx.dist_name) | ||
ctx.prepare_dist() | ||
|
||
build_recipes(build_order, python_modules, ctx, | ||
getattr(args, "private", None), | ||
|
@@ -211,7 +214,7 @@ def build_dist_from_args(ctx, dist, args): | |
|
||
info_main('# Your distribution was created successfully, exiting.') | ||
info('Dist can be found at (for now) {}' | ||
.format(join(ctx.dist_dir, ctx.dist_name))) | ||
.format(join(ctx.dist_dir, ctx.distribution.dist_dir))) | ||
|
||
|
||
def split_argument_list(l): | ||
|
@@ -304,7 +307,7 @@ def __init__(self): | |
'(default: {})'.format(default_storage_dir))) | ||
|
||
generic_parser.add_argument( | ||
'--arch', help='The archs to build for, separated by commas.', | ||
'--arch', help='The arch to build for.', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm wondering, are we breaking our CLI API here? Wasn't the arch split via There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, a bit, but I did this because as far as I can tell passing multiple archs won't actually work right now. I'm trying to avoid removing the internal flexibility (hence keeping lists of archs even though we only handle one), but it was simplest to make the cli match what we can actually support for now. I'll confirm this before finalising the PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes that makes complete sense, thanks. I was also confused seeing it was handling multiple archs from the CLI. |
||
default='armeabi-v7a') | ||
|
||
# Options for specifying the Distribution | ||
|
@@ -912,6 +915,7 @@ def export_dist(self, args): | |
def _dist(self): | ||
ctx = self.ctx | ||
dist = dist_from_args(ctx, self.args) | ||
ctx.distribution = dist | ||
return dist | ||
|
||
@require_prebuilt_dist | ||
|
@@ -1062,9 +1066,9 @@ def apk(self, args): | |
info_main('# Found APK file: {}'.format(apk_file)) | ||
if apk_add_version: | ||
info('# Add version number to APK') | ||
apk_name, apk_suffix = basename(apk_file).split("-", 1) | ||
apk_name = basename(apk_file)[:-len(APK_SUFFIX)] | ||
apk_file_dest = "{}-{}-{}".format( | ||
apk_name, build_args.version, apk_suffix) | ||
apk_name, build_args.version, APK_SUFFIX) | ||
info('# APK renamed to {}'.format(apk_file_dest)) | ||
shprint(sh.cp, apk_file, apk_file_dest) | ||
else: | ||
|
Uh oh!
There was an error while loading. Please reload this page.