public inbox for gentoo-python@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-python] [PATCH python-r1] Move validity checks into _python_obtain_impls.
@ 2013-03-06 14:31 Michał Górny
  2013-03-06 15:28 ` [gentoo-python] " Mike Gilbert
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2013-03-06 14:31 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

That is, _python_check_USE_PYTHON and _python_validate_useflags. Those
are always used along with per-implementation tasks, so better to have
them in _python_obtain_impls than call three functions every time.

Also, remove redundant invocation.

Note: rebased on multibuild_copy_sources() patch branch.
---
 gx86/eclass/python-r1.eclass | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/gx86/eclass/python-r1.eclass b/gx86/eclass/python-r1.eclass
index 36b20dc..9e625f5 100644
--- a/gx86/eclass/python-r1.eclass
+++ b/gx86/eclass/python-r1.eclass
@@ -357,9 +357,6 @@ python_gen_cond_dep() {
 python_copy_sources() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	_python_validate_useflags
-	_python_check_USE_PYTHON
-
 	local MULTIBUILD_VARIANTS
 	_python_obtain_impls
 
@@ -579,6 +576,9 @@ _python_check_USE_PYTHON() {
 # @DESCRIPTION:
 # Set up the enabled implementation list.
 _python_obtain_impls() {
+	_python_validate_useflags
+	_python_check_USE_PYTHON
+
 	MULTIBUILD_VARIANTS=()
 
 	for impl in "${_PYTHON_ALL_IMPLS[@]}"; do
@@ -621,9 +621,6 @@ _python_multibuild_wrapper() {
 python_foreach_impl() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	_python_validate_useflags
-	_python_check_USE_PYTHON
-
 	local MULTIBUILD_VARIANTS
 	_python_obtain_impls
 
@@ -695,8 +692,6 @@ python_export_best() {
 python_replicate_script() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	_python_validate_useflags
-
 	local suffixes=()
 
 	_add_suffix() {
-- 
1.8.1.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-06 15:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-06 14:31 [gentoo-python] [PATCH python-r1] Move validity checks into _python_obtain_impls Michał Górny
2013-03-06 15:28 ` [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