diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-lang/python-exec |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-lang/python-exec')
-rw-r--r-- | dev-lang/python-exec/Manifest | 8 | ||||
-rw-r--r-- | dev-lang/python-exec/metadata.xml | 17 | ||||
-rw-r--r-- | dev-lang/python-exec/python-exec-2.4.4.ebuild | 133 | ||||
-rw-r--r-- | dev-lang/python-exec/python-exec-2.4.5.ebuild | 134 | ||||
-rw-r--r-- | dev-lang/python-exec/python-exec-9999.ebuild | 149 |
5 files changed, 441 insertions, 0 deletions
diff --git a/dev-lang/python-exec/Manifest b/dev-lang/python-exec/Manifest new file mode 100644 index 000000000000..09707aa75692 --- /dev/null +++ b/dev-lang/python-exec/Manifest @@ -0,0 +1,8 @@ +DIST python-exec-2.4.4.tar.bz2 86945 SHA256 cdc780764bce79047ab047160156c5dc3bf5728d9c59cf1ed904fdf12638d60b SHA512 26b76960430dc3b2b79aab5e8a72498144d4e78bed5291fe9361afe081f0e8d70049a74ec29384cb0fc199f76c23499324d2eddcaea521ef33d88e61b1b674f9 WHIRLPOOL 791fd9732179d17bf5cd981956759e7c25e1e1dcbaf6fdfb05cf4fed8d4f44490740aaa5b4d38335a72128f8fdea0f6ab2e34c331a2b7f6b0897aa7eaa1f0c48 +DIST python-exec-2.4.5.tar.bz2 87137 SHA256 8649def42af569cc65598da6af49e554351dc138ccc8a96198c2a425494a8559 SHA512 8c1a520c565afa775cad0e8b88248b688814664e588f683fc2b2c039ee0494b168ebd3cd1042b8b7fe2583f287cf55b22ea0585bfb43efe2f8450d809cde0b21 WHIRLPOOL 5de79c34c31eee131799524a8ad19262a1455d59ee4db0cc99468820fe142c864f10999834734b70a6d6868ead97e2d389e83dc1679248e862b02b332a177954 +EBUILD python-exec-2.4.4.ebuild 4284 SHA256 1f74e6ee68b4a077564c588457cece0100803ea3446917e20d4ca03fd3772368 SHA512 9f7072a4f9b504ebc6cbabf3c18ad06df8c01ae1e8d09139661d339b4f35bc0b3616407a2cdc5266a1c85ccf8abb83c8a8d44ccb0c5c28ad0865df4e15afbfcf WHIRLPOOL 9f150ffe9a3d1d2e2224afee0de20b772c2809e0f66d0b84ae0f2784312803ba3c0f905fd5478f2c63a6797bf27b0e5ff19d7b4df30be68731fb8749eecd9e57 +EBUILD python-exec-2.4.5.ebuild 4455 SHA256 52e489943cb6d5f516885a0e19a8ba5d5d10f17d461bd2714ab21f40421943fb SHA512 7f6f031bd2ce8a19ef5eebb155454615ea305a40b938f28ef7ab12bb0c6dc77fd65b8c705c9d1236bf5bb316b205b34c582b21fbb78a9e386139cdd8c07f1115 WHIRLPOOL 0057cfc81aefbfd36855a494c0dd32e568190d7eb4cfc143f503ff312447c713cfc8d08d284b6cf2debd638fbc930f8e02567e97ae106866b960113f18be1b27 +EBUILD python-exec-9999.ebuild 4606 SHA256 6ba168825172b9521595ce8611b17522d642d429107e984a80ffbdc6e06a05f0 SHA512 c68c4cc31b5f4f634ef6adb6e97c487f71600fd5c8e2d6d60a01f025351b9c231835a57221aea6b287f0e8e00669b7af958a0cd4e435459827e204cd312b6acd WHIRLPOOL e6d60ce0d78205e62e034971cc73902a6b248422667d3604823c0e0c8823158324e7e585913ae818b701cd4112e129513ef9ca95c39850099fd917e75a522ba2 +MISC ChangeLog 10720 SHA256 3d82f9b81fc855db286b1fc912731759c811815c348046491edef317e22d29e4 SHA512 6eed75de98c71ac6e81eae8607405efb133472936ec613a2ba70ead54eda3839a8b4b50dbca78325cfa9d0c2fe4b5a0de791dd19d1ac0349787b0865f6cd0715 WHIRLPOOL 636aab31ec2d766cb177b25734dd245e30262870e1837ea8eabcb71dfb02e6a89a3bc54ed03e6a3b6cc83df8ae9ec8721a266f9945cfdc227ee36e3a1811e422 +MISC ChangeLog-2015 3848 SHA256 5f99d4b5e2ae61ae1330ac7a10f56d3fae902ef2a2a52de9b07383197c57e71f SHA512 e516a7461f0d8008c7554858bb9d490db05768d90c5f237a6ca9e8c4a0902bc9205f389c7dab410ed0a48689dd774012487340954eb9c19873fa0b2608d871e2 WHIRLPOOL c6551fd2ced06008adf39300cf22953fd13129cd4291b3f9c49d12bda3bc809daf010997de7b7a643fadfeafe7324e869975a1a42aa7c6450465377ab1117fb3 +MISC metadata.xml 589 SHA256 660e6a1fef663b8ef01d7c0217188290f54dd6d4a998360ef7a482b092eacb8d SHA512 2ac0223af0a2cf95d2b18ef415eadb325af0094e4ec361a414b0d68b203dc1c937d3d680af96bdad1e8a48cb5786683bdbbd451f47a0f3a777c075e1690ccf7a WHIRLPOOL 10e2730bfbb957988893646314968b19feb9f7efacf0a3dd5aea2c8163074dfe6da4786c8984140193b76eaec36b6ee4b9eee184892d97596379b6381fb59c3d 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 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <upstream> + <maintainer status="active"> + <email>mgorny@gentoo.org</email> + <name>Michał Górny</name> + </maintainer> + <bugs-to>https://github.com/mgorny/python-exec/issues/</bugs-to> + <remote-id type="bitbucket">mgorny/python-exec</remote-id> + <remote-id type="github">mgorny/python-exec</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-lang/python-exec/python-exec-2.4.4.ebuild b/dev-lang/python-exec/python-exec-2.4.4.ebuild new file mode 100644 index 000000000000..96c08a46bfb0 --- /dev/null +++ b/dev-lang/python-exec/python-exec-2.4.4.ebuild @@ -0,0 +1,133 @@ +# Copyright 1999-2017 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 ~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=" + !<app-eselect/eselect-python-20160206 + !<dev-lang/python-2.7.10-r4:2.7 + !<dev-lang/python-3.3.5-r4:3.3 + !<dev-lang/python-3.4.3-r4:3.4 + !<dev-lang/python-3.5.0-r3:3.5" + +src_configure() { + local pyimpls=() i EPYTHON + for i in "${PYTHON_COMPAT[@]}"; do + python_export "${i}" EPYTHON + pyimpls+=( "${EPYTHON}" ) + done + + local myconf=( + --with-python-impls="${pyimpls[*]}" + ) + + econf "${myconf[@]}" +} + +src_install() { + default + + # Prepare and own the template + sed -n -e '/^#/p' config/python-exec.conf.example \ + > "${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.5.ebuild b/dev-lang/python-exec/python-exec-2.4.5.ebuild new file mode 100644 index 000000000000..9867c4cbd7e5 --- /dev/null +++ b/dev-lang/python-exec/python-exec-2.4.5.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2017 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=" + !<app-eselect/eselect-python-20160206 + !<dev-lang/python-2.7.10-r4:2.7 + !<dev-lang/python-3.3.5-r4:3.3 + !<dev-lang/python-3.4.3-r4:3.4 + !<dev-lang/python-3.5.0-r3:3.5" + +src_configure() { + local pyimpls=() i EPYTHON + for i in "${PYTHON_COMPAT[@]}"; do + python_export "${i}" EPYTHON + pyimpls+=( "${EPYTHON}" ) + 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 + sed -n -e '/^#/p' config/python-exec.conf.example \ + > "${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..98708bc4bed2 --- /dev/null +++ b/dev-lang/python-exec/python-exec-9999.ebuild @@ -0,0 +1,149 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +#if LIVE +EGIT_REPO_URI="https://github.com/mgorny/${PN}.git" + +inherit autotools git-r3 +#endif + +# 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 ~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=" + !<app-eselect/eselect-python-20160206 + !<dev-lang/python-2.7.10-r4:2.7 + !<dev-lang/python-3.3.5-r4:3.3 + !<dev-lang/python-3.4.3-r4:3.4 + !<dev-lang/python-3.5.0-r3:3.5" + +#if LIVE +KEYWORDS= +SRC_URI= + +src_prepare() { + eautoreconf +} +#endif + +src_configure() { + local pyimpls=() i EPYTHON + for i in "${PYTHON_COMPAT[@]}"; do + python_export "${i}" EPYTHON + pyimpls+=( "${EPYTHON}" ) + 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 + sed -n -e '/^#/p' config/python-exec.conf.example \ + > "${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 +} |