Hi,

Here's a quick set of patches that add python_gen_impl_dep() function
to python-r1 and python-single-r1 eclasses, and use them in a few
ebuilds.

The problem solved is that some Python packages need to depend on more
than one combination of USE flags on the Python interpreter. Currently,
we solved this through bash-substituting USE dependencies in generated
${PYTHON_DEPS} -- though this was kinda ugly.

The python_gen_impl_dep() function intends to match API of other
functions. In particular, its usage is:

  python_gen_impl_dep <req-use> [<impl-pattern>...]

where req-use defines the USE-dep for Python interpreters (alike
PYTHON_REQ_USE) and can optionally be an empty string, and impl-patterns
specify PYTHON_COMPAT patterns to match implementations that will be
present in the dependency. If no patterns are passed, '*' is assumed.

Examples (for PYTHON_COMPAT=( python2_7 python3_4 )):

  python_gen_impl_dep 'bzip2(+)'

    python_targets_python2_7? ( dev-lang/python:2.7[bzip2(+)] )
    python_targets_python3_4? ( dev-lang/python:3.4[bzip2(+)] )

  python_gen_impl_dep ''

    python_targets_python2_7? ( dev-lang/python:2.7 )
    python_targets_python3_4? ( dev-lang/python:3.4 )

  python_gen_impl_dep '' python3*

    python_targets_python3_4? ( dev-lang/python:3.4 )

Please review the patches sent in reply.


Michał Górny (5):
  python-r1.eclass: Introduce python_gen_impl_dep
  python-single-r1.eclass: Add python_gen_impl_dep, alike in python-r1
  app-emulation/xen-tools: Make use of new python_gen_impl_dep function
  dev-python/django: Make use of the new python_gen_impl_dep function
  sys-apps/portage: Make use of the new python_gen_impl_dep function

 app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild |  2 +-
 app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild |  2 +-
 app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild  |  4 +-
 app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild  |  4 +-
 app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild  |  2 +-
 app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild  |  2 +-
 dev-python/django/django-1.4.22.ebuild             |  2 +-
 dev-python/django/django-1.5.12.ebuild             |  2 +-
 dev-python/django/django-1.6.11.ebuild             |  2 +-
 dev-python/django/django-1.7.11.ebuild             |  2 +-
 dev-python/django/django-1.8.7.ebuild              |  2 +-
 dev-python/django/django-1.9.ebuild                |  2 +-
 dev-python/django/django-9999.ebuild               |  2 +-
 eclass/python-r1.eclass                            | 52 +++++++++++++++++++
 eclass/python-single-r1.eclass                     | 58 ++++++++++++++++++++++
 sys-apps/portage/portage-2.2.20.1.ebuild           |  3 +-
 sys-apps/portage/portage-2.2.23.ebuild             |  3 +-
 sys-apps/portage/portage-2.2.24.ebuild             |  3 +-
 sys-apps/portage/portage-2.2.25.ebuild             |  3 +-
 sys-apps/portage/portage-2.2.26.ebuild             |  3 +-
 sys-apps/portage/portage-9999.ebuild               |  3 +-
 21 files changed, 131 insertions(+), 27 deletions(-)

-- 
2.6.4


Reply via email to