1 |
# $Id$ |
# $Id$ |
2 |
|
|
|
# needed for mbindir() |
|
|
sminclude mtools |
|
|
|
|
3 |
# get the major.minor current installed python version |
# get the major.minor current installed python version |
4 |
# -> ex 2.4 |
# -> ex 2.4 |
5 |
get_python_version() |
get_python_version() |
24 |
munpack ${SRCFILE} || die |
munpack ${SRCFILE} || die |
25 |
} |
} |
26 |
|
|
27 |
python_src_compile() |
python_docompile() |
28 |
{ |
{ |
|
cd ${SRCDIR} |
|
|
|
|
29 |
if [[ -e setup.py ]] |
if [[ -e setup.py ]] |
30 |
then |
then |
31 |
python setup.py build "$@" || die |
python setup.py build $@ || die |
32 |
elif [[ -e waf ]] |
elif [[ -e waf ]] |
33 |
then |
then |
34 |
python waf configure --prefix=/usr --libdir=/usr/$(mlibdir) "$@" || die |
python waf configure --prefix=/usr --libdir=/usr/$(mlibdir) $@ || die |
35 |
python waf build "$@" || die |
python waf build $@ || die |
36 |
elif [[ -e configure ]] |
elif [[ -e configure ]] |
37 |
then |
then |
38 |
mconfigure "$@" || die |
mconfigure $@ || die |
39 |
mmake || die |
mmake || die |
40 |
else |
else |
41 |
mmake || die |
mmake || die |
42 |
fi |
fi |
43 |
} |
} |
44 |
|
|
45 |
python_src_install() |
python_doinstall() |
46 |
{ |
{ |
|
cd ${SRCDIR} |
|
|
|
|
47 |
if [[ -e setup.py ]] |
if [[ -e setup.py ]] |
48 |
then |
then |
49 |
python setup.py install --no-compile --root $(mbindir) "$@" || die |
python setup.py install --no-compile --root ${BINDIR} $@ || die |
50 |
elif [[ -e waf ]] |
elif [[ -e waf ]] |
51 |
then |
then |
52 |
python waf install --destdir="$(mbindir)" "$@" || die |
python waf install --destdir=${BINDIR} $@ || die |
53 |
else |
else |
54 |
mmake DESTDIR=$(mbindir) install || die |
mmake DESTDIR=${BINDIR} install || die |
55 |
fi |
fi |
56 |
|
} |
57 |
|
|
58 |
|
python_src_compile() |
59 |
|
{ |
60 |
|
cd ${SRCDIR} |
61 |
|
python_docompile || die |
62 |
|
} |
63 |
|
|
64 |
|
python_src_install() |
65 |
|
{ |
66 |
|
cd ${SRCDIR} |
67 |
|
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 \ |