diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2010-03-21 21:36:50 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2010-03-21 21:36:50 +0000 |
commit | 164a209012335ebf97157256f349e58960e49420 (patch) | |
tree | 6ce91bb88444715ba579992efc1c246441d4f136 | |
parent | Use EROOT instead of ROOT. (diff) | |
download | eselect-python-164a209012335ebf97157256f349e58960e49420.tar.gz eselect-python-164a209012335ebf97157256f349e58960e49420.tar.bz2 eselect-python-164a209012335ebf97157256f349e58960e49420.zip |
Handle files specific to Mac OS X (bug #310551).
-rw-r--r-- | python.eselect | 21 |
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 |