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 |
8 |
get_python_version() |
mget-python-version() |
9 |
{ |
{ |
10 |
local pyver |
local pyver |
11 |
# pyver="$(python -V 2>&1 | cut -d' ' -f2 | cut -d. -f1-2)" |
# pyver="$(python -V 2>&1 | cut -d' ' -f2 | cut -d. -f1-2)" |
15 |
return 0 |
return 0 |
16 |
} |
} |
17 |
|
|
18 |
get_python_libdir() |
mget-python-libdir() |
19 |
{ |
{ |
20 |
local pylib |
local pylib |
21 |
pylib=$(python -c 'from distutils import sysconfig; print sysconfig.get_python_lib()') |
pylib=$(python -c 'from distutils import sysconfig; print sysconfig.get_python_lib()') |
24 |
return 0 |
return 0 |
25 |
} |
} |
26 |
|
|
27 |
get_python_includedir() |
mget-python-includedir() |
28 |
{ |
{ |
29 |
local pyinc |
local pyinc |
30 |
pyinc=$(python -c 'from distutils import sysconfig; print sysconfig.get_python_inc()') |
pyinc=$(python -c 'from distutils import sysconfig; print sysconfig.get_python_inc()') |
33 |
return 0 |
return 0 |
34 |
} |
} |
35 |
|
|
36 |
|
# fallback functions to support old smage scripts, dropped in near future |
37 |
|
get_python_version() |
38 |
|
{ |
39 |
|
echo -e "${COLYELLOW}Warning: get_python_version() is depcrecated, please use mget-python-version() instead${COLDEFAULT}" >&2 |
40 |
|
mget-python-version |
41 |
|
} |
42 |
|
get_python_libdir() |
43 |
|
{ |
44 |
|
echo -e "${COLYELLOW}Warning: get_python_libdir() is depcrecated, please use mget-python-libdir() instead${COLDEFAULT}" >&2 |
45 |
|
mget-python-libdir |
46 |
|
} |
47 |
|
get_python_includedir() |
48 |
|
{ |
49 |
|
echo -e "${COLYELLOW}Warning: get_python_includedir() is depcrecated, please use mget-python-includedir() instead${COLDEFAULT}" >&2 |
50 |
|
mget-python-includedir |
51 |
|
} |
52 |
|
|
53 |
python_src_prepare() |
python_src_prepare() |
54 |
{ |
{ |
55 |
munpack ${SRCFILE} || die |
munpack ${SRCFILE} || die |
112 |
SRCDIR="${saved_SRCDIR}" |
SRCDIR="${saved_SRCDIR}" |
113 |
} |
} |
114 |
|
|
115 |
|
python_src_check() |
116 |
|
{ |
117 |
|
return 0 |
118 |
|
} |
119 |
|
|
120 |
python_src_install() |
python_src_install() |
121 |
{ |
{ |
122 |
cd ${SRCDIR} |
cd ${SRCDIR} |