public inbox for gentoo-python@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-python <gentoo-python@lists.gentoo.org>
Subject: Re: [gentoo-python] RFC: Redesign for 'best implementation' in python-r1
Date: Sat, 3 Jan 2015 00:37:08 +0100	[thread overview]
Message-ID: <20150103003708.63582b3f@pomiot.lan> (raw)
In-Reply-To: <20141227145043.63b3731e@pomiot.lan>

[-- Attachment #1: Type: text/plain, Size: 1483 bytes --]

Dnia 2014-12-27, o godz. 14:50:43
Michał Górny <mgorny@gentoo.org> napisał(a):

> 3. we introduce extra variable for distutils-r1 (oh cruel world, how
> should we name it?!) that applies wildcards to python_*_all() phases.

Ok, I see a problem with this one. Consider the common use:

  DEPEND="doc? ( dev-python/epydoc[$(python_gen_usedep 'python2*')] )"
  REQUIRED_USE="doc? ( $(python_gen_useflags 'python2*') )"

  python_compile_all() {
    use doc && esetup.py doc # runs epydoc
  }

So we'd like the _all() phase to be run with python2* because of epydoc.
But OTOH we don't need any python2* if USE=-doc.

If we used a simple variable to control impl for _all(), it would
unnecessarily force python2* with USE=-doc, and python2* may not be
enabled at all then. So we either set it conditionally (+ extra phase,
added complexity), or make it non-fatal. Non-fatal is ugly since it
means unpredictable behavior.

So we can use a complex variable instead. But this way, we're in
python.eclass territory soon. Alternatively, add some function that's
called random-early by other python stuff, and that can be used to set
this variable -- but this doesn't look like good API design.

Maybe calling python_setup inside _all() phases -- but this implies
setting at least two environments, and we'd have to handle extra stuff
that distutils-r1 sets like PYTHONPATH. Still doesn't sound good.

So any ideas? :P

-- 
Best regards,
Michał Górny

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]

      parent reply	other threads:[~2015-01-02 23:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-27 13:50 [gentoo-python] RFC: Redesign for 'best implementation' in python-r1 Michał Górny
2014-12-28 12:00 ` Michał Górny
2014-12-31 16:41 ` Mike Gilbert
2015-01-02 23:21   ` Michał Górny
2015-01-02 23:37 ` Michał Górny [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=20150103003708.63582b3f@pomiot.lan \
    --to=mgorny@gentoo.org \
    --cc=gentoo-python@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