Re: [PATCH v3 1/8] meson: stop discovering native version of Python

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25/07/09 08:09AM, Junio C Hamano wrote:
> Patrick Steinhardt <ps@xxxxxx> writes:
> > -python = import('python').find_installation('python3', required: get_option('python'))
> > -target_python = find_program('python3', native: false, required: python.found())
> > -if python.found()
> > +# Python is not used for our build system, but exclusively for git-p4.
> > +# Consequently we only need to determine whether Python is available for the
> > +# build target.
> > +target_python = find_program('python3', native: false, required: get_option('python'))
> > +if target_python.found()
> >    build_options_config.set('NO_PYTHON', '')
> >  else
> >    libgit_c_args += '-DNO_PYTHON'
> 
> We ask explicitly for Python 3 here.
> 
> Does find_program() have some magic to deal with installations where
> Python3 is simply called /usr/bin/python (and worse yet, not as a
> symbolic link to /usr/bin/python3)?

My understanding is that find_program() won't do anything in this case.
I would imagine if the target host has Python3 in a non-standard
location, there would probably need to be a cross-file that defines it.

> I found
> 
>     "Since 0.50.0 if the "python3" program is requested and it is
>     not found in the system, Meson will return its current
>     interpreter",
> 
> which I suspect refers to the path to python3 used during the build
> and is not what we want, at
> 
> https://mesonbuild.com/Reference-manual_functions.html#find_program
> 
> which got me a bit worried.

As you mentioned, I think this is only relevant for Python scipts
executed at build time.

-Justin




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux