| 1 | # Copyright 1999-2004 Gentoo Foundation |
1 | # Copyright 1999-2004 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.33 2006/08/14 21:01:01 liquidx Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.34 2006/08/16 16:24:20 liquidx Exp $ |
| 4 | # |
4 | # |
| 5 | # Author: Jon Nelson <jnelson@gentoo.org> |
5 | # Author: Jon Nelson <jnelson@gentoo.org> |
| 6 | # Current Maintainer: Alastair Tse <liquidx@gentoo.org> |
6 | # Current Maintainer: Alastair Tse <liquidx@gentoo.org> |
| 7 | # |
7 | # |
| 8 | # The distutils eclass is designed to allow easier installation of |
8 | # The distutils eclass is designed to allow easier installation of |
| … | |
… | |
| 104 | } |
104 | } |
| 105 | |
105 | |
| 106 | # e.g. insinto ${ROOT}/usr/include/python${PYVER} |
106 | # e.g. insinto ${ROOT}/usr/include/python${PYVER} |
| 107 | |
107 | |
| 108 | distutils_python_version() { |
108 | distutils_python_version() { |
| 109 | local tmpstr="$(${python} -V 2>&1 )" |
109 | python_version |
| 110 | export PYVER_ALL="${tmpstr#Python }" |
|
|
| 111 | |
|
|
| 112 | export PYVER_MAJOR=$(echo ${PYVER_ALL} | cut -d. -f1) |
|
|
| 113 | export PYVER_MINOR=$(echo ${PYVER_ALL} | cut -d. -f2) |
|
|
| 114 | export PYVER_MICRO=$(echo ${PYVER_ALL} | cut -d. -f3-) |
|
|
| 115 | export PYVER="${PYVER_MAJOR}.${PYVER_MINOR}" |
|
|
| 116 | } |
110 | } |
| 117 | |
111 | |
| 118 | # checks for if tkinter support is compiled into python |
112 | # checks for if tkinter support is compiled into python |
| 119 | distutils_python_tkinter() { |
113 | distutils_python_tkinter() { |
| 120 | if ! python -c "import Tkinter" >/dev/null 2>&1; then |
114 | if ! python -c "import Tkinter" >/dev/null 2>&1; then |