summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAli Polatel <hawking@gentoo.org>2008-10-27 12:23:50 +0000
committerAli Polatel <hawking@gentoo.org>2008-10-27 12:23:50 +0000
commit7060e442939772c8a749adf8cfcb1092c7ac2dad (patch)
tree2c1bb3d0a3a3369c53afdda48ee6d290e0b87ec8 /eclass
parentversion bump (diff)
downloadgentoo-2-7060e442939772c8a749adf8cfcb1092c7ac2dad.tar.gz
gentoo-2-7060e442939772c8a749adf8cfcb1092c7ac2dad.tar.bz2
gentoo-2-7060e442939772c8a749adf8cfcb1092c7ac2dad.zip
Don't call python_version in python_{en,dis}able_pyc because they may be called in global scope.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/python.eclass18
1 files changed, 5 insertions, 13 deletions
diff --git a/eclass/python.eclass b/eclass/python.eclass
index 409c3548fab4..8197700bcab7 100644
--- a/eclass/python.eclass
+++ b/eclass/python.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.52 2008/10/27 00:17:28 hawking Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.53 2008/10/27 12:23:50 hawking Exp $
# @ECLASS: python.eclass
# @MAINTAINER:
@@ -68,12 +68,8 @@ python_version() {
# note: supported by >=dev-lang/python-2.2.3-r3 only.
#
python_disable_pyc() {
- python_version
- if [[ ${PYVER/./,} -ge 2,6 ]]; then
- export PYTHONDONTWRITEBYTECODE=1
- else
- export PYTHON_DONTCOMPILE=1
- fi
+ export PYTHONDONTWRITEBYTECODE=1 # For 2.6 and above
+ export PYTHON_DONTCOMPILE=1 # For 2.5 and below
}
# @FUNCTION: python_enable_pyc
@@ -81,12 +77,8 @@ python_disable_pyc() {
# Tells python to automatically recompile modules to .pyc/.pyo if the
# timestamps/version stamps change
python_enable_pyc() {
- python_version
- if [[ ${PYVER/./,} -ge 2,6 ]]; then
- unset PYTHONDONTWRITEBYTECODE
- else
- unset PYTHON_DONTCOMPILE
- fi
+ unset PYTHONDONTWRITEBYTECODE
+ unset PYTHON_DONTCOMPILE
}
python_disable_pyc