Skip to content

Add missing arch to version code generator.#1733

Merged
inclement merged 6 commits intokivy:masterfrom
OptimusGREEN:master
Feb 26, 2019
Merged

Add missing arch to version code generator.#1733
inclement merged 6 commits intokivy:masterfrom
OptimusGREEN:master

Conversation

@OptimusGREEN
Copy link
Contributor

x86_64 missing from version code generator.

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]
Copy link
Member

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?

Copy link
Contributor Author

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?

@inclement inclement merged commit 1d45b29 into kivy:master Feb 26, 2019
@inclement
Copy link
Member

Thanks!

@AndreMiras
Copy link
Member

Did we break the build?
https://travis-ci.org/kivy/python-for-android/jobs/498954198

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

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']
Copy link
Member

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

AndreMiras added a commit to AndreMiras/python-for-android that referenced this pull request Feb 26, 2019
@AndreMiras
Copy link
Member

#1734

AndreMiras added a commit that referenced this pull request Feb 27, 2019
…_subscriptable

Fixes object is not subscriptable error, refs #1733
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants