Hi,
I'm looking for information on plans to officially support installing running repo on systems which only have Python 3, especially "out of the box" installation/usage as documented on this page:
Apologies if this is documented somewhere, but the latest discussion I can find on this list is out of date and seems inconsistent with what I get at runtime. Here is the most recent thread I was able to find (from 2013):
There, it's claimed "I think Repo supports Python 3".
But the repo installation script linked to from
source.android.com says support is "experimental", then fails immediately when run in Python 3:
$ mkdir aosp && cd aosp
warning: Python 3 support is currently experimental. YMMV.
Please use Python 2.6 - 2.7 instead.
Traceback (most recent call last):
File "../repo", line 883, in <module>
main(sys.argv[1:])
File "../repo", line 851, in main
_Init(args, gitc_init=(cmd == 'gitc-init'))
File "../repo", line 337, in _Init
_CheckGitVersion()
File "../repo", line 391, in _CheckGitVersion
ver_act = ParseGitVersion(ver_str)
File "../repo", line 361, in ParseGitVersion
if not ver_str.startswith('git version '):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
This issue is over 3 years old, judging by this SO thread:
From what I gather, the best way to get a version of repo itself (not the bootstrap script from
storage.googleapis.com) that "should" run under Python 3 would be something like this:
Is that right? Because if so (apart from it being strange that it requires Python 2 installed), when I run that, I get:
info: Ignoring branch 'master'; using tagged release 'v1.12.37'
Note that Ubuntu 18.04 LTS plans on shipping Python 3 only by default, and that's just around the corner:
Python 2 itself will hit EOL in just over two years.
Can anyone shed some light on how to install and use repo in a system which only has Python 3 installed?
Thanks,
Marti