Line
Link Here
|
0 |
-- python.eselect.orig |
0 |
++ python.eselect |
Lines 26-39
find_targets() {
Link Here
|
26 |
|
26 |
|
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 |
if [[ ! -L ${script} ]]; then |
30 |
#!/bin/sh |
30 |
ln -s ${EPREFIX}/usr/libexec/python-wrapper ${script} |
31 |
# Gentoo Python wrapper script |
31 |
fi |
32 |
|
32 |
echo "${target} > "${ENV_D_PATH}/python/config" |
33 |
[[ "\${EPYTHON}" =~ (/|^python\$) ]] && EPYTHON="${target}" |
|
|
34 |
"\${0%/*}/\${EPYTHON:-${target}}" "\$@" |
35 |
EOF |
36 |
chmod +x "${script}" |
37 |
} |
33 |
} |
38 |
|
34 |
|
39 |
set_python_config_script() { |
35 |
set_python_config_script() { |
Lines 138-145
describe_show() {
Link Here
|
138 |
} |
134 |
} |
139 |
|
135 |
|
140 |
do_show() { |
136 |
do_show() { |
141 |
active=$(canonicalise "${INTERPRETER_PATH}python") |
137 |
if [[ -f "${ENV_D_PATH}/python/config" ]]; then |
142 |
echo ${active#${INTERPRETER_PATH}} |
138 |
cat "${ENV_D_PATH}/python/config" |
|
|
139 |
fi |
143 |
} |
140 |
} |
144 |
|
141 |
|
145 |
### list action ### |
142 |
### list action ### |
Lines 215-221
do_update() {
Link Here
|
215 |
shift |
212 |
shift |
216 |
done |
213 |
done |
217 |
|
214 |
|
218 |
if [[ -L "${ROOT%/}/usr/bin/python" ]]; then |
215 |
if [[ -f "${ENV_D_PATH}/python/config" ]]; then |
219 |
${if_unset} && return |
216 |
${if_unset} && return |
220 |
fi |
217 |
fi |
221 |
|
218 |
|