Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 469258 - =www-servers/tornado-2.4-r1 and =www-servers/tornado-2.4.1 have bad python use reqs
Summary: =www-servers/tornado-2.4-r1 and =www-servers/tornado-2.4.1 have bad python us...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-10 07:45 UTC by James Cloos
Modified: 2013-05-20 15:51 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Cloos 2013-05-10 07:45:14 UTC
The ebuild switched to this syntax:

  curl? ( dev-python/pycurl[$(python_gen_usedep 'python2*')] )

but that ends up demanding that all of the python_targets_python2_* be enabled (2_5, 2_6 and 2_7), not any subset thereof.

The older version, tornado-2.2.1.ebuild has:

  || ( dev-lang/python:2.7 dev-lang/python:2.6 dev-python/simplejson )

which permits any one of the list to work.

Having PYTHON_TARGETS="python2_7 python3_2" should be enough to install anything which needs python2 or python3.
Comment 1 Jan Matějka (RETIRED) gentoo-dev 2013-05-10 11:54:31 UTC
[ebuild  N     ] dev-python/pycurl-7.19.0-r1  USE="ssl -examples" CURL_SSL="openssl -gnutls -nss" 70 kB
[ebuild  N     ] www-servers/tornado-2.4  USE="curl" 340 kB

Total: 2 packages (2 new), Size of downloads: 410 kB

Would you like to merge these packages? [Yes/No] y

>>> Verifying ebuild manifests

>>> Emerging (1 of 2) dev-python/pycurl-7.19.0-r1
 * Fetching files in the background. To view fetch progress, run
 * `tail -f /var/log/emerge-fetch.log` in another terminal.
 * pycurl-7.19.0.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                       [ ok ]
>>> Unpacking source...
>>> Unpacking pycurl-7.19.0.tar.gz to /var/tmp/portage/dev-python/pycurl-7.19.0-r1/work
>>> Source unpacked in /var/tmp/portage/dev-python/pycurl-7.19.0-r1/work
>>> Preparing source in /var/tmp/portage/dev-python/pycurl-7.19.0-r1/work/pycurl-7.19.0 ...
 * Applying pycurl-7.19.0-linking-v2.patch ...                                                                                                                     [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-python/pycurl-7.19.0-r1/work/pycurl-7.19.0 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-python/pycurl-7.19.0-r1/work/pycurl-7.19.0 ...
 * Building of dev-python/pycurl-7.19.0-r1 with CPython 2.5...
python2.5 setup.py build -b build-2.5
^C

Exiting on signal 2

elliot python-2.7.4 # grep PYTHON_TARGE /etc/portage/make.conf
PYTHON_TARGETS="python2_7 python3_2"
Comment 2 Jan Matějka (RETIRED) gentoo-dev 2013-05-10 12:07:45 UTC
What is your dev-python/pycurl version and USE_PYTHON?

In case you are merging 7.19.0-r1 that uses the EAPI=4 eclass, so in case you have 2.5 in USE_PYTHON, it will merge it for py2.5 too, which seems like reasonable behavior.
Comment 3 James Cloos 2013-05-10 17:43:09 UTC
dev-python/pycurl-7.19.0-r3
PYTHON_TARGETS="python2_7 python3_2"

The construct in the ebuild expands to:

REQUIRED_USE="curl? ( python_targets_python2_5 python_targets_python2_6 python_targets_python2_7 )

because those three versions of python2 are installed.

But that requires that all three be in PYTHON_TARGETS, when you only need any non-empty subset of the three.

Perhaps this is the fix?:

REQUIRED_USE="curl? || ( $(python_gen_useflags python2*) )"

and perhaps also a || added to the RDEPEND?
Comment 4 Jan Matějka (RETIRED) gentoo-dev 2013-05-10 20:02:29 UTC
What is your USE_PYTHON ?
Comment 5 Jan Matějka (RETIRED) gentoo-dev 2013-05-10 20:04:30 UTC
disregard my last comment. It is irrelevant.
Comment 6 Ian Delaney (RETIRED) gentoo-dev 2013-05-20 10:41:40 UTC
(In reply to comment #0)
> The ebuild switched to this syntax:
> 
>        curl? ( dev-python/pycurl[$(python_gen_usedep 'python2*')] )
> 

from the ebuild
RDEPEND="curl? ( dev-python/pycurl[$(python_gen_usedep 'python2*')] )

seems to me no switching required here.

> but that ends up demanding that all of the python_targets_python2_* be
> enabled (2_5, 2_6 and 2_7), not any subset thereof.
> 
demanding?.  enabling yes.  You don't know how to achieve a subset?

> The older version, tornado-2.2.1.ebuild has:
> 
>   || ( dev-lang/python:2.7 dev-lang/python:2.6 dev-python/simplejson )
> 
> which permits any one of the list to work.
> 
> Having PYTHON_TARGETS="python2_7 python3_2" should be enough to install
> anything which needs python2 or python3.

from PYTHON_COMPAT=( python{2_5,2_6,2_7} pypy{1_9,2_0} ) to 
PYTHON_TARGETS=( python2_7 python3_2 ) is quite a leap.

PYTHON_TARGETS=( python2_7 python3_2 ) means this package offers support to py2.7 and py3.2.  What do you think it means?
Comment 7 James Cloos 2013-05-20 13:23:39 UTC
The actual effect of the syntax in the ebuild was that, due to the required use, portage wanted to pycurl to be build for every python2 installed on the box.

I wouldn’t have posted the bug if the syntax were already OK.
Comment 8 Alejandro Dubrovsky 2013-05-20 13:50:43 UTC
There might be some other way to limit what subsets of the versions of Python we want installed, but I don't know what they are. In my make.conf, I've got:

USE_PYTHON="2.7"
PYTHON_TARGETS="python2_7"
PYTHON_SINGLE_TARGET="python2_7"

but running emerge -v www-servers/tornado still gives:

!!! The ebuild selected to satisfy "www-servers/tornado" has unmet requirements.
- www-servers/tornado-2.4.1::gentoo USE="curl" PYTHON_TARGETS="python2_7 -pypy1_9 -pypy2_0 -python2_5 -python2_6"

  The following REQUIRED_USE flag constraints are unsatisfied:
    curl? ( python_targets_python2_5 python_targets_python2_6 )

  The above constraints are a subset of the following complete expression:
    curl? ( python_targets_python2_5 python_targets_python2_6 python_targets_python2_7 )
Comment 9 Ian Delaney (RETIRED) gentoo-dev 2013-05-20 15:47:27 UTC
hmm ok, it seems the PYTHON_TARGETS="python2_7 python3_2" you cite you're referring to being set in make.conf, sorry I was confusing with PYTHON_COMPAT. Yes the REQUIRED_USE is hard setting python2*.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-05-20 15:51:31 UTC
+  20 May 2013; Michał Górny <mgorny@gentoo.org> tornado-2.4-r1.ebuild,
+  tornado-2.4.1.ebuild:
+  Add missing || to PYTHON_USEDEP. Bug #469258.