From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-dev+bounces-80609-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 080DE139694
	for <garchives@archives.gentoo.org>; Thu, 11 May 2017 04:47:39 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 18C2B21C0E1;
	Thu, 11 May 2017 04:47:27 +0000 (UTC)
Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 8CD9221C075
	for <gentoo-dev@lists.gentoo.org>; Thu, 11 May 2017 04:47:26 +0000 (UTC)
Received: by mail-wm0-x22f.google.com with SMTP id b84so26498253wmh.0
        for <gentoo-dev@lists.gentoo.org>; Wed, 10 May 2017 21:47:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=mime-version:from:date:message-id:subject:to:cc;
        bh=94z/WO+NbUKD+4iVP5WyPlKsyywAdb1hy8CqW1Tnddg=;
        b=Hp6Bhte0ygwYSSJce+1nlq59SRRkCka5kXPfsRH5Ha3KJIpvMPybmm+0uwc7l4guhX
         g/T8CdOOsgJj/xm2ng45GGIWVxhssp9DoEQo6hfMNvzKrttViqB4Xa2z6p46fcBu1E4Z
         KTF0paZIjP8A7qzA5oS2jc7Q6kWEP2SStN35gpn0rLJSqeGPhC18UP7Yf8oiG2hDnIt5
         phyYbbwzjPs8yJgmrFyJb0bw1MAIMFXfEGLfM203EbycI/Ipv3P1z/y1tUsZC1mp9t2S
         axE+YezwffnuxRSM2+pKcDyBcGqV/gU84XYeh5djd1oSsSJklvBoMYZZYJOc08YSAGB2
         Zs+A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc;
        bh=94z/WO+NbUKD+4iVP5WyPlKsyywAdb1hy8CqW1Tnddg=;
        b=YQSclc6UUj4OwbATXA8U9WOymhfAKRPstajQYSrP3qD9jO4hKPN3HVZ9FhJA1MPQjH
         JNU7aBvfYJNhAam74Gn2B0xOyIQTAbnEsZkvEn/aJfgAttlJEuXPSwirghrjsONidfds
         B6YE+p/y+R+6H0YTgaLN7ep1IVLXFEdGJTC6sakqYgXgbn5KFHg+cRGTl1oGHJZeZ9QF
         JCxYlWrb9Cobve8KYZGr2dWCgcMmlJb4dp/Q74NU9L+Q/GNgk0KHLkzK89Bt0LULEAJY
         3byG8KWsvu92dPSYU06PwtGbdQyvRkyKJ22SauzhHJR6P8wkT7460eu81pVhnWL4Fr4/
         t/nQ==
X-Gm-Message-State: AODbwcB8xKc7h5a0IYQOJZMGcafjNlG9VNcsyhxIAyKJqRiG4Sgkqr9y
	6SqHeJEE2lZYQY83KA9IrQuoY1RTV+l8
X-Received: by 10.28.133.70 with SMTP id h67mr5403189wmd.136.1494478044961;
 Wed, 10 May 2017 21:47:24 -0700 (PDT)
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@lists.gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
MIME-Version: 1.0
Received: by 10.223.164.3 with HTTP; Wed, 10 May 2017 21:47:24 -0700 (PDT)
From: Alex Turbov <i.zaufi@gmail.com>
Date: Thu, 11 May 2017 11:47:24 +0700
Message-ID: <CANktQtuZSzxceyjPxJd2eb2GVovP_V8_ZzF-W8RoyM0y_eBBLA@mail.gmail.com>
Subject: [gentoo-dev] Should Sphinx really depends on PYTHON_COMPAT/PYTHON_USEDEP for
 `dev-python/*` ebuilds?
To: gentoo-dev@lists.gentoo.org
Cc: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= <mgorny@gentoo.org>
Content-Type: multipart/alternative; boundary=001a114431f8fea007054f384840
X-Archives-Salt: bb7680fe-9fe7-449c-91bc-86dab1e6ee89
X-Archives-Hash: 16d4200b2686682464639552af747b3a

--001a114431f8fea007054f384840
Content-Type: text/plain; charset=UTF-8

Hi Gentoo devs,

I'd like to discuss one thing I've concernted for a long time already.
Recently I've done some `dev-python` ebuild. And as most Python packages
it also uses `dev-python/sphinx` to produce documentation. I want to note
that my primary (and default) Python version is 3.5 and I have some 2.7
packages
(ebuilds) only because they required by something else (really important to
me).
or when it is dependency of some other Python2-only package.

Unfortunately most of `dev-python/*` packages, to produce docs from RST
files,
have `DEPEND` on `dev-python/sphinx[${PYTHON_USEDEP}]`! However, being a
standalone application (just processing a bunch of RST files to HTMLs),
`/usr/bin/sphinx-build` **do not** actually depeds on `PYTHON_COMPAT` of
the ebuild it used inside! It just needs some/any interpreter it (Sphinx)
was "build" with!

So, nowadays Gentoo has some reeally weired IMO behaviour: to build docs for
some package from `dev-python/*` with `PYTHON_TARGETS` set to (for example)
2.7 and
3.5 Python versions, I have to build Sphinx also **for all enabled Python
versions**
of that package, meanwhile **only one** is needed (and really used)! This
is my
real concern: why I have to waste my disk+time to build `dev-python/*`
packages
with `PYTHON_TARGETS` I'll never use? Some of that packages are actually
dependencies
of other Python2-only packages. In other words, to build docs using Python
**3**
version/build of Sphinx, which is work pretty fine already, for Python2
enabled package,
I have to install a lot of Python-2 packages, dependencies of Sphinx to be
built w/ Python 2,
and enable `python2_7` for packages I've already have as Python3-only,
which in turn could
bring even more strange dependencies into scope.

Thus generally specking, Sphinx dependencies have no relations to `DEPEND`
of particular
`dev-python/*` ebuilds! So, in simple case there is should be enough to
specify

    DEPEND=( doc? ( dev-python/sphinx ) )

for that ebuilds. In some rare cases (like
https://bugs.gentoo.org/show_bug.cgi?id=618162)
Sphinx could use some extensions (plugins) and they also have no any
relation to `PYTHON_COMPAT`
of particular `dev-python/*` ebuild! That plugins to work need just the
same `PYTHON_TARGETS`
as used to build Sphinx. Unfortunately I can't find appropriate helper
function(s) in any
currently present Python reelated eclasses (or am I miss smth?), so I used
the following
dependency spec:

    DEPEND=( doc?
        || (
                (
                    dev-python/sphinx[python_targets_python2_7]
                    # NOTE This packages provide extensions for Sphinx
                    dev-python/rst-linker[python_targets_python2_7]
                    dev-python/jaraco-packaging[python_targets_python2_7]
                )
                (
                    dev-python/sphinx[python_targets_python3_5]
                    dev-python/rst-linker[python_targets_python3_5]
                    dev-python/jaraco-packaging[python_targets_python3_5]
                )
                (
                    dev-python/sphinx[python_targets_python3_6]
                    dev-python/rst-linker[python_targets_python3_6]
                    dev-python/jaraco-packaging[python_targets_python3_6]
                )
            )
      )

So, my questions are:

0. am I missed smth? (and there are some other cases, I don't know about)
1. am I missed smth? (and there are some helper functions exist in eclasses
to expess that kind
   of dependencies)
2. I think it would be nice to have some support for Sphinx in eclasses to
simplify ebuilds writing
   (if #1 is false)

Ideas/comments/opinions are really welcome...

--001a114431f8fea007054f384840
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi Gentoo devs,<br><br>I&#39;d like to discuss one thing I=
&#39;ve concernted for a long time already.<br>Recently I&#39;ve done some =
`dev-python` ebuild. And as most Python packages<br>it also uses `dev-pytho=
n/sphinx` to produce documentation. I want to note<br>that my primary (and =
default) Python version is 3.5 and I have some 2.7 packages<br>(ebuilds) on=
ly because they required by something else (really important to me).<br>or =
when it is dependency of some other Python2-only package.<br><br>Unfortunat=
ely most of `dev-python/*` packages, to produce docs from RST files,<br>hav=
e `DEPEND` on `dev-python/sphinx[${PYTHON_USEDEP}]`! However, being a<br>st=
andalone application (just processing a bunch of RST files to HTMLs),<br>`/=
usr/bin/sphinx-build` **do not** actually depeds on `PYTHON_COMPAT` of<br>t=
he ebuild it used inside! It just needs some/any interpreter it (Sphinx)<br=
>was &quot;build&quot; with!<br><br>So, nowadays Gentoo has some reeally we=
ired IMO behaviour: to build docs for<br>some package from `dev-python/*` w=
ith `PYTHON_TARGETS` set to (for example) 2.7 and<br>3.5 Python versions, I=
 have to build Sphinx also **for all enabled Python versions**<br>of that p=
ackage, meanwhile **only one** is needed (and really used)! This is my<br>r=
eal concern: why I have to waste my disk+time to build `dev-python/*` packa=
ges<br>with `PYTHON_TARGETS` I&#39;ll never use? Some of that packages are =
actually dependencies<br>of other Python2-only packages. In other words, to=
 build docs using Python **3**<br>version/build of Sphinx, which is work pr=
etty fine already, for Python2 enabled package,<br>I have to install a lot =
of Python-2 packages, dependencies of Sphinx to be built w/ Python 2,<br>an=
d enable `python2_7` for packages I&#39;ve already have as Python3-only, wh=
ich in turn could<br>bring even more strange dependencies into scope.<br><b=
r>Thus generally specking, Sphinx dependencies have no relations to `DEPEND=
` of particular<br>`dev-python/*` ebuilds! So, in simple case there is shou=
ld be enough to specify<br><br>=C2=A0=C2=A0=C2=A0 DEPEND=3D( doc? ( dev-pyt=
hon/sphinx ) )<br><br>for that ebuilds. In some rare cases (like <a href=3D=
"https://bugs.gentoo.org/show_bug.cgi?id=3D618162">https://bugs.gentoo.org/=
show_bug.cgi?id=3D618162</a>)<br>Sphinx could use some extensions (plugins)=
 and they also have no any relation to `PYTHON_COMPAT`<br>of particular `de=
v-python/*` ebuild! That plugins to work need just the same `PYTHON_TARGETS=
`<br>as used to build Sphinx. Unfortunately I can&#39;t find appropriate he=
lper function(s) in any<br>currently present Python reelated eclasses (or a=
m I miss smth?), so I used the following<br>dependency spec:<br><br>=C2=A0=
=C2=A0=C2=A0 DEPEND=3D( doc? <br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
 || ( <br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 ( <br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
 dev-python/sphinx[python_targets_python2_7] <br>=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 # NOTE This packages provide extensions for Sphinx<br>=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dev-python/rst-linker[python_targets_p=
ython2_7]<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dev-python/jaraco-pa=
ckaging[python_targets_python2_7]<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ) <br>=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 ( <br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dev-python/sphinx[pytho=
n_targets_python3_5] <br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dev-pyth=
on/rst-linker[python_targets_python3_5]<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 dev-python/jaraco-packaging[python_targets_python3_5]<br>=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 ) <br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ( <br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 dev-python/sphinx[python_targets_python3_6] <br>=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 dev-python/rst-linker[python_targets_python3_6]<br>=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dev-python/jaraco-packaging[python_=
targets_python3_6]<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ) <br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 )<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
 )<br><br>So, my questions are:<br><br>0. am I missed smth? (and there are =
some other cases, I don&#39;t know about)<br>1. am I missed smth? (and ther=
e are some helper functions exist in eclasses to expess that kind <br>=C2=
=A0=C2=A0 of dependencies)<br>2. I think it would be nice to have some supp=
ort for Sphinx in eclasses to simplify ebuilds writing<br>=C2=A0=C2=A0 (if =
#1 is false)<br>=C2=A0=C2=A0 <br>Ideas/comments/opinions are really welcome=
...<br><br><br></div>

--001a114431f8fea007054f384840--