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 | 5a7728cb7f38c7cf864796ac21d724948d4d7045 (patch) | |
tree | 230e373959620405db19cd913453a271e4e79209 /eclass/distutils.eclass | |
parent | gnugk requires version.h from openh323 (diff) | |
download | gentoo-2-5a7728cb7f38c7cf864796ac21d724948d4d7045.tar.gz gentoo-2-5a7728cb7f38c7cf864796ac21d724948d4d7045.tar.bz2 gentoo-2-5a7728cb7f38c7cf864796ac21d724948d4d7045.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 |