-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add missing arch to version code generator. #1733
Conversation
@@ -364,7 +364,7 @@ def make_package(args): | |||
with open(join(dirname(__file__), 'dist_info.json'), 'r') as dist_info: | |||
dist_data = json.load(dist_info) | |||
arch = dist_data["archs"][0] | |||
arch_dict = {"arm64-v8a": "8", "armeabi-v7a": "7", "x86": "6"} | |||
arch_dict = {"x86_64": "9", "arm64-v8a": "8", "armeabi-v7a": "7", "x86": "6"} | |||
arch_code = arch_dict[arch] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind changing this line to arch_code = arch_dict.get(arch, '5')
, just to avoid issues if the user's arch is not known?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well spotted. maybe even default to "1" which gives more space for any other unforeseen reworks?
default for unknown archs in version code
Thanks! |
Did we break the build?
|
arch_dict = {"arm64-v8a": "8", "armeabi-v7a": "7", "x86": "6"} | ||
arch_code = arch_dict[arch] | ||
arch_dict = {"x86_64": "9", "arm64-v8a": "8", "armeabi-v7a": "7", "x86": "6"} | ||
arch_code = arch_dict.get[arch, '1'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be get()
not get[]
:
Traceback (most recent call last):
File "setup_testapp_python3_sqlite_openssl.py", line 22, in <module>
package_data={'testapp_sqlite_openssl': ['*.py', '*.png']}
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/user/pythonforandroid/bdistapk.py", line 80, in run
main()
File "/home/user/pythonforandroid/toolchain.py", line 1075, in main
ToolchainCL()
File "/home/user/pythonforandroid/toolchain.py", line 577, in __init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/home/user/pythonforandroid/toolchain.py", line 152, in wrapper_func
func(self, args)
File "/home/user/pythonforandroid/toolchain.py", line 839, in apk
build_args = build.parse_args(args.unknown_args)
File "/home/user/.local/share/python-for-android/dists/bdisttest_python3_sqlite_openssl_googlendk/build.py", line 796, in parse_args
make_package(args)
File "/home/user/.local/share/python-for-android/dists/bdisttest_python3_sqlite_openssl_googlendk/build.py", line 368, in make_package
arch_code = arch_dict.get[arch, '1']
TypeError: 'builtin_function_or_method' object is not subscriptable
…_subscriptable Fixes object is not subscriptable error, refs #1733
x86_64 missing from version code generator.