1 |
commit: 3faac4e1aeba6299797ff0fc956d8d4bd1f9db70 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 27 08:10:46 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 27 08:41:03 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3faac4e1 |
7 |
|
8 |
dev-lang/python-exec: Drop old |
9 |
|
10 |
dev-lang/python-exec/Manifest | 1 - |
11 |
dev-lang/python-exec/python-exec-2.4.4.ebuild | 133 -------------------------- |
12 |
2 files changed, 134 deletions(-) |
13 |
|
14 |
diff --git a/dev-lang/python-exec/Manifest b/dev-lang/python-exec/Manifest |
15 |
index e8877dd4a63..e344e92d484 100644 |
16 |
--- a/dev-lang/python-exec/Manifest |
17 |
+++ b/dev-lang/python-exec/Manifest |
18 |
@@ -1,2 +1 @@ |
19 |
-DIST python-exec-2.4.4.tar.bz2 86945 BLAKE2B 3ee2be57711c45e5821ba4cc54e76e4341056221a34277ced8ab5ebffc4d6af63fbe515f73bd84a1a7a82047a008b72fd2935e61b09b0b852624329b3be22e37 SHA512 26b76960430dc3b2b79aab5e8a72498144d4e78bed5291fe9361afe081f0e8d70049a74ec29384cb0fc199f76c23499324d2eddcaea521ef33d88e61b1b674f9 |
20 |
DIST python-exec-2.4.5.tar.bz2 87137 BLAKE2B 2434bee0bcc64a78a83254d6b6f733ef0748d8209ff70654fc57ac50563d4f32be64705a3c56eefef4e173a238b272d00bef4929982a729a097b82a3a2b0b5b1 SHA512 8c1a520c565afa775cad0e8b88248b688814664e588f683fc2b2c039ee0494b168ebd3cd1042b8b7fe2583f287cf55b22ea0585bfb43efe2f8450d809cde0b21 |
21 |
|
22 |
diff --git a/dev-lang/python-exec/python-exec-2.4.4.ebuild b/dev-lang/python-exec/python-exec-2.4.4.ebuild |
23 |
deleted file mode 100644 |
24 |
index 96c08a46bfb..00000000000 |
25 |
--- a/dev-lang/python-exec/python-exec-2.4.4.ebuild |
26 |
+++ /dev/null |
27 |
@@ -1,133 +0,0 @@ |
28 |
-# Copyright 1999-2017 Gentoo Foundation |
29 |
-# Distributed under the terms of the GNU General Public License v2 |
30 |
- |
31 |
-EAPI=5 |
32 |
- |
33 |
-# Kids, don't do this at home! |
34 |
-inherit python-utils-r1 |
35 |
-PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" ) |
36 |
- |
37 |
-# Inherited purely to have PYTHON_TARGET flags which will satisfy USE |
38 |
-# dependencies and trigger necessary rebuilds. |
39 |
-inherit python-r1 |
40 |
- |
41 |
-DESCRIPTION="Python script wrapper" |
42 |
-HOMEPAGE="https://github.com/mgorny/python-exec/" |
43 |
-SRC_URI="https://github.com/mgorny/${PN}/releases/download/${P}/${P}.tar.bz2" |
44 |
- |
45 |
-LICENSE="BSD-2" |
46 |
-SLOT="2" |
47 |
-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" |
48 |
-IUSE="" |
49 |
- |
50 |
-# eselect-python because of /usr/bin/python* collisions and new config |
51 |
-# python versions because of missing $scriptdir/python* symlinks |
52 |
-RDEPEND=" |
53 |
- !<app-eselect/eselect-python-20160206 |
54 |
- !<dev-lang/python-2.7.10-r4:2.7 |
55 |
- !<dev-lang/python-3.3.5-r4:3.3 |
56 |
- !<dev-lang/python-3.4.3-r4:3.4 |
57 |
- !<dev-lang/python-3.5.0-r3:3.5" |
58 |
- |
59 |
-src_configure() { |
60 |
- local pyimpls=() i EPYTHON |
61 |
- for i in "${PYTHON_COMPAT[@]}"; do |
62 |
- python_export "${i}" EPYTHON |
63 |
- pyimpls+=( "${EPYTHON}" ) |
64 |
- done |
65 |
- |
66 |
- local myconf=( |
67 |
- --with-python-impls="${pyimpls[*]}" |
68 |
- ) |
69 |
- |
70 |
- econf "${myconf[@]}" |
71 |
-} |
72 |
- |
73 |
-src_install() { |
74 |
- default |
75 |
- |
76 |
- # Prepare and own the template |
77 |
- sed -n -e '/^#/p' config/python-exec.conf.example \ |
78 |
- > "${T}"/python-exec.conf || die |
79 |
- insinto /etc/python-exec |
80 |
- doins "${T}"/python-exec.conf |
81 |
- |
82 |
- local f |
83 |
- for f in python{,2,3}; do |
84 |
- # symlink the C wrapper for python to avoid shebang recursion |
85 |
- # bug #568974 |
86 |
- dosym python-exec2c /usr/bin/"${f}" |
87 |
- done |
88 |
- for f in python{,2,3}-config 2to3 idle pydoc pyvenv; do |
89 |
- # those are python scripts (except for new python-configs) |
90 |
- # so symlink them via the python wrapper |
91 |
- dosym ../lib/python-exec/python-exec2 /usr/bin/"${f}" |
92 |
- done |
93 |
-} |
94 |
- |
95 |
-pkg_preinst() { |
96 |
- if [[ -e ${EROOT}etc/python-exec/python-exec.conf ]]; then |
97 |
- # preserve current configuration |
98 |
- cp "${EROOT}"etc/python-exec/python-exec.conf \ |
99 |
- "${ED}"etc/python-exec/python-exec.conf || die |
100 |
- else |
101 |
- # preserve previous Python version preference |
102 |
- local py old_pythons=() |
103 |
- local config_base=${EROOT}etc/env.d/python |
104 |
- |
105 |
- # start with the 'global' preference (2 vs 3) |
106 |
- if [[ -f ${config_base}/config ]]; then |
107 |
- old_pythons+=( "$(<${config_base}/config)" ) |
108 |
- fi |
109 |
- |
110 |
- # then try specific py3 selection |
111 |
- for py in 3; do |
112 |
- local target= |
113 |
- |
114 |
- if [[ -f ${config_base}/python${py} ]]; then |
115 |
- # try the newer config files |
116 |
- target=$(<${config_base}/python${py}) |
117 |
- elif [[ -L ${EROOT}/usr/bin/python${py} ]]; then |
118 |
- # check the older symlink format |
119 |
- target=$(readlink "${EROOT}/usr/bin/python${py}") |
120 |
- |
121 |
- # check if it's actually old eselect symlink |
122 |
- [[ ${target} == python?.? ]] || target= |
123 |
- fi |
124 |
- |
125 |
- # add the extra target if found and != global |
126 |
- if [[ ${target} && ${old_pythons[0]} != ${target} ]]; then |
127 |
- old_pythons+=( "${target}" ) |
128 |
- fi |
129 |
- done |
130 |
- |
131 |
- if [[ ${old_pythons[@]} ]]; then |
132 |
- elog "You seem to have just upgraded into the new version of python-exec" |
133 |
- elog "that uses python-exec.conf for configuration. The ebuild has attempted" |
134 |
- elog "to convert your previous configuration to the new format, resulting" |
135 |
- elog "in the following preferences (most preferred version first):" |
136 |
- elog |
137 |
- for py in "${old_pythons[@]}"; do |
138 |
- elog " ${py}" |
139 |
- done |
140 |
- elog |
141 |
- elog "Those interpreters will be preferred when running Python scripts or" |
142 |
- elog "calling wrapped Python executables (python, python2, pydoc...)." |
143 |
- elog "If none of the preferred interpreters are supported, python-exec will" |
144 |
- elog "fall back to the newest supported Python version." |
145 |
- elog |
146 |
- elog "Please note that due to the ambiguous character of the old settings," |
147 |
- elog "you may want to modify the preference list yourself. In order to do so," |
148 |
- elog "open the following file in your favorite editor:" |
149 |
- elog |
150 |
- elog " ${EROOT}etc/python-exec/python-exec.conf" |
151 |
- elog |
152 |
- elog "For more information on the new configuration format, please read" |
153 |
- elog "the comment on top of the installed configuration file." |
154 |
- |
155 |
- local IFS=$'\n' |
156 |
- echo "${old_pythons[*]}" \ |
157 |
- >> "${ED}"etc/python-exec/python-exec.conf || die |
158 |
- fi |
159 |
- fi |
160 |
-} |