Among py2-only packages in gentoo, dev-vcs/git is by far the one with the most revdeps. When exploring what was needed for py3 support in git, I discovered that: 1. Most python scripts in git already support python 3 2. We don't pass PYTHON_PATH to git's make process, making those scripts use python3 on most systems already Because of this, I would suggest that we: 1. add python3_{5,6,7} targets 2. pass PYTHON_PATH to git's make invocation What do you think?
Ebuild patches are highly welcome.
Yes, certainly. I'm working on it. bug 329479 is highly relevant to this bug, especially the last comment pointing to the commit removing the biggest python-based system from git, which explains the current situation (python very lightly used in git).
I hadn't properly looked at the ebuild: PYTHON_PATH is properly passed to git's make already. I thought it wasn't because python scripts in "contrib" didn't have their shebang line replaced. However, I didn't know that this set only applied to one script, git-p4.py. By simply adding "python3_{5,6,7}" to PYTHON_COMPAT, I could install git with python 3.6 support and a "git p4" command that seemed (I don't have a perforce repo to test) to work fine. The code of the script itself seems properly converted to python 3. I'm not sure that this is worthy of a patch...
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bfd107bdb1af60be1f7541c2adc7ef03ba7e71ef commit bfd107bdb1af60be1f7541c2adc7ef03ba7e71ef Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2019-03-03 15:36:30 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2019-03-03 15:36:43 +0000 dev-vcs/git: Added python3 to PYTHON_COMPAT in live ebuilds. Bug: https://bugs.gentoo.org/677518 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> dev-vcs/git/git-9999-r1.ebuild | 2 +- dev-vcs/git/git-9999-r2.ebuild | 2 +- dev-vcs/git/git-9999-r3.ebuild | 2 +- dev-vcs/git/git-9999.ebuild | 5 +---- 4 files changed, 4 insertions(+), 7 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=233b86a44bece29adeaf5baa86208f02b1b7cf06 commit 233b86a44bece29adeaf5baa86208f02b1b7cf06 Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2019-04-02 13:23:34 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2019-04-02 13:25:42 +0000 dev-vcs/git: Revbump adding python3 support Closes: https://bugs.gentoo.org/677518 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> dev-vcs/git/git-2.21.0-r1.ebuild | 711 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 711 insertions(+)