Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 677518 - dev-vcs/git: improve python support
Summary: dev-vcs/git: improve python support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-09 01:50 UTC by Virgil Dupras (RETIRED)
Modified: 2019-04-02 13:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Virgil Dupras (RETIRED) gentoo-dev 2019-02-09 01:50:01 UTC
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?
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-02-09 08:52:27 UTC
Ebuild patches are highly welcome.
Comment 2 Virgil Dupras (RETIRED) gentoo-dev 2019-02-09 19:37:13 UTC
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).
Comment 3 Virgil Dupras (RETIRED) gentoo-dev 2019-02-09 20:12:23 UTC
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...
Comment 4 Larry the Git Cow gentoo-dev 2019-03-03 15:36:50 UTC
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(-)
Comment 5 Larry the Git Cow gentoo-dev 2019-04-02 13:25:49 UTC
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(+)