Wireshark-dev: Re: [Wireshark-dev] Wireshark seems to require Python 3.4 or better now ...

From: Peter Wu <peter@xxxxxxxxxxxxx>
Date: Sat, 10 Nov 2018 22:42:08 +0100
On Sat, Nov 10, 2018 at 01:17:22PM -0800, Richard Sharpe wrote:
> > > Like Pascal said, clearing PYTHON_EXECUTABLE from your CMakeCache.txt
> > > was sufficient (you do not have to wipe the full build directory). The
> > > default /usr/bin/python interpreter is Python 2.7, but CMake will now
> > > search for python3 first and use that if it is new enough.
> >
> > Well, I tried doing that also, but no luck. It insists that python
> > 2.7.5 is unsuitable ...
> 
> The correct instructions seem to be to modify the PYTHON_EXECUTABLE
> line in CMakeCache.txt to the following (or whatever version you have
> on the system):
> 
> PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3.6

Looks like the find_package(PythonInterp) call is only looking for
'python3' which is included with the python34 package:
https://centos.pkgs.org/7/epel-x86_64/python34-3.4.9-1.el7.x86_64.rpm.html

Using find_package(Python3) instead will correctly identify python3.6,
but this package is not available with older CMake versions...

As for why Python 2.7 is unsuitable, Python 3 has been around for a
while and reduces maintenance costs for development, see
https://www.wireshark.org/lists/wireshark-dev/201810/msg00067.html
-- 
Kind regards,
Peter Wu
https://lekensteyn.nl