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

Diff of /eclass/distutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.20