From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- dev-lang/python-exec/Manifest | 6 ++ dev-lang/python-exec/metadata.xml | 17 ++++ dev-lang/python-exec/python-exec-2.4.5.ebuild | 134 ++++++++++++++++++++++++ dev-lang/python-exec/python-exec-2.4.6.ebuild | 134 ++++++++++++++++++++++++ dev-lang/python-exec/python-exec-9999.ebuild | 140 ++++++++++++++++++++++++++ 5 files changed, 431 insertions(+) create mode 100644 dev-lang/python-exec/Manifest create mode 100644 dev-lang/python-exec/metadata.xml create mode 100644 dev-lang/python-exec/python-exec-2.4.5.ebuild create mode 100644 dev-lang/python-exec/python-exec-2.4.6.ebuild create mode 100644 dev-lang/python-exec/python-exec-9999.ebuild (limited to 'dev-lang/python-exec') diff --git a/dev-lang/python-exec/Manifest b/dev-lang/python-exec/Manifest new file mode 100644 index 000000000000..78d815ad7521 --- /dev/null +++ b/dev-lang/python-exec/Manifest @@ -0,0 +1,6 @@ +DIST python-exec-2.4.5.tar.bz2 87137 BLAKE2B 2434bee0bcc64a78a83254d6b6f733ef0748d8209ff70654fc57ac50563d4f32be64705a3c56eefef4e173a238b272d00bef4929982a729a097b82a3a2b0b5b1 SHA512 8c1a520c565afa775cad0e8b88248b688814664e588f683fc2b2c039ee0494b168ebd3cd1042b8b7fe2583f287cf55b22ea0585bfb43efe2f8450d809cde0b21 +DIST python-exec-2.4.6.tar.bz2 87634 BLAKE2B 7b6de8ad0e0603fafd3284e6e3c5247ad83f145ab4db6728914318ae8e6f5aaa3c0247f4e01238fca11519ef72fb1b11436aea7e2b8c988b8717b3f6a2a43c37 SHA512 e05eaf01b83de196a10933636ab6b1a5489a421592df49b8b58eabd0e732de970f902744cd3a06b5ab530a6d69fe6dfa8f270fbb09b9fe3df4ae04d516828050 +EBUILD python-exec-2.4.5.ebuild 4443 BLAKE2B efcc545a46738ceb03dfd048d6ab70ac79e18d323c9df32ff61d49c183bf1df80eaa18af1a658397a24a267931684d1cfc4e60c005ee8da58421a30d52bf26a8 SHA512 9f1e31df119cea502e730174233c78e54a7362947f36b6f65302e00d7d8c1ea2504e0196933766daf18ee4fbb7b4621cd82075ce8fe46619f62c8c870ca9b77d +EBUILD python-exec-2.4.6.ebuild 4463 BLAKE2B fcbebf862dd4a3ed81abbada163d7b708aede498120d0efb2cc16c33709694b8c21305dbc5d5f175e4ead0a89b4fdf441b2a0ea30660cb17a4e8e9c24ff1e83f SHA512 adf86449457fe0198ea834f736a708949aab5b8641878f08ef4b21c35aa3fc644650083f641e4343a3b70cf5bdb0e62f0694f2a8b19521617f2defa6de042352 +EBUILD python-exec-9999.ebuild 4241 BLAKE2B d618a42a797acf150300971ce8c91fdb695360986e3cf8bb557ad426d5473644cd02cc1116ea8a6b61c11e82ecedd5999f4c967c97cf512592213d6f56a1bf78 SHA512 02efc08d67020e0d8529c92d1466a842381c047a7a44ffa7aedebd0d4bd21e6985ff64958839422456ee8ffbb5e8e73d9e5019ccee209ef94abe99cbbca84a57 +MISC metadata.xml 589 BLAKE2B 7f9fa9750915db8b546b52a560a7fd8d9a63c4f310e423ebdc0508fe9b14363001b30f3c3db26f6d05eec8a44176d62a9335153dff2d55a41a31d3b428cc9ca6 SHA512 2ac0223af0a2cf95d2b18ef415eadb325af0094e4ec361a414b0d68b203dc1c937d3d680af96bdad1e8a48cb5786683bdbbd451f47a0f3a777c075e1690ccf7a diff --git a/dev-lang/python-exec/metadata.xml b/dev-lang/python-exec/metadata.xml new file mode 100644 index 000000000000..ef39a52d06f8 --- /dev/null +++ b/dev-lang/python-exec/metadata.xml @@ -0,0 +1,17 @@ + + + + + python@gentoo.org + Python + + + + mgorny@gentoo.org + Michał Górny + + https://github.com/mgorny/python-exec/issues/ + mgorny/python-exec + mgorny/python-exec + + diff --git a/dev-lang/python-exec/python-exec-2.4.5.ebuild b/dev-lang/python-exec/python-exec-2.4.5.ebuild new file mode 100644 index 000000000000..e39dc14b22b5 --- /dev/null +++ b/dev-lang/python-exec/python-exec-2.4.5.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +# Kids, don't do this at home! +inherit python-utils-r1 +PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" ) + +# Inherited purely to have PYTHON_TARGET flags which will satisfy USE +# dependencies and trigger necessary rebuilds. +inherit python-r1 + +DESCRIPTION="Python script wrapper" +HOMEPAGE="https://github.com/mgorny/python-exec/" +SRC_URI="https://github.com/mgorny/${PN}/releases/download/${P}/${P}.tar.bz2" + +LICENSE="BSD-2" +SLOT="2" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +# eselect-python because of /usr/bin/python* collisions and new config +# python versions because of missing $scriptdir/python* symlinks +RDEPEND=" + ! "${T}"/python-exec.conf || die + insinto /etc/python-exec + doins "${T}"/python-exec.conf + + local f + for f in python{,2,3}; do + # symlink the C wrapper for python to avoid shebang recursion + # bug #568974 + dosym python-exec2c /usr/bin/"${f}" + done + for f in python{,2,3}-config 2to3 idle pydoc pyvenv; do + # those are python scripts (except for new python-configs) + # so symlink them via the python wrapper + dosym ../lib/python-exec/python-exec2 /usr/bin/"${f}" + done +} + +pkg_preinst() { + if [[ -e ${EROOT}etc/python-exec/python-exec.conf ]]; then + # preserve current configuration + cp "${EROOT}"etc/python-exec/python-exec.conf \ + "${ED}"etc/python-exec/python-exec.conf || die + else + # preserve previous Python version preference + local py old_pythons=() + local config_base=${EROOT}etc/env.d/python + + # start with the 'global' preference (2 vs 3) + if [[ -f ${config_base}/config ]]; then + old_pythons+=( "$(<${config_base}/config)" ) + fi + + # then try specific py3 selection + for py in 3; do + local target= + + if [[ -f ${config_base}/python${py} ]]; then + # try the newer config files + target=$(<${config_base}/python${py}) + elif [[ -L ${EROOT}/usr/bin/python${py} ]]; then + # check the older symlink format + target=$(readlink "${EROOT}/usr/bin/python${py}") + + # check if it's actually old eselect symlink + [[ ${target} == python?.? ]] || target= + fi + + # add the extra target if found and != global + if [[ ${target} && ${old_pythons[0]} != ${target} ]]; then + old_pythons+=( "${target}" ) + fi + done + + if [[ ${old_pythons[@]} ]]; then + elog "You seem to have just upgraded into the new version of python-exec" + elog "that uses python-exec.conf for configuration. The ebuild has attempted" + elog "to convert your previous configuration to the new format, resulting" + elog "in the following preferences (most preferred version first):" + elog + for py in "${old_pythons[@]}"; do + elog " ${py}" + done + elog + elog "Those interpreters will be preferred when running Python scripts or" + elog "calling wrapped Python executables (python, python2, pydoc...)." + elog "If none of the preferred interpreters are supported, python-exec will" + elog "fall back to the newest supported Python version." + elog + elog "Please note that due to the ambiguous character of the old settings," + elog "you may want to modify the preference list yourself. In order to do so," + elog "open the following file in your favorite editor:" + elog + elog " ${EROOT}etc/python-exec/python-exec.conf" + elog + elog "For more information on the new configuration format, please read" + elog "the comment on top of the installed configuration file." + + local IFS=$'\n' + echo "${old_pythons[*]}" \ + >> "${ED}"etc/python-exec/python-exec.conf || die + fi + fi +} diff --git a/dev-lang/python-exec/python-exec-2.4.6.ebuild b/dev-lang/python-exec/python-exec-2.4.6.ebuild new file mode 100644 index 000000000000..9ed5ee58b776 --- /dev/null +++ b/dev-lang/python-exec/python-exec-2.4.6.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +# Kids, don't do this at home! +inherit python-utils-r1 +PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" ) + +# Inherited purely to have PYTHON_TARGET flags which will satisfy USE +# dependencies and trigger necessary rebuilds. +inherit python-r1 + +DESCRIPTION="Python script wrapper" +HOMEPAGE="https://github.com/mgorny/python-exec/" +SRC_URI="https://github.com/mgorny/python-exec/releases/download/v${PV}/${P}.tar.bz2" + +LICENSE="BSD-2" +SLOT="2" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +# eselect-python because of /usr/bin/python* collisions and new config +# python versions because of missing $scriptdir/python* symlinks +RDEPEND=" + ! "${T}"/python-exec.conf || die + insinto /etc/python-exec + doins "${T}"/python-exec.conf + + local f + for f in python{,2,3}; do + # symlink the C wrapper for python to avoid shebang recursion + # bug #568974 + dosym python-exec2c /usr/bin/"${f}" + done + for f in python{,2,3}-config 2to3 idle pydoc pyvenv; do + # those are python scripts (except for new python-configs) + # so symlink them via the python wrapper + dosym ../lib/python-exec/python-exec2 /usr/bin/"${f}" + done +} + +pkg_preinst() { + if [[ -e ${EROOT}etc/python-exec/python-exec.conf ]]; then + # preserve current configuration + cp "${EROOT}"etc/python-exec/python-exec.conf \ + "${ED}"etc/python-exec/python-exec.conf || die + else + # preserve previous Python version preference + local py old_pythons=() + local config_base=${EROOT}etc/env.d/python + + # start with the 'global' preference (2 vs 3) + if [[ -f ${config_base}/config ]]; then + old_pythons+=( "$(<${config_base}/config)" ) + fi + + # then try specific py3 selection + for py in 3; do + local target= + + if [[ -f ${config_base}/python${py} ]]; then + # try the newer config files + target=$(<${config_base}/python${py}) + elif [[ -L ${EROOT}/usr/bin/python${py} ]]; then + # check the older symlink format + target=$(readlink "${EROOT}/usr/bin/python${py}") + + # check if it's actually old eselect symlink + [[ ${target} == python?.? ]] || target= + fi + + # add the extra target if found and != global + if [[ ${target} && ${old_pythons[0]} != ${target} ]]; then + old_pythons+=( "${target}" ) + fi + done + + if [[ ${old_pythons[@]} ]]; then + elog "You seem to have just upgraded into the new version of python-exec" + elog "that uses python-exec.conf for configuration. The ebuild has attempted" + elog "to convert your previous configuration to the new format, resulting" + elog "in the following preferences (most preferred version first):" + elog + for py in "${old_pythons[@]}"; do + elog " ${py}" + done + elog + elog "Those interpreters will be preferred when running Python scripts or" + elog "calling wrapped Python executables (python, python2, pydoc...)." + elog "If none of the preferred interpreters are supported, python-exec will" + elog "fall back to the newest supported Python version." + elog + elog "Please note that due to the ambiguous character of the old settings," + elog "you may want to modify the preference list yourself. In order to do so," + elog "open the following file in your favorite editor:" + elog + elog " ${EROOT}etc/python-exec/python-exec.conf" + elog + elog "For more information on the new configuration format, please read" + elog "the comment on top of the installed configuration file." + + local IFS=$'\n' + echo "${old_pythons[*]}" \ + >> "${ED}"etc/python-exec/python-exec.conf || die + fi + fi +} diff --git a/dev-lang/python-exec/python-exec-9999.ebuild b/dev-lang/python-exec/python-exec-9999.ebuild new file mode 100644 index 000000000000..6fc81aeeefa9 --- /dev/null +++ b/dev-lang/python-exec/python-exec-9999.ebuild @@ -0,0 +1,140 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +# Kids, don't do this at home! +inherit python-utils-r1 +PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" ) + +# Inherited purely to have PYTHON_TARGET flags which will satisfy USE +# dependencies and trigger necessary rebuilds. +inherit autotools git-r3 python-r1 + +DESCRIPTION="Python script wrapper" +HOMEPAGE="https://github.com/mgorny/python-exec/" +SRC_URI="" +EGIT_REPO_URI="https://github.com/mgorny/python-exec.git" + +LICENSE="BSD-2" +SLOT="2" +KEYWORDS="" +IUSE="" + +# eselect-python because of /usr/bin/python* collisions and new config +# python versions because of missing $scriptdir/python* symlinks +RDEPEND=" + ! "${T}"/python-exec.conf || die + insinto /etc/python-exec + doins "${T}"/python-exec.conf + + local f + for f in python{,2,3}; do + # symlink the C wrapper for python to avoid shebang recursion + # bug #568974 + dosym python-exec2c /usr/bin/"${f}" + done + for f in python{,2,3}-config 2to3 idle pydoc pyvenv; do + # those are python scripts (except for new python-configs) + # so symlink them via the python wrapper + dosym ../lib/python-exec/python-exec2 /usr/bin/"${f}" + done +} + +pkg_preinst() { + if [[ -e ${EROOT}etc/python-exec/python-exec.conf ]]; then + # preserve current configuration + cp "${EROOT}"etc/python-exec/python-exec.conf \ + "${ED}"etc/python-exec/python-exec.conf || die + else + # preserve previous Python version preference + local py old_pythons=() + local config_base=${EROOT}etc/env.d/python + + # start with the 'global' preference (2 vs 3) + if [[ -f ${config_base}/config ]]; then + old_pythons+=( "$(<${config_base}/config)" ) + fi + + # then try specific py3 selection + for py in 3; do + local target= + + if [[ -f ${config_base}/python${py} ]]; then + # try the newer config files + target=$(<${config_base}/python${py}) + elif [[ -L ${EROOT}/usr/bin/python${py} ]]; then + # check the older symlink format + target=$(readlink "${EROOT}/usr/bin/python${py}") + + # check if it's actually old eselect symlink + [[ ${target} == python?.? ]] || target= + fi + + # add the extra target if found and != global + if [[ ${target} && ${old_pythons[0]} != ${target} ]]; then + old_pythons+=( "${target}" ) + fi + done + + if [[ ${old_pythons[@]} ]]; then + elog "You seem to have just upgraded into the new version of python-exec" + elog "that uses python-exec.conf for configuration. The ebuild has attempted" + elog "to convert your previous configuration to the new format, resulting" + elog "in the following preferences (most preferred version first):" + elog + for py in "${old_pythons[@]}"; do + elog " ${py}" + done + elog + elog "Those interpreters will be preferred when running Python scripts or" + elog "calling wrapped Python executables (python, python2, pydoc...)." + elog "If none of the preferred interpreters are supported, python-exec will" + elog "fall back to the newest supported Python version." + elog + elog "Please note that due to the ambiguous character of the old settings," + elog "you may want to modify the preference list yourself. In order to do so," + elog "open the following file in your favorite editor:" + elog + elog " ${EROOT}etc/python-exec/python-exec.conf" + elog + elog "For more information on the new configuration format, please read" + elog "the comment on top of the installed configuration file." + + local IFS=$'\n' + echo "${old_pythons[*]}" \ + >> "${ED}"etc/python-exec/python-exec.conf || die + fi + fi +} -- cgit v1.2.3