/[gentoo-x86]/eclass/distutils.eclass
Gentoo

Contents of /eclass/distutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Mon Apr 28 02:46:51 2003 UTC (11 years, 8 months ago) by vapier
Branch: MAIN
Changes since 1.10: +2 -2 lines
spell fixes

1 # Copyright 1999-2003 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /home/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.10 2003/04/04 01:38:10 liquidx Exp $
4 #
5 # Author: Jon Nelson <jnelson@gentoo.org>
6 #
7 # The distutils eclass is designed to allow easier installation of
8 # distutils-based python modules and their incorporation into
9 # the Gentoo Linux system.
10
11 ECLASS=distutils
12 INHERITED="$INHERITED $ECLASS"
13
14 EXPORT_FUNCTIONS src_compile src_install
15
16 # This helps make it possible to add extensions to python slots.
17 # Normally only a -py21- ebuild would set PYTHON_SLOT_VERSION.
18 if [ "${PYTHON_SLOT_VERSION}" = 2.1 ] ; then
19 newdepend "=dev-lang/python-2.1*"
20 python="python2.1"
21 else
22 newdepend "virtual/python"
23 python="python"
24 fi
25
26 distutils_src_compile() {
27 ${python} setup.py build ${@} || die "compilation failed"
28 }
29
30 distutils_src_install() {
31 ${python} setup.py install --root=${D} ${@} || die
32 dodoc CHANGELOG COPYRIGHT KNOWN_BUGS MAINTAINERS
33 dodoc CONTRIBUTORS LICENSE COPYING*
34 dodoc Change* MANIFEST* README* ${mydoc}
35 }
36
37 # e.g. insinto ${ROOT}/usr/include/python${PYVER}
38
39 distutils_python_version()
40 {
41 local tmpstr="$(${python} -V 2>&1 )"
42 tmpstr="${tmpstr#Python }"
43 tmpstr=${tmpstr%.*}
44
45 PYVER_MAJOR="${tmpstr%.[0-9]*}"
46 PYVER_MINOR="${tmpstr#[0-9]*.}"
47 PYVER="${PYVER_MAJOR}.${PYVER_MINOR}"
48 }

  ViewVC Help
Powered by ViewVC 1.1.20