Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

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

From: Richard Sharpe <realrichardsharpe@xxxxxxxxx>
Date: Sat, 10 Nov 2018 14:52:16 -0800
On Sat, Nov 10, 2018 at 2:05 PM Richard Sharpe
<realrichardsharpe@xxxxxxxxx> wrote:
>
> >
> > 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...
>
> When you say older CMake versions do you mean older than cmake3? I
> already have to use cmake3 (3.12.2) on CentOS.
>
> Curiously, as well, on the Ubuntu VM I just tested things on:
>
>   Linux version 4.15.0-33-generic (buildd@lcy01-amd64-024) (gcc
> version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #36-Ubuntu SMP Wed Aug 15
> 16:00:05 UTC 2018
>
> but which also calls itself Buster/Sid (/etc/debian-release), the
> change I suggested works but it did not find /usr/bin/python3.6
> despite that binary being there. It found /usr/bin/python which calls
> itself 2.7.15rc1.
>
> I also notice that the setup file for Mac OS X requires Python 3.7.1
> and wonder if that will be found with my change. Not sure I want to
> bother testing the Mac.
>
> > 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
>
> Sure. I don't have a problem with the requirement to use Python 3.
> It's just that some/many systems have both Python2 and Python3
> installed (Python2 for legacy reasons) and I would like the Wireshark
> build to find the correct version. It wasn't doing that on CentOS 7.x.
>
> I also have a RHEL7.2 VM with Python3.4.x in /usr/local. I wonder if
> it would find that.

Sigh. Unfortunately, I have a mix of versions of cmake3 on my various
VMs, 3.11, 3.10 etc.

The simplest fix for my problem on 3.11 with python3.4 in
/usr/local/bin seems to be:

1. Remove everything in my build directory
2. export CMAKE_PREFIX_PATH=/usr/local/bin
3. cmake3 /path/to/wireshark/source

And that seems to work ...

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)(传说杜康是酒的发明者)