Skip to content

pythonforandroid/bootstraps/sdl2/build/build.py when numerical version computation fails won't provide helpful info, especially no hint for --numeric-version #1421

Description

Versions

  • Python: Python 3.6.6
  • OS: Ubuntu 18 LTS (inside docker)
  • Kivy: not used
  • Cython: not used

Description

pythonforandroid/bootstraps/sdl2/build/build.py's numerical version computation crashes with no helpful information on non-numerical parts:

Traceback (most recent call last):
  File "/usr/local/bin/p4a", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/pythonforandroid/toolchain.py", line 999, in main
    ToolchainCL()
  File "/usr/local/lib/python3.6/dist-packages/pythonforandroid/toolchain.py", line 532, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/usr/local/lib/python3.6/dist-packages/pythonforandroid/toolchain.py", line 146, in wrapper_func
    func(self, args)
  File "/usr/local/lib/python3.6/dist-packages/pythonforandroid/toolchain.py", line 774, in apk
    build_args = build.parse_args(args.unknown_args)
  File "/root/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 577, in parse_args
    make_package(args)
  File "/root/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 292, in make_package
    version_code += int(i)
ValueError: invalid literal for int() with base 10: 'devcommit391b8f8e64a800db32dea553af0e653c919f3fde'
Build failed.

Basically, I highly expected a message that says "I can't compute the numerical version from this, please pass it using option --numeric-version" or something similar - especially since p4a apk --help isn't currently in a state where it helps with that, see #1420

buildozer.spec

not used, I use p4a directly. This is the version I passed: --version 0.6.201.devcommit391b8f8e64a800db32dea553af0e653c919f3fde

Logs

see quoted traceback above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions