1 |
# $Header: /magellan-cvs/smage/include/python.sminc,v 1.4 2007/01/23 20:46:41 niro Exp $ |
# $Id$ |
2 |
|
|
3 |
|
# needed for mbindir() |
4 |
|
sminclude mtools |
5 |
|
|
6 |
# get the major.minor current installed python version |
# get the major.minor current installed python version |
7 |
# -> ex 2.4 |
# -> ex 2.4 |
17 |
get_python_libdir() |
get_python_libdir() |
18 |
{ |
{ |
19 |
local pylib |
local pylib |
20 |
pylib=$(python -c 'from distutils import sysconfig; print sysconfig.get_python_version()') |
pylib=$(python -c 'from distutils import sysconfig; print sysconfig.get_python_lib()') |
21 |
echo "${pylib}" |
echo "${pylib}" |
22 |
return 0 |
return 0 |
23 |
} |
} |
30 |
python_src_compile() |
python_src_compile() |
31 |
{ |
{ |
32 |
cd ${SRCDIR} |
cd ${SRCDIR} |
33 |
python setup.py build "$@" || die |
|
34 |
|
if [[ -e setup.py ]] |
35 |
|
then |
36 |
|
python setup.py build "$@" || die |
37 |
|
elif [[ -e waf ]] |
38 |
|
then |
39 |
|
python waf configure --prefix=/usr --libdir=/usr/$(mlibdir) "$@" || die |
40 |
|
python waf build "$@" || die |
41 |
|
elif [[ -e configure ]] |
42 |
|
then |
43 |
|
mconfigure "$@" || die |
44 |
|
mmake || die |
45 |
|
else |
46 |
|
mmake || die |
47 |
|
fi |
48 |
} |
} |
49 |
|
|
50 |
python_src_install() |
python_src_install() |
51 |
{ |
{ |
52 |
cd ${SRCDIR} |
cd ${SRCDIR} |
53 |
python setup.py install --no-compile --root ${BINDIR} "$@" || die |
|
54 |
|
if [[ -e setup.py ]] |
55 |
|
then |
56 |
|
python setup.py install --no-compile --root $(mbindir) "$@" || die |
57 |
|
elif [[ -e waf ]] |
58 |
|
then |
59 |
|
python waf install --destdir="$(mbindir)" "$@" || die |
60 |
|
else |
61 |
|
mmake DESTDIR=$(mbindir) install || die |
62 |
|
fi |
63 |
|
|
64 |
local i |
local i |
65 |
for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ |
for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ |