public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alexey Mishustin <shumkar@shumkar.ru>
To: Gentoo <gentoo-user@lists.gentoo.org>
Subject: Re: [gentoo-user] ebuild : how to check for python version
Date: Mon, 3 Aug 2020 02:44:43 +0300	[thread overview]
Message-ID: <CAGWFrgtXJgdZvxnz=WSP=4-wXPnc1LqVaosMgoLQA3+-WAD_hA@mail.gmail.com> (raw)
In-Reply-To: <3N72GZ77.5GQLEHKR.MQE4Q2EH@4TY2KWZJ.LFRWJOCL.NKJKNN4X>

вс, 2 авг. 2020 г. в 17:48, Helmut Jarausch <jarausch@skynet.be>:
>
> Hi,
> in an ebuild I have to apply a patch only if this package is installed
> for python3.9.
> The ebuild should work for PYTHON_COMPAT=( python3_{8,9} )
>
> How can I check for Pythons version in src_prepare or similar functions.

Hi,

This should check if 3.9 is installed:
if has_version '=dev-lang/python-3.9'; then

But for which python version will the package be installed - isn't it
another question? (still learning too)

-- 
Best regards,
Alex


  parent reply	other threads:[~2020-08-02 23:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-02 14:47 [gentoo-user] ebuild : how to check for python version Helmut Jarausch
2020-08-02 16:15 ` Ramon Fischer
2020-08-02 17:34   ` Helmut Jarausch
2020-08-02 20:13     ` james
2020-08-02 23:44 ` Alexey Mishustin [this message]
2020-08-03  8:05   ` Neil Bothwick
2020-08-03  9:57     ` Alexey Mishustin
2020-08-11 13:08 ` Mike Gilbert
2020-08-11 13:38   ` Helmut Jarausch
2020-08-11 14:35     ` Mike Gilbert

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='CAGWFrgtXJgdZvxnz=WSP=4-wXPnc1LqVaosMgoLQA3+-WAD_hA@mail.gmail.com' \
    --to=shumkar@shumkar.ru \
    --cc=gentoo-user@lists.gentoo.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