diff options
author | Alastair Tse <liquidx@gentoo.org> | 2003-09-09 17:18:27 +0000 |
---|---|---|
committer | Alastair Tse <liquidx@gentoo.org> | 2003-09-09 17:18:27 +0000 |
commit | 35f93ee8f9277cb3736528aab65939b36a57f8e0 (patch) | |
tree | 4508422707178eb55e1194745bde6329f5d441af /eclass/distutils.eclass | |
parent | gnugk requires version.h from openh323 (diff) | |
download | historical-35f93ee8f9277cb3736528aab65939b36a57f8e0.tar.gz historical-35f93ee8f9277cb3736528aab65939b36a57f8e0.tar.bz2 historical-35f93ee8f9277cb3736528aab65939b36a57f8e0.zip |
fix python_version() to work correctly for 2.3
Diffstat (limited to 'eclass/distutils.eclass')
-rw-r--r-- | eclass/distutils.eclass | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/eclass/distutils.eclass b/eclass/distutils.eclass index d4591999e997..a2b37914719a 100644 --- a/eclass/distutils.eclass +++ b/eclass/distutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.12 2003/05/10 18:29:16 liquidx Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.13 2003/09/09 17:18:27 liquidx Exp $ # # Author: Jon Nelson <jnelson@gentoo.org> # Current Maintainer: Alastair Tse <liquidx@gentoo.org> @@ -51,14 +51,13 @@ distutils_src_install() { # e.g. insinto ${ROOT}/usr/include/python${PYVER} -distutils_python_version() -{ +distutils_python_version() { local tmpstr="$(${python} -V 2>&1 )" - tmpstr="${tmpstr#Python }" - tmpstr=${tmpstr%.*} + export PYVER_ALL="${tmpstr#Python }" - export PYVER_MAJOR="${tmpstr%.[0-9]*}" - export PYVER_MINOR="${tmpstr#[0-9]*.}" + export PYVER_MAJOR=$(echo ${PYVER_ALL} | cut -d. -f1) + export PYVER_MINOR=$(echo ${PYVER_ALL} | cut -d. -f2) + export PYVER_MICRO=$(echo ${PYVER_ALL} | cut -d. -f3-) export PYVER="${PYVER_MAJOR}.${PYVER_MINOR}" } @@ -72,6 +71,8 @@ distutils_python_tkinter() { fi } +# export PYVER as well +distutils_python_version EXPORT_FUNCTIONS src_compile src_install |