[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <14df315d-7667-d80c-b58f-4ad6a6e1c93c@arm.com>
Date: Tue, 12 Apr 2022 16:45:10 +0100
From: German Gomez <german.gomez@....com>
To: James Clark <james.clark@....com>, acme@...nel.org,
linux-perf-users@...r.kernel.org
Cc: Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] perf tools: Use Python devtools for version
autodetection rather than runtime
On 12/04/2022 16:30, German Gomez wrote:
> Hi James,
>
> On 09/03/2022 19:43, James Clark wrote:
>> This fixes the issue where the build will fail if only the Python2
>> runtime is installed but the Python3 devtools are installed. Currently
>> the workaround is 'make PYTHON=python3'.
>>
>> Fix it by autodetecting Python based on whether python[x]-config exists
>> rather than just python[x] because both are needed for the build. Then
>> -config is stripped to find the Python runtime.
>>
>> Testing
>> =======
>>
>> * Auto detect links with Python3 when the v3 devtools are installed
>> and only Python 2 runtime is installed
>> * Auto detect links with Python2 when both devtools are installed
>> * Sensible warning is printed if no Python devtools are installed
>> * 'make PYTHON=x' still automatically sets PYTHON_CONFIG=x-config
>> * 'make PYTHON=x' fails if x-config doesn't exist
> If x is a valid python but no x-config is found in the system, the build
> fails, instead of printing a warning like before. If we use this approach
> I think [1] in the Makefile is never hit and needs to be cleaned up.
Sorry, small correction:
The line in the Makefile is never hit when PYTHON is explicitly defined (probably not a big deal).
Still I wanted to point the small change in behaviour with the build warning vs. build fail.
Powered by blists - more mailing lists