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