| 1 | # Copyright 1999-2009 Gentoo Foundation |
1 | # Copyright 1999-2009 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/python.eclass,v 1.58 2009/08/03 22:28:01 arfrever Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.59 2009/08/04 21:01:25 arfrever Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: python.eclass |
5 | # @ECLASS: python.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # python@gentoo.org |
7 | # python@gentoo.org |
| 8 | # |
8 | # |
| … | |
… | |
| 20 | else |
20 | else |
| 21 | PYTHON_ATOM="dev-lang/python" |
21 | PYTHON_ATOM="dev-lang/python" |
| 22 | fi |
22 | fi |
| 23 | |
23 | |
| 24 | if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then |
24 | if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then |
| 25 | DEPEND="${DEPEND} >=app-admin/eselect-python-20090801" |
25 | DEPEND="${DEPEND} >=app-admin/eselect-python-20090804" |
| 26 | fi |
26 | fi |
| 27 | |
27 | |
| 28 | __python_eclass_test() { |
28 | __python_eclass_test() { |
| 29 | __python_version_extract 2.3 |
29 | __python_version_extract 2.3 |
| 30 | echo -n "2.3 -> PYVER: $PYVER PYVER_MAJOR: $PYVER_MAJOR" |
30 | echo -n "2.3 -> PYVER: $PYVER PYVER_MAJOR: $PYVER_MAJOR" |
| … | |
… | |
| 110 | |
110 | |
| 111 | # @FUNCTION: validate_PYTHON_ABIS |
111 | # @FUNCTION: validate_PYTHON_ABIS |
| 112 | # @DESCRIPTION: |
112 | # @DESCRIPTION: |
| 113 | # Make sure PYTHON_ABIS variable has valid value. |
113 | # Make sure PYTHON_ABIS variable has valid value. |
| 114 | validate_PYTHON_ABIS() { |
114 | validate_PYTHON_ABIS() { |
| 115 | # Ensure that /usr/bin/python and /usr/bin/python-config are scripts. |
115 | # Ensure that /usr/bin/python and /usr/bin/python-config are valid. |
| 116 | if [[ "$(</usr/bin/python)" != *"Gentoo Python wrapper script"* ]]; then |
116 | if [[ "$(</usr/bin/python)" != *"Gentoo Python wrapper program"* ]]; then |
| 117 | die "/usr/bin/python isn't valid script" |
117 | die "/usr/bin/python isn't valid program" |
| 118 | fi |
118 | fi |
| 119 | if [[ "$(</usr/bin/python-config)" != *"Gentoo python-config wrapper script"* ]]; then |
119 | if [[ "$(</usr/bin/python-config)" != *"Gentoo python-config wrapper script"* ]]; then |
| 120 | die "/usr/bin/python-config isn't valid script" |
120 | die "/usr/bin/python-config isn't valid script" |
| 121 | fi |
121 | fi |
| 122 | |
122 | |