public inbox for gentoo-python@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-python@lists.gentoo.org
Cc: python@gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-python] [PATCH python-r1] Move validity checks into _python_obtain_impls.
Date: Wed,  6 Mar 2013 15:31:34 +0100	[thread overview]
Message-ID: <1362580294-3336-1-git-send-email-mgorny@gentoo.org> (raw)

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



             reply	other threads:[~2013-03-06 14:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06 14:31 Michał Górny [this message]
2013-03-06 15:28 ` [gentoo-python] Re: [PATCH python-r1] Move validity checks into _python_obtain_impls Mike Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1362580294-3336-1-git-send-email-mgorny@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-python@lists.gentoo.org \
    --cc=python@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox