summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'python.eselect')
-rw-r--r--python.eselect21
1 files changed, 20 insertions, 1 deletions
diff --git a/python.eselect b/python.eselect
index e08b322..d3912b6 100644
--- a/python.eselect
+++ b/python.eselect
@@ -56,7 +56,7 @@ EOF
remove_symlinks() {
local symlink symlink_target symlink_target_found
if [[ "${SET_MAIN_ACTIVE_PYTHON_INTERPRETER}" == "1" ]]; then
- rm -f "${INTERPRETER_PATH}"{idle,pydoc,python,python-config} &>/dev/null || return 1
+ rm -f "${INTERPRETER_PATH}"{idle,pydoc,python,python-config,pythonw} &>/dev/null || return 1
rm -f "${MAN_PATH}"python.1{,.gz,.bz2,.lzma,.xz} &>/dev/null || return 1
fi
@@ -70,6 +70,9 @@ remove_symlinks() {
rm -f "${symlink}"
fi
done
+
+ # Files of Mac OS X framework
+ rm -f "${INTERPRETER_PATH%/bin/}/lib/Python.framework}"/{Headers,Python,Resources}
}
# Set a man page symlink
@@ -127,6 +130,22 @@ set_scripts_and_symlinks() {
if [[ -f "${target/python/2to3-}" ]]; then
ln -nfs "${target/python/2to3-}" 2to3
fi
+
+ # Wrapper for graphical applications on Mac OS X
+ if [[ -f "${target/python/pythonw}" ]] ; then
+ ln -nfs "${target/python/pythonw}" pythonw
+ fi
+
+ # Files of Mac OS X framework
+ local framework_dir="${INTERPRETER_PATH%/bin/}/lib/Python.framework"
+ if [[ -d "${framework_dir}" ]]; then
+ local version="${target#python}"
+ pushd "${framework_dir}" 1>/dev/null
+ ln -nfs "Versions/${version}/Headers"
+ ln -nfs "Versions/${version}/Python"
+ ln -nfs "Versions/${version}/Resources"
+ popd 1>/dev/null
+ fi
fi
popd 1>/dev/null