Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 426768 - python-distutils-ng.eclass: add something like python.eclass's PYTHON_USE_WITH
Summary: python-distutils-ng.eclass: add something like python.eclass's PYTHON_USE_WITH
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-16 00:53 UTC by Alexandre Rostovtsev (RETIRED)
Modified: 2012-09-26 12:08 UTC (History)
1 user (show)

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


Attachments
python-distutils-ng.eclass.patch (python-distutils-ng.eclass.patch,1.60 KB, patch)
2012-09-24 19:36 UTC, Julian Ospald
Details | Diff
python-distutils-ng.eclass.patch (python-distutils-ng.eclass.patch,1.46 KB, patch)
2012-09-26 11:30 UTC, Julian Ospald
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-07-16 00:53:02 UTC
Suppose that I am writing an ebuild for a python package that needs elementtree. It therefore needs to depend on python[xml] for every slot of python - so if I use python-distutils-ng.eclass, I need to explicitly write something like

RDEPEND="python_targets_python2_5? ( dev-lang/python:2.5[xml] )
	python_targets_python2_6? ( dev-lang/python:2.6[xml] )
	python_targets_python2_7? ( dev-lang/python:2.7[xml] )
	python_targets_python3_1? ( dev-lang/python:3.1[xml] )
	python_targets_python3_2? ( dev-lang/python:3.2[xml] )"

which really is terribly ugly.

I suggest that python-distutils-ng.eclass add something like the PYTHON_USE_WITH/PYTHON_USE_WITH_OPT mechanism in python.eclass to automate such dependency declarations on python implementations.
Comment 1 Julian Ospald 2012-09-24 19:36:23 UTC
Created attachment 324868 [details, diff]
python-distutils-ng.eclass.patch

discussed on dev-ml

If no one comes up with a better idea I would like to apply it.
Comment 2 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-09-25 01:50:42 UTC
(In reply to comment #1)

That should work.
Comment 3 Julian Ospald 2012-09-26 11:30:34 UTC
Created attachment 325020 [details, diff]
python-distutils-ng.eclass.patch

after some discussion it seems the python herd would like to drop jython and pypy variables, so we have only one and handle the flag-difference inside the implementations via fake-flags
Comment 4 Julian Ospald 2012-09-26 12:08:16 UTC
+  26 Sep 2012; Julian Ospald <hasufell@gentoo.org> python-distutils-ng.eclass:
+  add PYTHON_USE wrt #426768


# @ECLASS-VARIABLE: PYTHON_USE
# @DEFAULT_UNSET
# @DESCRIPTION:
# Comma-separated list of useflags needed for all(!) allowed
# implementations. This is directly substituted into one or more of
# dev-lang/python[${PYTHON_USE}], dev-python/pypy[${PYTHON_USE}] and
# dev-java/jython[${PYTHON_USE}].
# @CODE
# example 1: PYTHON_USE="xml,sqlite"
# example 2: PYTHON_USE="xml?,threads?,-foo"
# @CODE