Re: [PATCH 0/6] Transition git-p4.py to support Python 3 only
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 13, 2021, 19:29 UTC
- Message-ID
- <xmqqv8zsb8xc.fsf@gitster.g>
- In-Reply-To
- <BN8PR12MB33619656D91E92C50FF1B86CC8749@BN8PR12MB3361.namprd12.prod.outlook.com>
Joel Holdsworth <jholdsworth@nvidia.com> writes:
Show 14 quoted lines
>> > What unit tests are these? I am happy to test with them. >> >> cd t >> make T=t98* -j$(nproc) > > Awesome! Just ran the tests. We got a clean sweep. > > With one proviso: > > When running the current upstream master git-p4 version, there are errors if /usr/bin/python is not present. > > lib-git-p4.sh checks for the presence of python with "test_have_prereq PYTHON" - but if I only have /usr/bin/python3 installed, the prerequisite check passes, but git-p4.py itself fails because the shebang points at python not python3. > > On Debian installing the package "python-is-python3" fixes the issue.
Can I take that a distro allowing an installation without python-is-python3 (or just having only python2) as a sign that "transtion to 3 only" is a bit premature?
> Perhaps it might help to have something like "test_have_prereq PYTHON3".
Sure, but that defeats the whole notion of "python3 is everywhere, python2 is dead, and nobody should be using the 2-year dead version". "test_have_prereq PYTHON" should be sufficient in such a world, no?