1 |
commit: 7fb47da34d05496bcf0ac75286df7dee39901685 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 4 16:02:50 2018 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 4 16:03:10 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fb47da3 |
7 |
|
8 |
dev-lang/python: bump to 3.6.6 |
9 |
|
10 |
Package-Manager: Portage-2.3.40_p15, Repoman-2.3.9_p247 |
11 |
|
12 |
dev-lang/python/Manifest | 2 + |
13 |
dev-lang/python/python-3.6.6.ebuild | 346 ++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 348 insertions(+) |
15 |
|
16 |
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest |
17 |
index 0fd542d782a..1b585bf29c6 100644 |
18 |
--- a/dev-lang/python/Manifest |
19 |
+++ b/dev-lang/python/Manifest |
20 |
@@ -8,6 +8,7 @@ DIST Python-3.5.5.tar.xz 15351440 BLAKE2B 217cb7f51e04d57983ce053ff4276d056e17c8 |
21 |
DIST Python-3.6.3.tar.xz 16974296 BLAKE2B 8220fc0c2eaa315d3972085b0f531f169adb6cfad57023ad2c115603b5a484573ea3540eb3216edd0f4514256c8edb07469cf38d17727d69cdc15cdf1f601623 SHA512 32f24a3adcb7880003c7ecdc5e53e838e774adda76b308961d8215e28db630b2fa2828097817924c76afa4212b2df3362eb64d4e10f37c0147f512ec5aa8662b |
22 |
DIST Python-3.6.4.tar.xz 16992824 BLAKE2B 2347a70bb25468221178b1542ddd4376f136a515f2873ee1f640c4629eb77a9608af0f6be37128ba3e8ad614ebc17e7be20b73384983533aa77bca4403ea7935 SHA512 09ba2103ac517ac4d262f00380c9aac836a53401ce252540c17fd821a3b92e1ddf32528d00772221eb3126b12cb95b62c3ac3e852f4951e6f2eb406c88c848a2 |
23 |
DIST Python-3.6.5.tar.xz 17049912 BLAKE2B f393e9563a18a46c457afcd2e174d9eacda20fe2b0ae5461e11c582fa4d27b85c01bbe7b602f45511b6b44f635c6330205b12fb3e8325ffd07e87b78a8258889 SHA512 6b26fcd296b9bd8e67861eff10d14db7507711ddba947288d16d6def53135c39326b7f969c04bb2b2993f924d9e7ad3f5c5282a3915760bc0885cf0a8ea5eb51 |
24 |
+DIST Python-3.6.6.tar.xz 17156744 BLAKE2B fa4333149f84570cc4a0d1ec76c819610888750a51268b9db7d05df7d9c11e5ed72daff5d81b404015d9c678cb034d8a32034262ce73629ee8f96772853a706c SHA512 c71f87c5906e770322a14cacad228655659f782207db826320449d12bf86091c3662f317e1773158dec52f8b052eaedfb4c03b561cc2a6cfcd381597fd2d2b04 |
25 |
DIST python-gentoo-patches-2.7.14-0.tar.xz 13428 BLAKE2B 0048e48ddaaa4bef08451354fde95a123042880f26dddc9267c7f9a90fd8abb40955e26ee8c9dfc5a1165556bb3e11585b27288e635d42a4000dd3d7654c41ad SHA512 6da5b52065752b54e9215d0f0809c75167dc3690d0e94fa21dd7595626925bc5c1dd065d31b3bd696d7087f3986de145d3a335a29eb7bd77442637a7ec2863c1 |
26 |
DIST python-gentoo-patches-2.7.15.tar.xz 16208 BLAKE2B 5739c2b3a236d48f8e33f0fe6515bfe7a8f99096f6223b402653988feac2513d37d26b6e40e5e049852f42657358170e468ca60097e0e2294e760787c12ad591 SHA512 687fd008d1d41b1e65ce5417f6f6aba84ffd42f7af44ef97c03a7806b28e6888f8df043a0c15187a8b229cc17642853e6feb25494db97f4d10f8a66f8ebcbcca |
27 |
DIST python-gentoo-patches-3.4.5-0.tar.xz 12044 BLAKE2B 7fb3cc7dcd987debd5aa263d8e26b21aad439d8e3177c06c3683406a53bbda9652175673b09b6300f6a5b62148190cd8a75c9b65a5de04d770866733fcc0ebcb SHA512 108a4845667ecdf4001fcbeffab0cfbbac87439a449a7351428b0f3e2f159e3848ee0c0dfa45c9fba893b9f9584b33722fc8bb0bd7485a1d0909c3a35ede6ed8 |
28 |
@@ -15,3 +16,4 @@ DIST python-gentoo-patches-3.4.6-0.tar.xz 11728 BLAKE2B 2a636f5500f4c7d354f42113 |
29 |
DIST python-gentoo-patches-3.5.4-0.tar.xz 11704 BLAKE2B 4a7d71feff18c7c8c109bed10748348484d314183c3de3ec950d5ca5ce7048bb322c470f3f5bff2d63eb7f2ed99c0fe75c621df050273d9d118681b28926061d SHA512 d395a87695f700598026038d6929ea5038abd7d494294037a4dfa02d5262203dbbaa6ae258a5a7f35ff5542f6266dcf69cc0b9c3df2a047cd2f6699a87e182ec |
30 |
DIST python-gentoo-patches-3.6.2-0.tar.xz 10744 BLAKE2B 3075754627617ac2ceee879eaf1a0e6564505655cdbdff380233a09df701a6188d64fe1f6a8c642b1fb05ef3c460a07042b6a362d655cd02717d6d9ba47983a1 SHA512 2aac1700c541202aa4f43bff4cb521b996d52ab350133318abaddb43f4b6e20548f37de472ace8024ef325ebf63fdfff0d43f8aa1f717d3c56f974b7aa1764e3 |
31 |
DIST python-gentoo-patches-3.6.4.tar.xz 12888 BLAKE2B 7cf49ae22df53e855f2e99df51686b5d4bd0da82ef4c22836e24726ea9ed561808352c0305a5659b052d38b843f1ff61b6466a7bc3673b7e5cfb4d81d22fa4bc SHA512 90a1b685f2539872ffd67f96581f70145b7afaf18af19f4a7f4a61214103d2a10bf0069c1769dac229ae011fceaf8538f041082b33c1671905246d018d184dd7 |
32 |
+DIST python-gentoo-patches-3.6.6.tar.xz 13876 BLAKE2B 4be56b54e70c9b83209734097e03a7dbaa8f46ae13e268fc6a7f465ffd052ce03ca9e1fc45f1d432f2de17d4ce16ca8bc684b24344862cd8f52f9d1a90d90b7a SHA512 534b9eaefcbc45908119852a103bf10e400a8628c66aa599812fbceda36810d626d33e6701d1b7866e4df68397f717df6a217cb414049ca6f378eff9f43a27ab |
33 |
|
34 |
diff --git a/dev-lang/python/python-3.6.6.ebuild b/dev-lang/python/python-3.6.6.ebuild |
35 |
new file mode 100644 |
36 |
index 00000000000..f9fafa1e0df |
37 |
--- /dev/null |
38 |
+++ b/dev-lang/python/python-3.6.6.ebuild |
39 |
@@ -0,0 +1,346 @@ |
40 |
+# Copyright 1999-2018 Gentoo Foundation |
41 |
+# Distributed under the terms of the GNU General Public License v2 |
42 |
+ |
43 |
+EAPI="6" |
44 |
+WANT_LIBTOOL="none" |
45 |
+ |
46 |
+inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs |
47 |
+ |
48 |
+MY_P="Python-${PV}" |
49 |
+PATCHSET_VERSION="3.6.6" |
50 |
+ |
51 |
+DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
52 |
+HOMEPAGE="https://www.python.org/" |
53 |
+SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz |
54 |
+ https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" |
55 |
+ |
56 |
+LICENSE="PSF-2" |
57 |
+SLOT="3.6/3.6m" |
58 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" |
59 |
+IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml" |
60 |
+RESTRICT="!test? ( test )" |
61 |
+ |
62 |
+# Do not add a dependency on dev-lang/python to this ebuild. |
63 |
+# If you need to apply a patch which requires python for bootstrapping, please |
64 |
+# run the bootstrap code on your dev box and include the results in the |
65 |
+# patchset. See bug 447752. |
66 |
+ |
67 |
+RDEPEND="app-arch/bzip2:0= |
68 |
+ app-arch/xz-utils:0= |
69 |
+ >=sys-libs/zlib-1.1.3:0= |
70 |
+ virtual/libffi |
71 |
+ virtual/libintl |
72 |
+ gdbm? ( sys-libs/gdbm:0=[berkdb] ) |
73 |
+ ncurses? ( >=sys-libs/ncurses-5.2:0= ) |
74 |
+ readline? ( >=sys-libs/readline-4.1:0= ) |
75 |
+ sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
76 |
+ ssl? ( |
77 |
+ !libressl? ( dev-libs/openssl:0= ) |
78 |
+ libressl? ( dev-libs/libressl:0= ) |
79 |
+ ) |
80 |
+ tk? ( |
81 |
+ >=dev-lang/tcl-8.0:0= |
82 |
+ >=dev-lang/tk-8.0:0= |
83 |
+ dev-tcltk/blt:0= |
84 |
+ dev-tcltk/tix |
85 |
+ ) |
86 |
+ xml? ( >=dev-libs/expat-2.1:0= ) |
87 |
+ !!<sys-apps/sandbox-2.6-r1" |
88 |
+# bluetooth requires headers from bluez |
89 |
+DEPEND="${RDEPEND} |
90 |
+ bluetooth? ( net-wireless/bluez ) |
91 |
+ test? ( app-arch/xz-utils[extra-filters(+)] ) |
92 |
+ virtual/pkgconfig |
93 |
+ !sys-devel/gcc[libffi(-)]" |
94 |
+RDEPEND+=" !build? ( app-misc/mime-types )" |
95 |
+PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
96 |
+ |
97 |
+S="${WORKDIR}/${MY_P}" |
98 |
+PYVER=${SLOT%/*} |
99 |
+ |
100 |
+src_prepare() { |
101 |
+ # Ensure that internal copies of expat, libffi and zlib are not used. |
102 |
+ rm -fr Modules/expat |
103 |
+ rm -fr Modules/_ctypes/libffi* |
104 |
+ rm -fr Modules/zlib |
105 |
+ |
106 |
+ local PATCHES=( |
107 |
+ "${WORKDIR}/patches" |
108 |
+ ) |
109 |
+ |
110 |
+ default |
111 |
+ |
112 |
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
113 |
+ Lib/distutils/command/install.py \ |
114 |
+ Lib/distutils/sysconfig.py \ |
115 |
+ Lib/site.py \ |
116 |
+ Lib/sysconfig.py \ |
117 |
+ Lib/test/test_site.py \ |
118 |
+ Makefile.pre.in \ |
119 |
+ Modules/Setup.dist \ |
120 |
+ Modules/getpath.c \ |
121 |
+ configure.ac \ |
122 |
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
123 |
+ |
124 |
+ eautoreconf |
125 |
+} |
126 |
+ |
127 |
+src_configure() { |
128 |
+ local disable |
129 |
+ # disable automagic bluetooth headers detection |
130 |
+ use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
131 |
+ use gdbm || disable+=" gdbm" |
132 |
+ use ncurses || disable+=" _curses _curses_panel" |
133 |
+ use readline || disable+=" readline" |
134 |
+ use sqlite || disable+=" _sqlite3" |
135 |
+ use ssl || export PYTHON_DISABLE_SSL="1" |
136 |
+ use tk || disable+=" _tkinter" |
137 |
+ use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
138 |
+ export PYTHON_DISABLE_MODULES="${disable}" |
139 |
+ |
140 |
+ if ! use xml; then |
141 |
+ ewarn "You have configured Python without XML support." |
142 |
+ ewarn "This is NOT a recommended configuration as you" |
143 |
+ ewarn "may face problems parsing any XML documents." |
144 |
+ fi |
145 |
+ |
146 |
+ if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
147 |
+ einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
148 |
+ fi |
149 |
+ |
150 |
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then |
151 |
+ append-flags -fwrapv |
152 |
+ fi |
153 |
+ |
154 |
+ filter-flags -malign-double |
155 |
+ |
156 |
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
157 |
+ if is-flagq -O3; then |
158 |
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
159 |
+ use hardened && replace-flags -O3 -O2 |
160 |
+ fi |
161 |
+ |
162 |
+ # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
163 |
+ tc-export CXX |
164 |
+ |
165 |
+ # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
166 |
+ # Needed on FreeBSD unless Python 3.2 is already installed. |
167 |
+ # Please query BSD team before removing this! |
168 |
+ append-ldflags "-L." |
169 |
+ |
170 |
+ local dbmliborder |
171 |
+ if use gdbm; then |
172 |
+ dbmliborder+="${dbmliborder:+:}gdbm" |
173 |
+ fi |
174 |
+ |
175 |
+ local myeconfargs=( |
176 |
+ --with-fpectl |
177 |
+ --enable-shared |
178 |
+ $(use_enable ipv6) |
179 |
+ $(use_with threads) |
180 |
+ --infodir='${prefix}/share/info' |
181 |
+ --mandir='${prefix}/share/man' |
182 |
+ --with-computed-gotos |
183 |
+ --with-dbmliborder="${dbmliborder}" |
184 |
+ --with-libc= |
185 |
+ --enable-loadable-sqlite-extensions |
186 |
+ --without-ensurepip |
187 |
+ --with-system-expat |
188 |
+ --with-system-ffi |
189 |
+ ) |
190 |
+ |
191 |
+ OPT="" econf "${myeconfargs[@]}" |
192 |
+ |
193 |
+ if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
194 |
+ eerror "configure has detected that the sem_open function is broken." |
195 |
+ eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
196 |
+ die "Broken sem_open function (bug 496328)" |
197 |
+ fi |
198 |
+} |
199 |
+ |
200 |
+src_compile() { |
201 |
+ # Ensure sed works as expected |
202 |
+ # https://bugs.gentoo.org/594768 |
203 |
+ local -x LC_ALL=C |
204 |
+ |
205 |
+ emake CPPFLAGS= CFLAGS= LDFLAGS= |
206 |
+ |
207 |
+ # Work around bug 329499. See also bug 413751 and 457194. |
208 |
+ if has_version dev-libs/libffi[pax_kernel]; then |
209 |
+ pax-mark E python |
210 |
+ else |
211 |
+ pax-mark m python |
212 |
+ fi |
213 |
+} |
214 |
+ |
215 |
+src_test() { |
216 |
+ # Tests will not work when cross compiling. |
217 |
+ if tc-is-cross-compiler; then |
218 |
+ elog "Disabling tests due to crosscompiling." |
219 |
+ return |
220 |
+ fi |
221 |
+ |
222 |
+ # Skip failing tests. |
223 |
+ local skipped_tests="gdb" |
224 |
+ |
225 |
+ for test in ${skipped_tests}; do |
226 |
+ mv "${S}"/Lib/test/test_${test}.py "${T}" |
227 |
+ done |
228 |
+ |
229 |
+ local -x PYTHONDONTWRITEBYTECODE= |
230 |
+ |
231 |
+ emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
232 |
+ local result=$? |
233 |
+ |
234 |
+ for test in ${skipped_tests}; do |
235 |
+ mv "${T}/test_${test}.py" "${S}"/Lib/test |
236 |
+ done |
237 |
+ |
238 |
+ elog "The following tests have been skipped:" |
239 |
+ for test in ${skipped_tests}; do |
240 |
+ elog "test_${test}.py" |
241 |
+ done |
242 |
+ |
243 |
+ elog "If you would like to run them, you may:" |
244 |
+ elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" |
245 |
+ elog "and run the tests separately." |
246 |
+ |
247 |
+ if [[ ${result} -ne 0 ]]; then |
248 |
+ die "emake test failed" |
249 |
+ fi |
250 |
+} |
251 |
+ |
252 |
+src_install() { |
253 |
+ local libdir=${ED}/usr/$(get_libdir)/python${PYVER} |
254 |
+ |
255 |
+ emake DESTDIR="${D}" altinstall |
256 |
+ |
257 |
+ sed \ |
258 |
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
259 |
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
260 |
+ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
261 |
+ |
262 |
+ # Fix collisions between different slots of Python. |
263 |
+ rm -f "${ED}usr/$(get_libdir)/libpython3.so" |
264 |
+ |
265 |
+ # Cheap hack to get version with ABIFLAGS |
266 |
+ local abiver=$(cd "${ED}usr/include"; echo python*) |
267 |
+ if [[ ${abiver} != python${PYVER} ]]; then |
268 |
+ # Replace python3.X with a symlink to python3.Xm |
269 |
+ rm "${ED}usr/bin/python${PYVER}" || die |
270 |
+ dosym "${abiver}" "/usr/bin/python${PYVER}" |
271 |
+ # Create python3.X-config symlink |
272 |
+ dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
273 |
+ # Create python-3.5m.pc symlink |
274 |
+ dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
275 |
+ fi |
276 |
+ |
277 |
+ # python seems to get rebuilt in src_install (bug 569908) |
278 |
+ # Work around it for now. |
279 |
+ if has_version dev-libs/libffi[pax_kernel]; then |
280 |
+ pax-mark E "${ED}usr/bin/${abiver}" |
281 |
+ else |
282 |
+ pax-mark m "${ED}usr/bin/${abiver}" |
283 |
+ fi |
284 |
+ |
285 |
+ use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
286 |
+ use tk || rm -r "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
287 |
+ |
288 |
+ use threads || rm -r "${libdir}/multiprocessing" || die |
289 |
+ use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die |
290 |
+ |
291 |
+ dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
292 |
+ |
293 |
+ if use examples; then |
294 |
+ insinto /usr/share/doc/${PF}/examples |
295 |
+ find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr |
296 |
+ doins -r "${S}"/Tools |
297 |
+ fi |
298 |
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
299 |
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
300 |
+ emake --no-print-directory -s -f - 2>/dev/null) |
301 |
+ newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
302 |
+ |
303 |
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
304 |
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
305 |
+ sed \ |
306 |
+ -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
307 |
+ -e "s:@PYDOC@:pydoc${PYVER}:" \ |
308 |
+ -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed" |
309 |
+ |
310 |
+ # for python-exec |
311 |
+ local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
312 |
+ |
313 |
+ # if not using a cross-compiler, use the fresh binary |
314 |
+ if ! tc-is-cross-compiler; then |
315 |
+ local -x PYTHON=./python |
316 |
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
317 |
+ else |
318 |
+ vars=( PYTHON "${vars[@]}" ) |
319 |
+ fi |
320 |
+ |
321 |
+ python_export "python${PYVER}" "${vars[@]}" |
322 |
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die |
323 |
+ python_domodule epython.py |
324 |
+ |
325 |
+ # python-exec wrapping support |
326 |
+ local pymajor=${PYVER%.*} |
327 |
+ mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
328 |
+ # python and pythonX |
329 |
+ ln -s "../../../bin/${abiver}" \ |
330 |
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
331 |
+ ln -s "python${pymajor}" \ |
332 |
+ "${D}${PYTHON_SCRIPTDIR}/python" || die |
333 |
+ # python-config and pythonX-config |
334 |
+ # note: we need to create a wrapper rather than symlinking it due |
335 |
+ # to some random dirname(argv[0]) magic performed by python-config |
336 |
+ cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die |
337 |
+ #!/bin/sh |
338 |
+ exec "${abiver}-config" "\${@}" |
339 |
+ EOF |
340 |
+ chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
341 |
+ ln -s "python${pymajor}-config" \ |
342 |
+ "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
343 |
+ # 2to3, pydoc, pyvenv |
344 |
+ ln -s "../../../bin/2to3-${PYVER}" \ |
345 |
+ "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
346 |
+ ln -s "../../../bin/pydoc${PYVER}" \ |
347 |
+ "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
348 |
+ ln -s "../../../bin/pyvenv-${PYVER}" \ |
349 |
+ "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die |
350 |
+ # idle |
351 |
+ if use tk; then |
352 |
+ ln -s "../../../bin/idle${PYVER}" \ |
353 |
+ "${D}${PYTHON_SCRIPTDIR}/idle" || die |
354 |
+ fi |
355 |
+} |
356 |
+ |
357 |
+pkg_preinst() { |
358 |
+ if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then |
359 |
+ python_updater_warning="1" |
360 |
+ fi |
361 |
+} |
362 |
+ |
363 |
+eselect_python_update() { |
364 |
+ if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
365 |
+ eselect python update |
366 |
+ fi |
367 |
+ |
368 |
+ if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
369 |
+ eselect python update --python${PV%%.*} |
370 |
+ fi |
371 |
+} |
372 |
+ |
373 |
+pkg_postinst() { |
374 |
+ eselect_python_update |
375 |
+ |
376 |
+ if [[ "${python_updater_warning}" == "1" ]]; then |
377 |
+ ewarn "You have just upgraded from an older version of Python." |
378 |
+ ewarn |
379 |
+ ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." |
380 |
+ fi |
381 |
+} |
382 |
+ |
383 |
+pkg_postrm() { |
384 |
+ eselect_python_update |
385 |
+} |