* [gentoo-python] [PATCH python-r1 1/2] Reuse multibuild.eclass in python_export_best().
@ 2013-03-17 22:33 Michał Górny
2013-03-17 23:36 ` [gentoo-python] " Mike Gilbert
0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2013-03-17 22:33 UTC (permalink / raw
To: gentoo-python; +Cc: python, Michał Górny
---
gx86/eclass/python-r1.eclass | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/gx86/eclass/python-r1.eclass b/gx86/eclass/python-r1.eclass
index 12e3baa..99bd240 100644
--- a/gx86/eclass/python-r1.eclass
+++ b/gx86/eclass/python-r1.eclass
@@ -661,24 +661,18 @@ python_parallel_foreach_impl() {
python_export_best() {
debug-print-function ${FUNCNAME} "${@}"
- _python_validate_useflags
-
[[ ${#} -gt 0 ]] || set -- EPYTHON PYTHON
- local impl best
- for impl in "${_PYTHON_ALL_IMPLS[@]}"; do
- if has "${impl}" "${PYTHON_COMPAT[@]}" \
- && _python_impl_supported "${impl}" \
- && use "python_targets_${impl}"
- then
- best=${impl}
- fi
- done
+ local best MULTIBUILD_VARIANTS
+ _python_obtain_impls
- [[ ${best+1} ]] || die "python_export_best(): no implementation found!"
+ _python_set_best() {
+ best=${MULTIBUILD_VARIANT}
+ }
+ multibuild_for_best_variant _python_set_best
- debug-print "${FUNCNAME}: Best implementation is: ${impl}"
- python_export "${impl}" "${@}"
+ debug-print "${FUNCNAME}: Best implementation is: ${best}"
+ python_export "${best}" "${@}"
}
# @FUNCTION: python_replicate_script
--
1.8.1.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-python] Re: [PATCH python-r1 1/2] Reuse multibuild.eclass in python_export_best().
2013-03-17 22:33 [gentoo-python] [PATCH python-r1 1/2] Reuse multibuild.eclass in python_export_best() Michał Górny
@ 2013-03-17 23:36 ` Mike Gilbert
0 siblings, 0 replies; 2+ messages in thread
From: Mike Gilbert @ 2013-03-17 23:36 UTC (permalink / raw
To: Michał Górny; +Cc: gentoo-python, python
On Sun, Mar 17, 2013 at 6:33 PM, Michał Górny <mgorny@gentoo.org> wrote:
> ---
> gx86/eclass/python-r1.eclass | 22 ++++++++--------------
> 1 file changed, 8 insertions(+), 14 deletions(-)
>
> diff --git a/gx86/eclass/python-r1.eclass b/gx86/eclass/python-r1.eclass
> index 12e3baa..99bd240 100644
> --- a/gx86/eclass/python-r1.eclass
> +++ b/gx86/eclass/python-r1.eclass
> @@ -661,24 +661,18 @@ python_parallel_foreach_impl() {
> python_export_best() {
> debug-print-function ${FUNCNAME} "${@}"
>
> - _python_validate_useflags
> -
> [[ ${#} -gt 0 ]] || set -- EPYTHON PYTHON
>
> - local impl best
> - for impl in "${_PYTHON_ALL_IMPLS[@]}"; do
> - if has "${impl}" "${PYTHON_COMPAT[@]}" \
> - && _python_impl_supported "${impl}" \
> - && use "python_targets_${impl}"
> - then
> - best=${impl}
> - fi
> - done
> + local best MULTIBUILD_VARIANTS
> + _python_obtain_impls
>
> - [[ ${best+1} ]] || die "python_export_best(): no implementation found!"
> + _python_set_best() {
> + best=${MULTIBUILD_VARIANT}
> + }
> + multibuild_for_best_variant _python_set_best
>
> - debug-print "${FUNCNAME}: Best implementation is: ${impl}"
> - python_export "${impl}" "${@}"
> + debug-print "${FUNCNAME}: Best implementation is: ${best}"
> + python_export "${best}" "${@}"
> }
>
> # @FUNCTION: python_replicate_script
> --
> 1.8.1.5
>
Seems reasonable.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-17 23:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-17 22:33 [gentoo-python] [PATCH python-r1 1/2] Reuse multibuild.eclass in python_export_best() Michał Górny
2013-03-17 23:36 ` [gentoo-python] " Mike Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox