| 1 | # Copyright 1999-2003 Gentoo Technologies, Inc. |
1 | # Copyright 1999-2003 Gentoo Technologies, Inc. |
| 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.17 2003/10/09 15:11:24 liquidx Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.18 2003/10/09 15:37:57 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 |
| … | |
… | |
| 37 | distutils_src_compile() { |
37 | distutils_src_compile() { |
| 38 | ${python} setup.py build "$@" || die "compilation failed" |
38 | ${python} setup.py build "$@" || die "compilation failed" |
| 39 | } |
39 | } |
| 40 | |
40 | |
| 41 | distutils_src_install() { |
41 | distutils_src_install() { |
|
|
42 | if has_version ">=dev-lang/python-2.3"; then |
| 42 | ${python} setup.py install --root=${D} --no-compile "$@" || die |
43 | ${python} setup.py install --root=${D} --no-compile "$@" || die |
|
|
44 | else |
|
|
45 | ${python} setup.py install --root=${D} "$@" || die |
|
|
46 | fi |
| 43 | |
47 | |
| 44 | dodoc CHANGELOG COPYRIGHT KNOWN_BUGS MAINTAINERS PKG-INFO |
48 | dodoc CHANGELOG COPYRIGHT KNOWN_BUGS MAINTAINERS PKG-INFO |
| 45 | dodoc CONTRIBUTORS LICENSE COPYING* |
49 | dodoc CONTRIBUTORS LICENSE COPYING* |
| 46 | dodoc Change* MANIFEST* README* |
50 | dodoc Change* MANIFEST* README* |
| 47 | |
51 | |
| 48 | [ -n "${DOCS}" ] && dodoc ${DOCS} |
52 | [ -n "${DOCS}" ] && dodoc ${DOCS} |
| 49 | |
53 | |
| 50 | # deprecated! please use DOCS instead. |
54 | # deprecated! please use DOCS instead. |
| 51 | [ -n "${mydoc}" ] && dodoc ${mydoc} |
55 | [ -n "${mydoc}" ] && dodoc ${mydoc} |
| 52 | } |
|
|
| 53 | |
|
|
| 54 | distutils_pkg_postrm() { |
|
|
| 55 | python_mod_cleanup |
|
|
| 56 | } |
|
|
| 57 | |
|
|
| 58 | distutils_pkg_postinst() { |
|
|
| 59 | python_mod_optimize |
|
|
| 60 | } |
56 | } |
| 61 | |
57 | |
| 62 | # e.g. insinto ${ROOT}/usr/include/python${PYVER} |
58 | # e.g. insinto ${ROOT}/usr/include/python${PYVER} |
| 63 | |
59 | |
| 64 | distutils_python_version() { |
60 | distutils_python_version() { |
| … | |
… | |
| 80 | die "missing tkinter support with installed python" |
76 | die "missing tkinter support with installed python" |
| 81 | fi |
77 | fi |
| 82 | } |
78 | } |
| 83 | |
79 | |
| 84 | |
80 | |
| 85 | EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm |
81 | EXPORT_FUNCTIONS src_compile src_install |
| 86 | |
82 | |