Magellan Linux

Diff of /trunk/include/python.sminc

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

trunk/core/include/python.sminc revision 2 by niro, Fri Oct 10 13:29:42 2008 UTC branches/magellan-next/include/python.sminc revision 8645 by niro, Wed Jul 27 11:23:46 2011 UTC
# Line 1  Line 1 
1  # $Header: /magellan-cvs/smage/include/python.sminc,v 1.4 2007/01/23 20:46:41 niro Exp $  # $Id$
2    
3  # get the major.minor current installed python version  # get the major.minor current installed python version
4  # -> ex 2.4  # -> ex 2.4
# Line 14  get_python_version() Line 14  get_python_version()
14  get_python_libdir()  get_python_libdir()
15  {  {
16   local pylib   local pylib
17   pylib=$(python -c 'from distutils import sysconfig; print sysconfig.get_python_version()')   pylib=$(python -c 'from distutils import sysconfig; print sysconfig.get_python_lib()')
18   echo "${pylib}"   echo "${pylib}"
19   return 0   return 0
20  }  }
# Line 24  python_src_prepare() Line 24  python_src_prepare()
24   munpack ${SRCFILE} || die   munpack ${SRCFILE} || die
25  }  }
26    
27    python_docompile()
28    {
29     if [[ -e setup.py ]]
30     then
31     python setup.py build $@ || die
32     elif [[ -e waf ]]
33     then
34     python waf configure --prefix=/usr --libdir=/usr/$(mlibdir) $@ || die
35     python waf build $@ || die
36     elif [[ -e configure ]]
37     then
38     mconfigure $@ || die
39     mmake || die
40     else
41     mmake || die
42     fi
43    }
44    
45    python_doinstall()
46    {
47     if [[ -e setup.py ]]
48     then
49     python setup.py install --no-compile --root ${BINDIR} $@ || die
50     elif [[ -e waf ]]
51     then
52     python waf install --destdir=${BINDIR} $@ || die
53     else
54     mmake DESTDIR=${BINDIR} install || die
55     fi
56    }
57    
58  python_src_compile()  python_src_compile()
59  {  {
60   cd ${SRCDIR}   cd ${SRCDIR}
61   python setup.py build "$@" || die   python_docompile || die
62  }  }
63    
64  python_src_install()  python_src_install()
65  {  {
66   cd ${SRCDIR}   cd ${SRCDIR}
67   python setup.py install --no-compile --root ${BINDIR} "$@" || die   python_doinstall || die
68    
69   local i   local i
70   for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \   for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \

Legend:
Removed from v.2  
changed lines
  Added in v.8645