Line
Link Here
|
0 |
-- python.eselect-20090801 |
0 |
++ python.eselect-20090801 |
Lines 27-36
Link Here
|
27 |
set_python_script() { |
27 |
set_python_script() { |
28 |
local script="${INTERPRETER_PATH}${1}" target="${2}" |
28 |
local script="${INTERPRETER_PATH}${1}" target="${2}" |
29 |
cat << EOF > "${script}" |
29 |
cat << EOF > "${script}" |
30 |
#!/bin/bash |
30 |
#!/bin/sh |
31 |
# Gentoo Python wrapper script |
31 |
# Gentoo Python wrapper script |
32 |
|
32 |
|
33 |
[[ "\${EPYTHON}" =~ (/|^python\$) ]] && EPYTHON="${target}" |
33 |
case "\${EPYTHON}" in |
|
|
34 |
*/*|python) EPYTHON="${target}";; |
35 |
esac |
34 |
"\${0%/*}/\${EPYTHON:-${target}}" "\$@" |
36 |
"\${0%/*}/\${EPYTHON:-${target}}" "\$@" |
35 |
EOF |
37 |
EOF |
36 |
chmod +x "${script}" |
38 |
chmod +x "${script}" |
Lines 39-50
Link Here
|
39 |
set_python_config_script() { |
41 |
set_python_config_script() { |
40 |
local script="${INTERPRETER_PATH}${1}" target="${2}" |
42 |
local script="${INTERPRETER_PATH}${1}" target="${2}" |
41 |
cat << EOF > "${script}" |
43 |
cat << EOF > "${script}" |
42 |
#!/bin/bash |
44 |
#!/bin/sh |
43 |
# Gentoo python-config wrapper script |
45 |
# Gentoo python-config wrapper script |
44 |
|
46 |
|
45 |
[[ "\${EPYTHON}" =~ (/|^python\$) ]] && EPYTHON="${target/-config-/}" |
47 |
case "\${EPYTHON}" in |
46 |
python_config="\${EPYTHON/python/python-config-}" |
48 |
*/*|python) EPYTHON="${target/-config-/}";; |
47 |
"\${0%/*}/\${python_config:-${target}}" "\$@" |
49 |
esac |
|
|
50 |
: \${python_config:=${target}} |
51 |
case "\${EPYTHON}" in *python*) |
52 |
python_config="\${EPYTHON%%python*}python-config-\${EPYTHON#*python}";; |
53 |
esac |
54 |
"\${0%/*}/\${python_config}" "\$@" |
48 |
EOF |
55 |
EOF |
49 |
chmod +x "${script}" |
56 |
chmod +x "${script}" |
50 |
} |
57 |
} |