FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 09-19-2012, 10:00 AM
Michał Górny
 
Default Temporarily remove PYTHON_OPTIONAL -- it is mis-designed.

Let's remove it quickly before someone starts relying on it. Hopefully,
noone outside the tree started to do that -- assumption based
on the fact that it is very unlikely for a package to want optional
distutils.
---
gx86/eclass/python-distutils-ng.eclass | 32 +++-----------------------------
1 file changed, 3 insertions(+), 29 deletions(-)

diff --git a/gx86/eclass/python-distutils-ng.eclass b/gx86/eclass/python-distutils-ng.eclass
index f4c957c..8427994 100644
--- a/gx86/eclass/python-distutils-ng.eclass
+++ b/gx86/eclass/python-distutils-ng.eclass
@@ -41,12 +41,6 @@ if [[ -z "${PYTHON_COMPAT}" ]]; then
PYTHON_COMPAT+=" pypy1_8 pypy1_9"
fi

-# @ECLASS-VARIABLE: PYTHON_OPTIONAL
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Set the value to "yes" to make the dependency on a Python interpreter
-# optional.
-
# @ECLASS-VARIABLE: PYTHON_DISABLE_COMPILATION
# @DEFAULT_UNSET
# @DESCRIPTION:
@@ -98,12 +92,7 @@ for impl in ${PYTHON_COMPAT}; do
required_use_str+=" python_targets_${impl}"
done
required_use_str=" || ( ${required_use_str} )"
-if [[ "${PYTHON_OPTIONAL}" = "yes" ]]; then
- IUSE+=" python"
- REQUIRED_USE+=" python? ( ${required_use_str} )"
-else
- REQUIRED_USE+=" ${required_use_str}"
-fi
+REQUIRED_USE+=" ${required_use_str}"
unset required_use_str

for impl in ${PYTHON_COMPAT}; do
@@ -121,13 +110,8 @@ for impl in ${PYTHON_COMPAT}; do
esac
dep_str="python_targets_${impl}? ( ${dep_str} )"

- if [[ "${PYTHON_OPTIONAL}" = "yes" ]]; then
- RDEPEND="${RDEPEND} python? ( ${dep_str} )"
- DEPEND="${DEPEND} python? ( ${dep_str} )"
- else
- RDEPEND="${RDEPEND} ${dep_str}"
- DEPEND="${DEPEND} ${dep_str}"
- fi
+ RDEPEND="${RDEPEND} ${dep_str}"
+ DEPEND="${DEPEND} ${dep_str}"
unset dep_str
done

@@ -304,8 +288,6 @@ python-distutils-ng_newscript() {

# Phase function: src_prepare
python-distutils-ng_src_prepare() {
- [[ "${PYTHON_OPTIONAL}" = "yes" ]] && { use python || return; }
-
# Try to run binary for each implementation:
for impl in ${PYTHON_COMPAT}; do
use "python_targets_${impl}" ${PYTHON_COMPAT} || continue
@@ -336,8 +318,6 @@ python-distutils-ng_src_prepare() {

# Phase function: src_configure
python-distutils-ng_src_configure() {
- [[ "${PYTHON_OPTIONAL}" = "yes" ]] && { use python || return; }
-
if type python_configure &> /dev/null; then
_python-distutils-ng_run_for_each_impl python_configure
fi
@@ -345,8 +325,6 @@ python-distutils-ng_src_configure() {

# Phase function: src_compile
python-distutils-ng_src_compile() {
- [[ "${PYTHON_OPTIONAL}" = "yes" ]] && { use python || return; }
-
if type python_compile &> /dev/null; then
_python-distutils-ng_run_for_each_impl python_compile
else
@@ -357,8 +335,6 @@ python-distutils-ng_src_compile() {

# Phase function: src_test
python-distutils-ng_src_test() {
- [[ "${PYTHON_OPTIONAL}" = "yes" ]] && { use python || return; }
-
if type python_test &> /dev/null; then
_python-distutils-ng_run_for_each_impl python_test
fi
@@ -366,8 +342,6 @@ python-distutils-ng_src_test() {

# Phase function: src_install
python-distutils-ng_src_install() {
- [[ "${PYTHON_OPTIONAL}" = "yes" ]] && { use python || return; }
-
if type python_install &> /dev/null; then
_python-distutils-ng_run_for_each_impl python_install
else
--
1.7.12
 

Thread Tools




All times are GMT. The time now is 10:34 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org