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

Contents of /eclass/distutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (hide annotations) (download)
Thu Mar 6 04:14:51 2003 UTC (11 years, 8 months ago) by vapier
Branch: MAIN
Changes since 1.7: +3 -3 lines
spelling fix #16940

1 vapier 1.5 # Copyright 1999-2003 Gentoo Technologies, Inc.
2 vapier 1.4 # Distributed under the terms of the GNU General Public License v2
3 vapier 1.8 # $Header: /home/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.7 2003/03/06 02:47:50 kutsuya Exp $
4 vapier 1.5 #
5 jnelson 1.1 # Author: Jon Nelson <jnelson@gentoo.org>
6 vapier 1.5 #
7 jnelson 1.1 # 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 kutsuya 1.6 # This helps make it possible to add extensions to python slots.
17     if [ "${PYTHON_SLOT_VERSION}" = 2.1 ] ; then
18     newdepend "virtual/python-2.1"
19     python="python2.1"
20     else
21 vapier 1.8 newdepend "virtual/python"
22 kutsuya 1.6 python="python"
23     fi
24 jnelson 1.1
25     distutils_src_compile() {
26 kutsuya 1.6 ${python} setup.py build || die "compilation failed"
27 jnelson 1.1 }
28    
29     distutils_src_install() {
30 kutsuya 1.6 ${python} setup.py install --root=${D} || die
31 jnelson 1.3 dodoc CHANGELOG COPYRIGHT KNOWN_BUGS MAINTAINERS
32 jnelson 1.1 dodoc CONTRIBUTORS LICENSE COPYING*
33     dodoc Change* MANIFEST* README* ${mydoc}
34     }
35 kutsuya 1.6
36     # e.g. insinto ${ROOT}/usr/include/python${PYVER}
37    
38     distutils_python_version()
39     {
40     local tmpstr="$(${python} -V 2>&1 )"
41 kutsuya 1.7 tmpstr="${tmpstr#Python }"
42     tmpstr=${tmpstr%.*}
43 kutsuya 1.6
44     PYVER_MAJOR="${tmpstr%.[0-9]*}"
45     PYVER_MINOR="${tmpstr#[0-9]*.}"
46     PYVER="${PYVER_MAJOR}.${PYVER_MINOR}"
47 vapier 1.8 }

  ViewVC Help
Powered by ViewVC 1.1.20