From 6abbf81ef2f298e3221ff5e67a1f3c5f23958212 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 14 Dec 2020 13:26:14 +0000 Subject: gentoo resync : 14.12.2020 --- dev-lang/python-exec/Manifest | 6 +- dev-lang/python-exec/metadata.xml | 7 ++ dev-lang/python-exec/python-exec-2.4.6-r1.ebuild | 137 ----------------------- dev-lang/python-exec/python-exec-2.4.6-r2.ebuild | 2 +- dev-lang/python-exec/python-exec-2.4.6-r3.ebuild | 128 +++++++++++++++++++++ 5 files changed, 139 insertions(+), 141 deletions(-) delete mode 100644 dev-lang/python-exec/python-exec-2.4.6-r1.ebuild create mode 100644 dev-lang/python-exec/python-exec-2.4.6-r3.ebuild (limited to 'dev-lang/python-exec') diff --git a/dev-lang/python-exec/Manifest b/dev-lang/python-exec/Manifest index d94522cc1ffe..55ff41b2db6f 100644 --- a/dev-lang/python-exec/Manifest +++ b/dev-lang/python-exec/Manifest @@ -1,4 +1,4 @@ DIST python-exec-2.4.6.tar.bz2 87634 BLAKE2B 7b6de8ad0e0603fafd3284e6e3c5247ad83f145ab4db6728914318ae8e6f5aaa3c0247f4e01238fca11519ef72fb1b11436aea7e2b8c988b8717b3f6a2a43c37 SHA512 e05eaf01b83de196a10933636ab6b1a5489a421592df49b8b58eabd0e732de970f902744cd3a06b5ab530a6d69fe6dfa8f270fbb09b9fe3df4ae04d516828050 -EBUILD python-exec-2.4.6-r1.ebuild 4377 BLAKE2B 9d0e53dc01475a153a40b9240667491facf3b5b6c04ab2dcda53b9cbc57463e2f334e05f1f609450519f084e9ba85738ae43f3521e23a7f31ab55680fa482d45 SHA512 af7b72f4baf40906112042b6fbd36dbd329cff2c280cb2355e8ed1143d8c2ce9be1ca9f893ae1f6d6a75a3aedd76bf1e01474174e31b01770008270368126cef -EBUILD python-exec-2.4.6-r2.ebuild 4140 BLAKE2B fffa7b6191bfd5302408e5f0f74081e595fdaf1eb87b0f47462e02f2c610b49d9defd12e2b3fd6ca0f5ef1d79f73b3e7680d31b52a89e23b1dbf12cff774bf9a SHA512 50248a289517cfe96f1c767b395036f56bb19dd730feff68065339ffff908bc3c7975888e3414b6c5dd5b8c7eff0876808b2ddffbdd0e5ff075fc195f4aa19ba -MISC metadata.xml 526 BLAKE2B 0a1affa624a96f8ad1ce8cf2e086186cd48af83a9eafacdc0b7fac2776bfd590a0ae326fd1dc1d5425c2a950d3d328f0098ce62e8d754da7a125053b9dff177e SHA512 c8b9ffc7d7f2d71680c2d1cc24b063cb9338ed4586e2fdf3b6cd8e7fd27d86f5ef18d1de4a4ff9eed8dc8b72f897e9cacabe0ee63bf8cb8f50f1feb4bddeabaa +EBUILD python-exec-2.4.6-r2.ebuild 4141 BLAKE2B cfe0cd11ffdad126893a7a494ccaafb488b2a3a180c68d62520d7ae1bc5e221b4c401d187b86d8badb45c4e3f815db7c5412cc135af47f82b86ded40c20b755a SHA512 f60517b6f9515edb9336f8c2ec42872a26e68ba386b22abc5694172ccbdd11756946056ca45fcf3f610cb4cee24fa7b9d7be5dccf448ec751faa2e1650352283 +EBUILD python-exec-2.4.6-r3.ebuild 4214 BLAKE2B 7707317071781444f5cbfaa25a326db90ac92f1a74ba8c7753cd7e481246c86046ee93a41feab5c785a6801de87062a4c24d042c28ef8ef42bfbd4e36d9b6c62 SHA512 972f44f59e170bca6459cabaa8157f80978e7c46d00793adb65e5c293054c96c0bfb6f70ad2d6aef7de5065e33f18c996978c84bbab0a3a1d075f0e95d0f9b84 +MISC metadata.xml 791 BLAKE2B ba836a4142e78972a7a6b603749bb4df0fe99cf0f054e286d9ede512db5cdab18f18fa484036e9ef7e19c20afcf1c94b70d0f813e7790dbd9decda996dd53713 SHA512 be18445f875537d03532d2ab30241951c2abc0929b382c351eda05003fd84cd84c545018941117bec5a2f74e2e2a1dd17b60bb2dae99eb81909826947ceabba9 diff --git a/dev-lang/python-exec/metadata.xml b/dev-lang/python-exec/metadata.xml index 751ada8263f2..cef85cf6ce7d 100644 --- a/dev-lang/python-exec/metadata.xml +++ b/dev-lang/python-exec/metadata.xml @@ -13,4 +13,11 @@ https://github.com/mgorny/python-exec/issues/ mgorny/python-exec + + + Install generic symlinks like python and python3. If this flag + is disabled, only versioned python3.X executables will + be available to end users and ebuilds not using python eclasses. + + diff --git a/dev-lang/python-exec/python-exec-2.4.6-r1.ebuild b/dev-lang/python-exec/python-exec-2.4.6-r1.ebuild deleted file mode 100644 index 07538b12ef43..000000000000 --- a/dev-lang/python-exec/python-exec-2.4.6-r1.ebuild +++ /dev/null @@ -1,137 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit python-utils-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 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -# Internal Python project hack. Do not copy it. Ever. -IUSE="${_PYTHON_ALL_IMPLS[@]/#/python_targets_}" - -src_configure() { - local pyimpls=() i EPYTHON - for i in "${_PYTHON_ALL_IMPLS[@]}"; do - if use "python_targets_${i}"; then - python_export "${i}" EPYTHON - pyimpls+=( "${EPYTHON}" ) - fi - done - - local myconf=( - --with-fallback-path="${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin" - --with-python-impls="${pyimpls[*]}" - ) - - econf "${myconf[@]}" -} - -src_install() { - default - - # Prepare and own the template - insinto /etc/python-exec - newins - python-exec.conf \ - < <(sed -n -e '/^#/p' config/python-exec.conf.example) - - local programs=( python ) - local scripts=( python-config 2to3 idle pydoc pyvenv ) - local i - for i in "${_PYTHON_ALL_IMPLS[@]}"; do - if use "python_targets_${i}"; then - # NB: duplicate entries are harmless - if python_is_python3 "${i}"; then - programs+=( python3 ) - scripts+=( python3-config ) - else - programs+=( python2 ) - scripts+=( python2-config ) - fi - fi - done - - local f - for f in "${programs[@]}"; do - # symlink the C wrapper for python to avoid shebang recursion - # bug #568974 - dosym python-exec2c /usr/bin/"${f}" - done - for f in "${scripts[@]}"; 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-r2.ebuild b/dev-lang/python-exec/python-exec-2.4.6-r2.ebuild index 9bd729c8519e..3a975edc8d59 100644 --- a/dev-lang/python-exec/python-exec-2.4.6-r2.ebuild +++ b/dev-lang/python-exec/python-exec-2.4.6-r2.ebuild @@ -21,7 +21,7 @@ src_configure() { local pyimpls=() i EPYTHON for i in "${_PYTHON_ALL_IMPLS[@]}"; do if use "python_targets_${i}"; then - python_export "${i}" EPYTHON + _python_export "${i}" EPYTHON pyimpls+=( "${EPYTHON}" ) fi done diff --git a/dev-lang/python-exec/python-exec-2.4.6-r3.ebuild b/dev-lang/python-exec/python-exec-2.4.6-r3.ebuild new file mode 100644 index 000000000000..6869fd24d057 --- /dev/null +++ b/dev-lang/python-exec/python-exec-2.4.6-r3.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit python-utils-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 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +# Internal Python project hack. Do not copy it. Ever. +IUSE="${_PYTHON_ALL_IMPLS[@]/#/python_targets_} +native-symlinks" + +RDEPEND="!<=dev-lang/python-2.7.18-r3:2.7" + +src_configure() { + local pyimpls=() i EPYTHON + for i in "${_PYTHON_ALL_IMPLS[@]}"; do + if use "python_targets_${i}"; then + _python_export "${i}" EPYTHON + pyimpls+=( "${EPYTHON}" ) + fi + done + + local myconf=( + --with-fallback-path="${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin" + --with-python-impls="${pyimpls[*]}" + ) + + econf "${myconf[@]}" +} + +src_install() { + default + + # Prepare and own the template + insinto /etc/python-exec + newins - python-exec.conf \ + < <(sed -n -e '/^#/p' config/python-exec.conf.example) + + if use native-symlinks; then + local programs=( python python3 ) + local scripts=( python-config python3-config 2to3 idle pydoc pyvenv ) + + local f + for f in "${programs[@]}"; do + # symlink the C wrapper for python to avoid shebang recursion + # bug #568974 + dosym python-exec2c /usr/bin/"${f}" + done + for f in "${scripts[@]}"; 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 + fi +} + +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