* [gentoo-dev] [PATCH 0/5] python-r1 suite: python_gen_impl_dep() function
@ 2015-12-23 16:44 Michał Górny
2015-12-23 16:44 ` [gentoo-dev] [PATCH 1/5] python-r1.eclass: Introduce python_gen_impl_dep Michał Górny
` (6 more replies)
0 siblings, 7 replies; 10+ messages in thread
From: Michał Górny @ 2015-12-23 16:44 UTC (permalink / raw
To: gentoo-dev; +Cc: python, Michał Górny
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-dev] [PATCH 1/5] python-r1.eclass: Introduce python_gen_impl_dep
2015-12-23 16:44 [gentoo-dev] [PATCH 0/5] python-r1 suite: python_gen_impl_dep() function Michał Górny
@ 2015-12-23 16:44 ` Michał Górny
2015-12-23 16:44 ` [gentoo-dev] [PATCH 2/5] python-single-r1.eclass: Add python_gen_impl_dep, alike in python-r1 Michał Górny
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2015-12-23 16:44 UTC (permalink / raw
To: gentoo-dev; +Cc: python, Michał Górny
Add a python_gen_impl_dep() that serves the purpose of generating custom
dependencies on the Python interpreter (like PYTHON_DEPS). The function
provides ability to request dependencies with another USE dependency
string (different than global PYTHON_REQ_USE) and limit the dependencies
to subset of supported implementations.
---
eclass/python-r1.eclass | 52 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 76fd944..6106577 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -383,6 +383,58 @@ python_gen_cond_dep() {
echo "${matches[@]}"
}
+# @FUNCTION: python_gen_impl_dep
+# @USAGE: [<requested-use-flags> [<impl-pattern>...]]
+# @DESCRIPTION:
+# Output a dependency on Python implementations with the specified USE
+# dependency string appended, or no USE dependency string if called
+# without the argument (or with empty argument). If any implementation
+# patterns are passed, the output dependencies will be generated only
+# for the implementations matching them.
+#
+# Use this function when you need to request different USE flags
+# on the Python interpreter depending on package's USE flags. If you
+# only need a single set of interpreter USE flags, just set
+# PYTHON_REQ_USE and use ${PYTHON_DEPS} globally.
+#
+# Example:
+# @CODE
+# PYTHON_COMPAT=( python{2_7,3_{3,4}} pypy )
+# RDEPEND="foo? ( $(python_gen_impl_dep 'xml(+)') )"
+# @CODE
+#
+# It will cause the variable to look like:
+# @CODE
+# RDEPEND="foo? (
+# python_targets_python2_7? (
+# dev-lang/python:2.7[xml(+)] )
+# python_targets_pypy? (
+# dev-python/pypy[xml(+)] ) )"
+# @CODE
+python_gen_impl_dep() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ local impl pattern
+ local matches=()
+
+ local PYTHON_REQ_USE=${1}
+ shift
+
+ local patterns=( "${@-*}" )
+ for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
+ for pattern in "${patterns[@]}"; do
+ if [[ ${impl} == ${pattern} ]]; then
+ local PYTHON_PKG_DEP
+ python_export "${impl}" PYTHON_PKG_DEP
+ matches+=( "python_targets_${impl}? ( ${PYTHON_PKG_DEP} )" )
+ break
+ fi
+ done
+ done
+
+ echo "${matches[@]}"
+}
+
# @ECLASS-VARIABLE: BUILD_DIR
# @DESCRIPTION:
# The current build directory. In global scope, it is supposed to
--
2.6.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-dev] [PATCH 2/5] python-single-r1.eclass: Add python_gen_impl_dep, alike in python-r1
2015-12-23 16:44 [gentoo-dev] [PATCH 0/5] python-r1 suite: python_gen_impl_dep() function Michał Górny
2015-12-23 16:44 ` [gentoo-dev] [PATCH 1/5] python-r1.eclass: Introduce python_gen_impl_dep Michał Górny
@ 2015-12-23 16:44 ` Michał Górny
2015-12-23 16:44 ` [gentoo-dev] [PATCH 3/5] app-emulation/xen-tools: Make use of new python_gen_impl_dep function Michał Górny
` (4 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2015-12-23 16:44 UTC (permalink / raw
To: gentoo-dev; +Cc: python, Michał Górny
---
eclass/python-single-r1.eclass | 58 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass
index 4d5026f..9e80866 100644
--- a/eclass/python-single-r1.eclass
+++ b/eclass/python-single-r1.eclass
@@ -411,6 +411,64 @@ python_gen_cond_dep() {
echo "${matches[@]}"
}
+# @FUNCTION: python_gen_impl_dep
+# @USAGE: [<requested-use-flags> [<impl-pattern>...]]
+# @DESCRIPTION:
+# Output a dependency on Python implementations with the specified USE
+# dependency string appended, or no USE dependency string if called
+# without the argument (or with empty argument). If any implementation
+# patterns are passed, the output dependencies will be generated only
+# for the implementations matching them.
+#
+# Use this function when you need to request different USE flags
+# on the Python interpreter depending on package's USE flags. If you
+# only need a single set of interpreter USE flags, just set
+# PYTHON_REQ_USE and use ${PYTHON_DEPS} globally.
+#
+# Example:
+# @CODE
+# PYTHON_COMPAT=( python{2_7,3_{3,4}} pypy )
+# RDEPEND="foo? ( $(python_gen_impl_dep 'xml(+)') )"
+# @CODE
+#
+# It will cause the variable to look like:
+# @CODE
+# RDEPEND="foo? (
+# python_single_target_python2_7? (
+# dev-lang/python:2.7[xml(+)] )
+# python_single_target_pypy? (
+# dev-python/pypy[xml(+)] ) )"
+# @CODE
+python_gen_impl_dep() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ local impl pattern
+ local matches=()
+
+ if [[ ${#_PYTHON_SUPPORTED_IMPLS[@]} -eq 1 ]]; then
+ flag_prefix=python_targets
+ else
+ flag_prefix=python_single_target
+ fi
+
+ local PYTHON_REQ_USE=${1}
+ shift
+
+ local patterns=( "${@-*}" )
+ for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
+ for pattern in "${patterns[@]}"; do
+ if [[ ${impl} == ${pattern} ]]; then
+ local PYTHON_PKG_DEP
+ python_export "${impl}" PYTHON_PKG_DEP
+ matches+=( "${flag_prefix}_${impl}? ( ${PYTHON_PKG_DEP} )" )
+ break
+ fi
+ done
+ done
+
+ echo "${matches[@]}"
+}
+
# @FUNCTION: python_setup
# @DESCRIPTION:
# Determine what the selected Python implementation is and set
--
2.6.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-dev] [PATCH 3/5] app-emulation/xen-tools: Make use of new python_gen_impl_dep function
2015-12-23 16:44 [gentoo-dev] [PATCH 0/5] python-r1 suite: python_gen_impl_dep() function Michał Górny
2015-12-23 16:44 ` [gentoo-dev] [PATCH 1/5] python-r1.eclass: Introduce python_gen_impl_dep Michał Górny
2015-12-23 16:44 ` [gentoo-dev] [PATCH 2/5] python-single-r1.eclass: Add python_gen_impl_dep, alike in python-r1 Michał Górny
@ 2015-12-23 16:44 ` Michał Górny
2015-12-24 16:21 ` Doug Goldstein
2015-12-23 16:44 ` [gentoo-dev] [PATCH 4/5] dev-python/django: Make use of the " Michał Górny
` (3 subsequent siblings)
6 siblings, 1 reply; 10+ messages in thread
From: Michał Górny @ 2015-12-23 16:44 UTC (permalink / raw
To: gentoo-dev; +Cc: python, Michał Górny
---
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 +-
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild b/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild
index 67e3d1c..d29aab3 100644
--- a/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild
@@ -68,7 +68,7 @@ DEPEND="dev-libs/lzo:2
api? ( dev-libs/libxml2
net-misc/curl )
${PYTHON_DEPS}
- pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
+ pygrub? ( $(python_gen_impl_dep ncurses) )
sys-devel/bin86
sys-devel/dev86
dev-lang/perl
diff --git a/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild b/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
index ae93f4d..392be10 100644
--- a/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
@@ -68,7 +68,7 @@ DEPEND="dev-libs/lzo:2
api? ( dev-libs/libxml2
net-misc/curl )
${PYTHON_DEPS}
- pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
+ pygrub? ( $(python_gen_impl_dep ncurses) )
sys-devel/bin86
sys-devel/dev86
dev-lang/perl
diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild
index 8af652c..ba2f756 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild
@@ -87,8 +87,8 @@ DEPEND="${COMMON_DEPEND}
${PYTHON_DEPS}
api? ( dev-libs/libxml2
net-misc/curl )
- pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
- ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+ pygrub? ( $(python_gen_impl_dep ncurses) )
+ ovmf? ( $(python_gen_impl_dep sqlite) )
!amd64? ( >=sys-apps/dtc-1.4.0 )
amd64? ( sys-devel/bin86
system-seabios? ( sys-firmware/seabios )
diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
index 59e9056..a147169 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
@@ -90,8 +90,8 @@ DEPEND="${COMMON_DEPEND}
${PYTHON_DEPS}
api? ( dev-libs/libxml2
net-misc/curl )
- pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
- ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+ pygrub? ( $(python_gen_impl_dep ncurses) )
+ ovmf? ( $(python_gen_impl_dep sqlite) )
!amd64? ( >=sys-apps/dtc-1.4.0 )
amd64? ( sys-devel/bin86
system-seabios? ( sys-firmware/seabios )
diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild
index 57d618e..e9f84c0 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild
@@ -87,7 +87,7 @@ DEPEND="${COMMON_DEPEND}
${PYTHON_DEPS}
api? ( dev-libs/libxml2
net-misc/curl )
- ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+ ovmf? ( $(python_gen_impl_dep sqlite) )
!amd64? ( >=sys-apps/dtc-1.4.0 )
amd64? ( sys-devel/bin86
system-seabios? ( sys-firmware/seabios )
diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
index 104fac9..ceb1402 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
@@ -90,7 +90,7 @@ DEPEND="${COMMON_DEPEND}
${PYTHON_DEPS}
api? ( dev-libs/libxml2
net-misc/curl )
- ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+ ovmf? ( $(python_gen_impl_dep sqlite) )
!amd64? ( >=sys-apps/dtc-1.4.0 )
amd64? ( sys-devel/bin86
system-seabios? ( sys-firmware/seabios )
--
2.6.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-dev] [PATCH 4/5] dev-python/django: Make use of the new python_gen_impl_dep function
2015-12-23 16:44 [gentoo-dev] [PATCH 0/5] python-r1 suite: python_gen_impl_dep() function Michał Górny
` (2 preceding siblings ...)
2015-12-23 16:44 ` [gentoo-dev] [PATCH 3/5] app-emulation/xen-tools: Make use of new python_gen_impl_dep function Michał Górny
@ 2015-12-23 16:44 ` Michał Górny
2015-12-23 16:44 ` [gentoo-dev] [PATCH 5/5] sys-apps/portage: " Michał Górny
` (2 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2015-12-23 16:44 UTC (permalink / raw
To: gentoo-dev; +Cc: python, Michał Górny
---
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 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dev-python/django/django-1.4.22.ebuild b/dev-python/django/django-1.4.22.ebuild
index 51687fb..e2a6216 100644
--- a/dev-python/django/django-1.4.22.ebuild
+++ b/dev-python/django/django-1.4.22.ebuild
@@ -24,7 +24,7 @@ RDEPEND=""
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
- ${PYTHON_DEPS//sqlite?/sqlite}
+ $(python_gen_impl_dep sqlite)
dev-python/docutils[${PYTHON_USEDEP}]
<dev-python/numpy-1.9[$(python_gen_usedep 'python*')]
dev-python/pillow[${PYTHON_USEDEP}]
diff --git a/dev-python/django/django-1.5.12.ebuild b/dev-python/django/django-1.5.12.ebuild
index ce81f7d..c41ae1d 100644
--- a/dev-python/django/django-1.5.12.ebuild
+++ b/dev-python/django/django-1.5.12.ebuild
@@ -27,7 +27,7 @@ RDEPEND="dev-python/pillow[${PYTHON_USEDEP}]
mysql? ( >=dev-python/mysql-python-1.2.3[${PY2_USEDEP}] )"
DEPEND="${RDEPEND}
doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] )
- test? ( ${PYTHON_DEPS//sqlite?/sqlite} )"
+ test? ( $(python_gen_impl_dep sqlite) )"
REQUIRED_USE="mysql? ( $(python_gen_useflags python2_7) )
postgres? ( || ( $(python_gen_useflags 'python{2_7,3_2,3_3}') ) )"
diff --git a/dev-python/django/django-1.6.11.ebuild b/dev-python/django/django-1.6.11.ebuild
index 77cfaa9..3f887e6 100644
--- a/dev-python/django/django-1.6.11.ebuild
+++ b/dev-python/django/django-1.6.11.ebuild
@@ -27,7 +27,7 @@ DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] )
test? (
- ${PYTHON_DEPS//sqlite?/sqlite}
+ $(python_gen_impl_dep sqlite)
dev-python/docutils[${PYTHON_USEDEP}]
<dev-python/numpy-1.9[$(python_gen_usedep 'python*')]
dev-python/pillow[${PYTHON_USEDEP}]
diff --git a/dev-python/django/django-1.7.11.ebuild b/dev-python/django/django-1.7.11.ebuild
index fd544c2..3d06369 100644
--- a/dev-python/django/django-1.7.11.ebuild
+++ b/dev-python/django/django-1.7.11.ebuild
@@ -26,7 +26,7 @@ DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] )
test? (
- ${PYTHON_DEPS//sqlite?/sqlite}
+ $(python_gen_impl_dep sqlite)
dev-python/docutils[${PYTHON_USEDEP}]
dev-python/numpy[$(python_gen_usedep 'python*')]
dev-python/pillow[${PYTHON_USEDEP}]
diff --git a/dev-python/django/django-1.8.7.ebuild b/dev-python/django/django-1.8.7.ebuild
index f610472..f62d9fb 100644
--- a/dev-python/django/django-1.8.7.ebuild
+++ b/dev-python/django/django-1.8.7.ebuild
@@ -30,7 +30,7 @@ DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] )
test? (
- ${PYTHON_DEPS//sqlite?/sqlite}
+ $(python_gen_impl_dep sqlite)
dev-python/docutils[${PYTHON_USEDEP}]
dev-python/numpy[$(python_gen_usedep 'python*')]
dev-python/pillow[${PYTHON_USEDEP}]
diff --git a/dev-python/django/django-1.9.ebuild b/dev-python/django/django-1.9.ebuild
index a435541..78a3734 100644
--- a/dev-python/django/django-1.9.ebuild
+++ b/dev-python/django/django-1.9.ebuild
@@ -34,7 +34,7 @@ DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] )
test? (
- ${PYTHON_DEPS//sqlite?/sqlite}
+ $(python_gen_impl_dep sqlite)
dev-python/docutils[${PYTHON_USEDEP}]
dev-python/numpy[$(python_gen_usedep 'python*')]
dev-python/pillow[${PYTHON_USEDEP}]
diff --git a/dev-python/django/django-9999.ebuild b/dev-python/django/django-9999.ebuild
index aef2b6f8..4ae76a7 100644
--- a/dev-python/django/django-9999.ebuild
+++ b/dev-python/django/django-9999.ebuild
@@ -27,7 +27,7 @@ DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] )
test? (
- ${PYTHON_DEPS//sqlite?/sqlite}
+ $(python_gen_impl_dep sqlite)
dev-python/docutils[${PYTHON_USEDEP}]
dev-python/numpy[$(python_gen_usedep 'python*')]
dev-python/pillow[${PYTHON_USEDEP}]
--
2.6.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-dev] [PATCH 5/5] sys-apps/portage: Make use of the new python_gen_impl_dep function
2015-12-23 16:44 [gentoo-dev] [PATCH 0/5] python-r1 suite: python_gen_impl_dep() function Michał Górny
` (3 preceding siblings ...)
2015-12-23 16:44 ` [gentoo-dev] [PATCH 4/5] dev-python/django: Make use of the " Michał Górny
@ 2015-12-23 16:44 ` Michał Górny
2015-12-24 15:30 ` [gentoo-dev] [PATCH 0/5] python-r1 suite: python_gen_impl_dep() function Peter Stuge
2015-12-31 14:52 ` Michał Górny
6 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2015-12-23 16:44 UTC (permalink / raw
To: gentoo-dev; +Cc: python, Michał Górny
---
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 +--
6 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/sys-apps/portage/portage-2.2.20.1.ebuild b/sys-apps/portage/portage-2.2.20.1.ebuild
index 9b1a310..2fc8e95 100644
--- a/sys-apps/portage/portage-2.2.20.1.ebuild
+++ b/sys-apps/portage/portage-2.2.20.1.ebuild
@@ -9,7 +9,6 @@ PYTHON_COMPAT=(
python3_3 python3_4
python2_7
)
-# Note: substituted below
PYTHON_REQ_USE='bzip2(+)'
inherit distutils-r1 multilib
@@ -22,7 +21,7 @@ KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86
SLOT="0"
IUSE="build doc epydoc +ipc linguas_ru selinux xattr"
-DEPEND="!build? ( ${PYTHON_DEPS//bzip2(+)/ssl(+),bzip2(+)} )
+DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
>=app-arch/tar-1.27
dev-lang/python-exec:2
>=sys-apps/sed-4.0.5 sys-devel/patch
diff --git a/sys-apps/portage/portage-2.2.23.ebuild b/sys-apps/portage/portage-2.2.23.ebuild
index 43cb079..c310cb5 100644
--- a/sys-apps/portage/portage-2.2.23.ebuild
+++ b/sys-apps/portage/portage-2.2.23.ebuild
@@ -9,7 +9,6 @@ PYTHON_COMPAT=(
python3_3 python3_4 python3_5
python2_7
)
-# Note: substituted below
PYTHON_REQ_USE='bzip2(+)'
inherit distutils-r1 multilib
@@ -22,7 +21,7 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~s
SLOT="0"
IUSE="build doc epydoc +ipc linguas_ru selinux xattr"
-DEPEND="!build? ( ${PYTHON_DEPS//bzip2(+)/ssl(+),bzip2(+)} )
+DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
>=app-arch/tar-1.27
dev-lang/python-exec:2
>=sys-apps/sed-4.0.5 sys-devel/patch
diff --git a/sys-apps/portage/portage-2.2.24.ebuild b/sys-apps/portage/portage-2.2.24.ebuild
index 823c950..447fe0c 100644
--- a/sys-apps/portage/portage-2.2.24.ebuild
+++ b/sys-apps/portage/portage-2.2.24.ebuild
@@ -9,7 +9,6 @@ PYTHON_COMPAT=(
python3_3 python3_4 python3_5
python2_7
)
-# Note: substituted below
PYTHON_REQ_USE='bzip2(+)'
inherit distutils-r1 multilib
@@ -22,7 +21,7 @@ KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~spa
SLOT="0"
IUSE="build doc epydoc +ipc linguas_ru selinux xattr"
-DEPEND="!build? ( ${PYTHON_DEPS//bzip2(+)/ssl(+),bzip2(+)} )
+DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
>=app-arch/tar-1.27
dev-lang/python-exec:2
>=sys-apps/sed-4.0.5 sys-devel/patch
diff --git a/sys-apps/portage/portage-2.2.25.ebuild b/sys-apps/portage/portage-2.2.25.ebuild
index 43cb079..c310cb5 100644
--- a/sys-apps/portage/portage-2.2.25.ebuild
+++ b/sys-apps/portage/portage-2.2.25.ebuild
@@ -9,7 +9,6 @@ PYTHON_COMPAT=(
python3_3 python3_4 python3_5
python2_7
)
-# Note: substituted below
PYTHON_REQ_USE='bzip2(+)'
inherit distutils-r1 multilib
@@ -22,7 +21,7 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~s
SLOT="0"
IUSE="build doc epydoc +ipc linguas_ru selinux xattr"
-DEPEND="!build? ( ${PYTHON_DEPS//bzip2(+)/ssl(+),bzip2(+)} )
+DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
>=app-arch/tar-1.27
dev-lang/python-exec:2
>=sys-apps/sed-4.0.5 sys-devel/patch
diff --git a/sys-apps/portage/portage-2.2.26.ebuild b/sys-apps/portage/portage-2.2.26.ebuild
index 9473c2c..0b2f97d 100644
--- a/sys-apps/portage/portage-2.2.26.ebuild
+++ b/sys-apps/portage/portage-2.2.26.ebuild
@@ -9,7 +9,6 @@ PYTHON_COMPAT=(
python3_3 python3_4 python3_5
python2_7
)
-# Note: substituted below
PYTHON_REQ_USE='bzip2(+)'
inherit distutils-r1 multilib
@@ -22,7 +21,7 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~s
SLOT="0"
IUSE="build doc epydoc +ipc linguas_ru selinux xattr"
-DEPEND="!build? ( ${PYTHON_DEPS//bzip2(+)/ssl(+),bzip2(+)} )
+DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
>=app-arch/tar-1.27
dev-lang/python-exec:2
>=sys-apps/sed-4.0.5 sys-devel/patch
diff --git a/sys-apps/portage/portage-9999.ebuild b/sys-apps/portage/portage-9999.ebuild
index f69e62f..7ef56c9 100644
--- a/sys-apps/portage/portage-9999.ebuild
+++ b/sys-apps/portage/portage-9999.ebuild
@@ -9,7 +9,6 @@ PYTHON_COMPAT=(
python3_3 python3_4 python3_5
python2_7
)
-# Note: substituted below
PYTHON_REQ_USE='bzip2(+)'
inherit distutils-r1 git-r3 multilib
@@ -22,7 +21,7 @@ KEYWORDS=""
SLOT="0"
IUSE="build doc epydoc +ipc linguas_ru selinux xattr"
-DEPEND="!build? ( ${PYTHON_DEPS//bzip2(+)/ssl(+),bzip2(+)} )
+DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
>=app-arch/tar-1.27
dev-lang/python-exec:2
>=sys-apps/sed-4.0.5 sys-devel/patch
--
2.6.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] [PATCH 0/5] python-r1 suite: python_gen_impl_dep() function
2015-12-23 16:44 [gentoo-dev] [PATCH 0/5] python-r1 suite: python_gen_impl_dep() function Michał Górny
` (4 preceding siblings ...)
2015-12-23 16:44 ` [gentoo-dev] [PATCH 5/5] sys-apps/portage: " Michał Górny
@ 2015-12-24 15:30 ` Peter Stuge
2015-12-29 17:40 ` Michał Górny
2015-12-31 14:52 ` Michał Górny
6 siblings, 1 reply; 10+ messages in thread
From: Peter Stuge @ 2015-12-24 15:30 UTC (permalink / raw
To: gentoo-dev
Michał Górny wrote:
> Please review the patches sent in reply.
The changes look good to me, but maybe the function should have
'use' in its name; it's not obvious that the parameter is about
USE as opposed to PN.
//Peter
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] [PATCH 3/5] app-emulation/xen-tools: Make use of new python_gen_impl_dep function
2015-12-23 16:44 ` [gentoo-dev] [PATCH 3/5] app-emulation/xen-tools: Make use of new python_gen_impl_dep function Michał Górny
@ 2015-12-24 16:21 ` Doug Goldstein
0 siblings, 0 replies; 10+ messages in thread
From: Doug Goldstein @ 2015-12-24 16:21 UTC (permalink / raw
To: gentoo-dev; +Cc: python, Michał Górny
[-- Attachment #1: Type: text/plain, Size: 4439 bytes --]
On 12/23/15 10:44 AM, Michał Górny wrote:
> ---
> 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 +-
> 6 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild b/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild
> index 67e3d1c..d29aab3 100644
> --- a/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild
> +++ b/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild
> @@ -68,7 +68,7 @@ DEPEND="dev-libs/lzo:2
> api? ( dev-libs/libxml2
> net-misc/curl )
> ${PYTHON_DEPS}
> - pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
> + pygrub? ( $(python_gen_impl_dep ncurses) )
> sys-devel/bin86
> sys-devel/dev86
> dev-lang/perl
> diff --git a/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild b/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
> index ae93f4d..392be10 100644
> --- a/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
> +++ b/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
> @@ -68,7 +68,7 @@ DEPEND="dev-libs/lzo:2
> api? ( dev-libs/libxml2
> net-misc/curl )
> ${PYTHON_DEPS}
> - pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
> + pygrub? ( $(python_gen_impl_dep ncurses) )
> sys-devel/bin86
> sys-devel/dev86
> dev-lang/perl
> diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild
> index 8af652c..ba2f756 100644
> --- a/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild
> +++ b/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild
> @@ -87,8 +87,8 @@ DEPEND="${COMMON_DEPEND}
> ${PYTHON_DEPS}
> api? ( dev-libs/libxml2
> net-misc/curl )
> - pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
> - ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
> + pygrub? ( $(python_gen_impl_dep ncurses) )
> + ovmf? ( $(python_gen_impl_dep sqlite) )
> !amd64? ( >=sys-apps/dtc-1.4.0 )
> amd64? ( sys-devel/bin86
> system-seabios? ( sys-firmware/seabios )
> diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
> index 59e9056..a147169 100644
> --- a/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
> +++ b/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
> @@ -90,8 +90,8 @@ DEPEND="${COMMON_DEPEND}
> ${PYTHON_DEPS}
> api? ( dev-libs/libxml2
> net-misc/curl )
> - pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
> - ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
> + pygrub? ( $(python_gen_impl_dep ncurses) )
> + ovmf? ( $(python_gen_impl_dep sqlite) )
> !amd64? ( >=sys-apps/dtc-1.4.0 )
> amd64? ( sys-devel/bin86
> system-seabios? ( sys-firmware/seabios )
> diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild
> index 57d618e..e9f84c0 100644
> --- a/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild
> +++ b/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild
> @@ -87,7 +87,7 @@ DEPEND="${COMMON_DEPEND}
> ${PYTHON_DEPS}
> api? ( dev-libs/libxml2
> net-misc/curl )
> - ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
> + ovmf? ( $(python_gen_impl_dep sqlite) )
> !amd64? ( >=sys-apps/dtc-1.4.0 )
> amd64? ( sys-devel/bin86
> system-seabios? ( sys-firmware/seabios )
> diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
> index 104fac9..ceb1402 100644
> --- a/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
> +++ b/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
> @@ -90,7 +90,7 @@ DEPEND="${COMMON_DEPEND}
> ${PYTHON_DEPS}
> api? ( dev-libs/libxml2
> net-misc/curl )
> - ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
> + ovmf? ( $(python_gen_impl_dep sqlite) )
> !amd64? ( >=sys-apps/dtc-1.4.0 )
> amd64? ( sys-devel/bin86
> system-seabios? ( sys-firmware/seabios )
>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
I actually made ncurses always required in recent versions to try and
avoid this hack. I'm glad there's a nicer way to officially do this.
--
Doug Goldstein
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 959 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] [PATCH 0/5] python-r1 suite: python_gen_impl_dep() function
2015-12-24 15:30 ` [gentoo-dev] [PATCH 0/5] python-r1 suite: python_gen_impl_dep() function Peter Stuge
@ 2015-12-29 17:40 ` Michał Górny
0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2015-12-29 17:40 UTC (permalink / raw
To: Peter Stuge; +Cc: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 412 bytes --]
On Thu, 24 Dec 2015 16:30:32 +0100
Peter Stuge <peter@stuge.se> wrote:
> Michał Górny wrote:
> > Please review the patches sent in reply.
>
> The changes look good to me, but maybe the function should have
> 'use' in its name; it's not obvious that the parameter is about
> USE as opposed to PN.
Any specific suggestions?
--
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] [PATCH 0/5] python-r1 suite: python_gen_impl_dep() function
2015-12-23 16:44 [gentoo-dev] [PATCH 0/5] python-r1 suite: python_gen_impl_dep() function Michał Górny
` (5 preceding siblings ...)
2015-12-24 15:30 ` [gentoo-dev] [PATCH 0/5] python-r1 suite: python_gen_impl_dep() function Peter Stuge
@ 2015-12-31 14:52 ` Michał Górny
6 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2015-12-31 14:52 UTC (permalink / raw
To: gentoo-dev; +Cc: python
[-- Attachment #1: Type: text/plain, Size: 3410 bytes --]
On Wed, 23 Dec 2015 17:44:35 +0100
Michał Górny <mgorny@gentoo.org> wrote:
> 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(-)
Merged.
--
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-12-31 14:53 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-23 16:44 [gentoo-dev] [PATCH 0/5] python-r1 suite: python_gen_impl_dep() function Michał Górny
2015-12-23 16:44 ` [gentoo-dev] [PATCH 1/5] python-r1.eclass: Introduce python_gen_impl_dep Michał Górny
2015-12-23 16:44 ` [gentoo-dev] [PATCH 2/5] python-single-r1.eclass: Add python_gen_impl_dep, alike in python-r1 Michał Górny
2015-12-23 16:44 ` [gentoo-dev] [PATCH 3/5] app-emulation/xen-tools: Make use of new python_gen_impl_dep function Michał Górny
2015-12-24 16:21 ` Doug Goldstein
2015-12-23 16:44 ` [gentoo-dev] [PATCH 4/5] dev-python/django: Make use of the " Michał Górny
2015-12-23 16:44 ` [gentoo-dev] [PATCH 5/5] sys-apps/portage: " Michał Górny
2015-12-24 15:30 ` [gentoo-dev] [PATCH 0/5] python-r1 suite: python_gen_impl_dep() function Peter Stuge
2015-12-29 17:40 ` Michał Górny
2015-12-31 14:52 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox