linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: German Gomez <german.gomez@arm.com>
To: James Clark <james.clark@arm.com>,
	acme@kernel.org, linux-perf-users@vger.kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] perf tools: Use Python devtools for version autodetection rather than runtime
Date: Tue, 12 Apr 2022 16:45:10 +0100	[thread overview]
Message-ID: <14df315d-7667-d80c-b58f-4ad6a6e1c93c@arm.com> (raw)
In-Reply-To: <1262ee1e-22dc-0cc6-3e60-257e17d9ed26@arm.com>


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.

      reply	other threads:[~2022-04-12 15:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-09 19:43 [PATCH 0/1] perf tools: Use Python devtools for version autodetection James Clark
2022-03-09 19:43 ` [PATCH 1/1] perf tools: Use Python devtools for version autodetection rather than runtime James Clark
2022-04-12 15:30   ` German Gomez
2022-04-12 15:45     ` German Gomez [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14df315d-7667-d80c-b58f-4ad6a6e1c93c@arm.com \
    --to=german.gomez@arm.com \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).