1 |
commit: 6aa35701c2806fcc362ae7c95fd40aa0524c1fa9 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 4 16:20:10 2017 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 4 16:20:43 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6aa35701 |
7 |
|
8 |
dev-lang/python: remove old |
9 |
|
10 |
Package-Manager: Portage-2.3.15, Repoman-2.3.6_p7 |
11 |
|
12 |
dev-lang/python/Manifest | 2 - |
13 |
dev-lang/python/python-2.7.12.ebuild | 365 ----------------------------------- |
14 |
dev-lang/python/python-2.7.14.ebuild | 365 ----------------------------------- |
15 |
dev-lang/python/python-3.4.5.ebuild | 357 ---------------------------------- |
16 |
dev-lang/python/python-3.4.6.ebuild | 357 ---------------------------------- |
17 |
dev-lang/python/python-3.5.4.ebuild | 362 ---------------------------------- |
18 |
dev-lang/python/python-3.6.3.ebuild | 342 -------------------------------- |
19 |
7 files changed, 2150 deletions(-) |
20 |
|
21 |
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest |
22 |
index c10bcef21c5..6e6e8f073e0 100644 |
23 |
--- a/dev-lang/python/Manifest |
24 |
+++ b/dev-lang/python/Manifest |
25 |
@@ -1,10 +1,8 @@ |
26 |
-DIST Python-2.7.12.tar.xz 12390820 BLAKE2B 97446bca10005277cf1a92ce7fc9e847d5df93f656a6a3b66e9f064d1c2ba35d5a8b420aaa64b92247d6a3fcd3852876450faebc466c7a8e841fd0c2e62fd306 SHA512 6ddbbce47cc49597433d98ca05c2f62f07ed1070807b645602a8e9e9b996adc6fa66fa20a33cd7d23d4e7e925e25071d7301d288149fbe4e8c5f06d5438dda1f |
27 |
DIST Python-2.7.14.tar.xz 12576112 BLAKE2B e03c4134cfdd88678acc26f383130a598ce4de908ab6bb9ee00e9235de3e0fcb9e653fec86f39db64fb895ef797d33736524655c5b94fab2cde2544b966b2cfb SHA512 78310b0be6388ffa15f29a80afb9ab3c03a572cb094e9da00cfe391afadb51696e41f592eb658d6a31a2f422fdac8a55214a382cbb8cfb43d4a127d5b35ea7f9 |
28 |
DIST Python-3.4.5.tar.xz 14516820 BLAKE2B f9ddabd2df2241089d07756d3a8ba1c70096bee60d7cdef84041edbb20c488c3a573762441a4b7f543dbc0ce403ce84ff7d02e7d25699917bd014ab96deead85 SHA512 b548a5338d141b3086dea372fa2cc245ba5350ee9f0d1304ef6222dc45380b66d380b092e547d54206d56ca68563b95036f445f97f72bb0ef1d48f81a74a3d4c |
29 |
DIST Python-3.4.6.tar.xz 14473592 BLAKE2B 4af4f8e6f5c6831b50e99dd9eef47617f14903dc709f53f833c64726b003e9f84f75be80ba8059dcada2b2f262d65875f70d8c53a163546e51f9a715c68f4f20 SHA512 f6785cf6a99a8a27823baefe59cc20e34cbec01bb444c8600e7f49b5437159d5137f9d80fce26e219846d71bfe98f68bc6f0c87719a34db0050a4eaca95959ac |
30 |
DIST Python-3.5.4.tar.xz 15332320 BLAKE2B 1fc3ba4eb1ed949062961c13fd1f9851c7f9cbeb4916c06a0389349ee2d4872b2b1c2d30138822e6329b6a715f35a66df704b7a04aa4adeb95b685b8d6e45d61 SHA512 dbbe2740ee1cce5404b7b6436a9b3887e15f415a1006efa22014ec7e5b1e48c43eed0ff98f6f5b365c527b8d2525be4ce72bbe404ce71c0835529fcd6f0267ff |
31 |
DIST Python-3.6.3.tar.xz 16974296 BLAKE2B 8220fc0c2eaa315d3972085b0f531f169adb6cfad57023ad2c115603b5a484573ea3540eb3216edd0f4514256c8edb07469cf38d17727d69cdc15cdf1f601623 SHA512 32f24a3adcb7880003c7ecdc5e53e838e774adda76b308961d8215e28db630b2fa2828097817924c76afa4212b2df3362eb64d4e10f37c0147f512ec5aa8662b |
32 |
-DIST python-gentoo-patches-2.7.12-0.tar.xz 13576 BLAKE2B 6ae9fc3e8d3e7dca2e8f5fa6ec9709be9e41982bcd8ca71764766c1a21e596c42d389afd65379c65c469dbbe53918cfa5a23ec7ca7e825f35bc462ff3110f949 SHA512 8bf530fca15c47fa5d9bc958e433b35943a12c98e4172806a45aa60dc85ec92f8ab6ffcd90f752dc5bf8ffc711414894c15820c4b6ef72dbcedc2808119fb1f6 |
33 |
DIST python-gentoo-patches-2.7.14-0.tar.xz 13428 BLAKE2B 0048e48ddaaa4bef08451354fde95a123042880f26dddc9267c7f9a90fd8abb40955e26ee8c9dfc5a1165556bb3e11585b27288e635d42a4000dd3d7654c41ad SHA512 6da5b52065752b54e9215d0f0809c75167dc3690d0e94fa21dd7595626925bc5c1dd065d31b3bd696d7087f3986de145d3a335a29eb7bd77442637a7ec2863c1 |
34 |
DIST python-gentoo-patches-3.4.5-0.tar.xz 12044 BLAKE2B 7fb3cc7dcd987debd5aa263d8e26b21aad439d8e3177c06c3683406a53bbda9652175673b09b6300f6a5b62148190cd8a75c9b65a5de04d770866733fcc0ebcb SHA512 108a4845667ecdf4001fcbeffab0cfbbac87439a449a7351428b0f3e2f159e3848ee0c0dfa45c9fba893b9f9584b33722fc8bb0bd7485a1d0909c3a35ede6ed8 |
35 |
DIST python-gentoo-patches-3.4.6-0.tar.xz 11728 BLAKE2B 2a636f5500f4c7d354f421133f086cba9a25c30d5feaaa2dc25c9c588125d7c9097baecaa11f31548fa598b5dc137ca310ad86222510c0a955fa632a6d0a4b06 SHA512 41c22dc8f1db8800fc0b97eed2b27bf1873e5de1369bd4aecf7a7a91e609a78e45a4b56fc89d575317f33a7704c0c1cad1494e8a993415a198f256e8338f49ab |
36 |
|
37 |
diff --git a/dev-lang/python/python-2.7.12.ebuild b/dev-lang/python/python-2.7.12.ebuild |
38 |
deleted file mode 100644 |
39 |
index f7f4c18b11f..00000000000 |
40 |
--- a/dev-lang/python/python-2.7.12.ebuild |
41 |
+++ /dev/null |
42 |
@@ -1,365 +0,0 @@ |
43 |
-# Copyright 1999-2017 Gentoo Foundation |
44 |
-# Distributed under the terms of the GNU General Public License v2 |
45 |
- |
46 |
-EAPI="5" |
47 |
-WANT_LIBTOOL="none" |
48 |
- |
49 |
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing |
50 |
- |
51 |
-MY_P="Python-${PV}" |
52 |
-PATCHSET_VERSION="2.7.12-0" |
53 |
- |
54 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
55 |
-HOMEPAGE="https://www.python.org/" |
56 |
-SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz |
57 |
- https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" |
58 |
- |
59 |
-LICENSE="PSF-2" |
60 |
-SLOT="2.7" |
61 |
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
62 |
-IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" |
63 |
- |
64 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
65 |
-# If you need to apply a patch which requires python for bootstrapping, please |
66 |
-# run the bootstrap code on your dev box and include the results in the |
67 |
-# patchset. See bug 447752. |
68 |
- |
69 |
-RDEPEND="app-arch/bzip2:0= |
70 |
- >=sys-libs/zlib-1.1.3:0= |
71 |
- virtual/libffi |
72 |
- virtual/libintl |
73 |
- berkdb? ( || ( |
74 |
- sys-libs/db:5.3 |
75 |
- sys-libs/db:5.2 |
76 |
- sys-libs/db:5.1 |
77 |
- sys-libs/db:5.0 |
78 |
- sys-libs/db:4.8 |
79 |
- sys-libs/db:4.7 |
80 |
- sys-libs/db:4.6 |
81 |
- sys-libs/db:4.5 |
82 |
- sys-libs/db:4.4 |
83 |
- sys-libs/db:4.3 |
84 |
- sys-libs/db:4.2 |
85 |
- ) ) |
86 |
- gdbm? ( sys-libs/gdbm:0=[berkdb] ) |
87 |
- ncurses? ( |
88 |
- >=sys-libs/ncurses-5.2:0= |
89 |
- readline? ( >=sys-libs/readline-4.1:0= ) |
90 |
- ) |
91 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
92 |
- ssl? ( |
93 |
- !libressl? ( dev-libs/openssl:0= ) |
94 |
- libressl? ( dev-libs/libressl:= ) |
95 |
- ) |
96 |
- tk? ( |
97 |
- >=dev-lang/tcl-8.0:0= |
98 |
- >=dev-lang/tk-8.0:0= |
99 |
- dev-tcltk/blt:0= |
100 |
- dev-tcltk/tix |
101 |
- ) |
102 |
- xml? ( >=dev-libs/expat-2.1 ) |
103 |
- !!<sys-apps/portage-2.1.9" |
104 |
-DEPEND="${RDEPEND} |
105 |
- virtual/pkgconfig |
106 |
- >=sys-devel/autoconf-2.65 |
107 |
- !sys-devel/gcc[libffi(-)]" |
108 |
-RDEPEND+=" !build? ( app-misc/mime-types ) |
109 |
- doc? ( dev-python/python-docs:${SLOT} )" |
110 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
111 |
- |
112 |
-S="${WORKDIR}/${MY_P}" |
113 |
- |
114 |
-pkg_setup() { |
115 |
- if use berkdb; then |
116 |
- ewarn "'bsddb' module is out-of-date and no longer maintained inside" |
117 |
- ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally" |
118 |
- ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module" |
119 |
- ewarn "is provided by dev-python/bsddb3." |
120 |
- else |
121 |
- if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then |
122 |
- ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]" |
123 |
- ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]." |
124 |
- ewarn "You might need to migrate your databases." |
125 |
- fi |
126 |
- fi |
127 |
-} |
128 |
- |
129 |
-src_prepare() { |
130 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
131 |
- rm -r Modules/expat || die |
132 |
- rm -r Modules/_ctypes/libffi* || die |
133 |
- rm -r Modules/zlib || die |
134 |
- |
135 |
- if tc-is-cross-compiler; then |
136 |
- local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch" |
137 |
- fi |
138 |
- |
139 |
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" |
140 |
- |
141 |
- # Fix for cross-compiling. |
142 |
- epatch "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch" |
143 |
- epatch "${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch" |
144 |
- epatch "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch" |
145 |
- epatch "${FILESDIR}/python-2.7.10-system-libffi.patch" |
146 |
- |
147 |
- epatch_user |
148 |
- |
149 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
150 |
- Lib/distutils/command/install.py \ |
151 |
- Lib/distutils/sysconfig.py \ |
152 |
- Lib/site.py \ |
153 |
- Lib/sysconfig.py \ |
154 |
- Lib/test/test_site.py \ |
155 |
- Makefile.pre.in \ |
156 |
- Modules/Setup.dist \ |
157 |
- Modules/getpath.c \ |
158 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
159 |
- |
160 |
- eautoreconf |
161 |
-} |
162 |
- |
163 |
-src_configure() { |
164 |
- # dbm module can be linked against berkdb or gdbm. |
165 |
- # Defaults to gdbm when both are enabled, #204343. |
166 |
- local disable |
167 |
- use berkdb || use gdbm || disable+=" dbm" |
168 |
- use berkdb || disable+=" _bsddb" |
169 |
- use gdbm || disable+=" gdbm" |
170 |
- use ncurses || disable+=" _curses _curses_panel" |
171 |
- use readline || disable+=" readline" |
172 |
- use sqlite || disable+=" _sqlite3" |
173 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
174 |
- use tk || disable+=" _tkinter" |
175 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
176 |
- export PYTHON_DISABLE_MODULES="${disable}" |
177 |
- |
178 |
- if ! use xml; then |
179 |
- ewarn "You have configured Python without XML support." |
180 |
- ewarn "This is NOT a recommended configuration as you" |
181 |
- ewarn "may face problems parsing any XML documents." |
182 |
- fi |
183 |
- |
184 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
185 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
186 |
- fi |
187 |
- |
188 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
189 |
- append-flags -fwrapv |
190 |
- fi |
191 |
- |
192 |
- filter-flags -malign-double |
193 |
- |
194 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
195 |
- if is-flagq -O3; then |
196 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
197 |
- use hardened && replace-flags -O3 -O2 |
198 |
- fi |
199 |
- |
200 |
- if tc-is-cross-compiler; then |
201 |
- # Force some tests that try to poke fs paths. |
202 |
- export ac_cv_file__dev_ptc=no |
203 |
- export ac_cv_file__dev_ptmx=yes |
204 |
- fi |
205 |
- |
206 |
- # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. |
207 |
- tc-export CXX |
208 |
- # The configure script fails to use pkg-config correctly. |
209 |
- # http://bugs.python.org/issue15506 |
210 |
- export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) |
211 |
- |
212 |
- # Set LDFLAGS so we link modules with -lpython2.7 correctly. |
213 |
- # Needed on FreeBSD unless Python 2.7 is already installed. |
214 |
- # Please query BSD team before removing this! |
215 |
- append-ldflags "-L." |
216 |
- |
217 |
- local dbmliborder |
218 |
- if use gdbm; then |
219 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
220 |
- fi |
221 |
- if use berkdb; then |
222 |
- dbmliborder+="${dbmliborder:+:}bdb" |
223 |
- fi |
224 |
- |
225 |
- BUILD_DIR="${WORKDIR}/${CHOST}" |
226 |
- mkdir -p "${BUILD_DIR}" || die |
227 |
- cd "${BUILD_DIR}" || die |
228 |
- |
229 |
- ECONF_SOURCE="${S}" OPT="" \ |
230 |
- econf \ |
231 |
- --with-fpectl \ |
232 |
- --enable-shared \ |
233 |
- $(use_enable ipv6) \ |
234 |
- $(use_with threads) \ |
235 |
- $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \ |
236 |
- --infodir='${prefix}/share/info' \ |
237 |
- --mandir='${prefix}/share/man' \ |
238 |
- --with-computed-gotos \ |
239 |
- --with-dbmliborder="${dbmliborder}" \ |
240 |
- --with-libc="" \ |
241 |
- --enable-loadable-sqlite-extensions \ |
242 |
- --with-system-expat \ |
243 |
- --with-system-ffi \ |
244 |
- --without-ensurepip |
245 |
- |
246 |
- if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
247 |
- eerror "configure has detected that the sem_open function is broken." |
248 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
249 |
- die "Broken sem_open function (bug 496328)" |
250 |
- fi |
251 |
-} |
252 |
- |
253 |
-src_compile() { |
254 |
- # Avoid invoking pgen for cross-compiles. |
255 |
- touch Include/graminit.h Python/graminit.c |
256 |
- |
257 |
- cd "${BUILD_DIR}" || die |
258 |
- emake |
259 |
- |
260 |
- # Work around bug 329499. See also bug 413751 and 457194. |
261 |
- if has_version dev-libs/libffi[pax_kernel]; then |
262 |
- pax-mark E python |
263 |
- else |
264 |
- pax-mark m python |
265 |
- fi |
266 |
-} |
267 |
- |
268 |
-src_test() { |
269 |
- # Tests will not work when cross compiling. |
270 |
- if tc-is-cross-compiler; then |
271 |
- elog "Disabling tests due to crosscompiling." |
272 |
- return |
273 |
- fi |
274 |
- |
275 |
- cd "${BUILD_DIR}" || die |
276 |
- |
277 |
- # Skip failing tests. |
278 |
- local skipped_tests="distutils gdb" |
279 |
- |
280 |
- for test in ${skipped_tests}; do |
281 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
282 |
- done |
283 |
- |
284 |
- # Daylight saving time problem |
285 |
- # https://bugs.python.org/issue22067 |
286 |
- # https://bugs.gentoo.org/610628 |
287 |
- local -x TZ=UTC |
288 |
- |
289 |
- # Rerun failed tests in verbose mode (regrtest -w). |
290 |
- emake test EXTRATESTOPTS="-w" < /dev/tty |
291 |
- local result="$?" |
292 |
- |
293 |
- for test in ${skipped_tests}; do |
294 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
295 |
- done |
296 |
- |
297 |
- elog "The following tests have been skipped:" |
298 |
- for test in ${skipped_tests}; do |
299 |
- elog "test_${test}.py" |
300 |
- done |
301 |
- |
302 |
- elog "If you would like to run them, you may:" |
303 |
- elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" |
304 |
- elog "and run the tests separately." |
305 |
- |
306 |
- if [[ "${result}" -ne 0 ]]; then |
307 |
- die "emake test failed" |
308 |
- fi |
309 |
-} |
310 |
- |
311 |
-src_install() { |
312 |
- local libdir=${ED}/usr/$(get_libdir)/python${SLOT} |
313 |
- |
314 |
- cd "${BUILD_DIR}" || die |
315 |
- emake DESTDIR="${D}" altinstall |
316 |
- |
317 |
- sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed" |
318 |
- |
319 |
- # Fix collisions between different slots of Python. |
320 |
- mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" |
321 |
- mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" |
322 |
- mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" |
323 |
- rm -f "${ED}usr/bin/smtpd.py" |
324 |
- |
325 |
- use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py,test/test_bsddb*} || die |
326 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
327 |
- use tk || rm -r "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die |
328 |
- use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} |
329 |
- |
330 |
- use threads || rm -r "${libdir}/multiprocessing" || die |
331 |
- use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die |
332 |
- |
333 |
- dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
334 |
- |
335 |
- if use examples; then |
336 |
- insinto /usr/share/doc/${PF}/examples |
337 |
- doins -r "${S}"/Tools |
338 |
- fi |
339 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
340 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
341 |
- emake --no-print-directory -s -f - 2>/dev/null) |
342 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
343 |
- |
344 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} |
345 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} |
346 |
- sed \ |
347 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ |
348 |
- -e "s:@PYDOC@:pydoc${SLOT}:" \ |
349 |
- -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" |
350 |
- |
351 |
- # for python-exec |
352 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
353 |
- |
354 |
- # if not using a cross-compiler, use the fresh binary |
355 |
- if ! tc-is-cross-compiler; then |
356 |
- local -x PYTHON=./python |
357 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. |
358 |
- else |
359 |
- vars=( PYTHON "${vars[@]}" ) |
360 |
- fi |
361 |
- |
362 |
- python_export "python${SLOT}" "${vars[@]}" |
363 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
364 |
- python_domodule epython.py |
365 |
- |
366 |
- # python-exec wrapping support |
367 |
- local pymajor=${SLOT%.*} |
368 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
369 |
- # python and pythonX |
370 |
- ln -s "../../../bin/python${SLOT}" \ |
371 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
372 |
- ln -s "python${pymajor}" \ |
373 |
- "${D}${PYTHON_SCRIPTDIR}/python" || die |
374 |
- # python-config and pythonX-config |
375 |
- ln -s "../../../bin/python${SLOT}-config" \ |
376 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
377 |
- ln -s "python${pymajor}-config" \ |
378 |
- "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
379 |
- # 2to3, pydoc, pyvenv |
380 |
- ln -s "../../../bin/2to3-${SLOT}" \ |
381 |
- "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
382 |
- ln -s "../../../bin/pydoc${SLOT}" \ |
383 |
- "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
384 |
- # idle |
385 |
- if use tk; then |
386 |
- ln -s "../../../bin/idle${SLOT}" \ |
387 |
- "${D}${PYTHON_SCRIPTDIR}/idle" || die |
388 |
- fi |
389 |
-} |
390 |
- |
391 |
-eselect_python_update() { |
392 |
- if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
393 |
- eselect python update |
394 |
- fi |
395 |
- |
396 |
- if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
397 |
- eselect python update --python${PV%%.*} |
398 |
- fi |
399 |
-} |
400 |
- |
401 |
-pkg_postinst() { |
402 |
- eselect_python_update |
403 |
-} |
404 |
- |
405 |
-pkg_postrm() { |
406 |
- eselect_python_update |
407 |
-} |
408 |
|
409 |
diff --git a/dev-lang/python/python-2.7.14.ebuild b/dev-lang/python/python-2.7.14.ebuild |
410 |
deleted file mode 100644 |
411 |
index f44a2137ff3..00000000000 |
412 |
--- a/dev-lang/python/python-2.7.14.ebuild |
413 |
+++ /dev/null |
414 |
@@ -1,365 +0,0 @@ |
415 |
-# Copyright 1999-2017 Gentoo Foundation |
416 |
-# Distributed under the terms of the GNU General Public License v2 |
417 |
- |
418 |
-EAPI="5" |
419 |
-WANT_LIBTOOL="none" |
420 |
- |
421 |
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing |
422 |
- |
423 |
-MY_P="Python-${PV}" |
424 |
-PATCHSET_VERSION="2.7.14-0" |
425 |
- |
426 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
427 |
-HOMEPAGE="https://www.python.org/" |
428 |
-SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz |
429 |
- https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" |
430 |
- |
431 |
-LICENSE="PSF-2" |
432 |
-SLOT="2.7" |
433 |
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
434 |
-IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" |
435 |
- |
436 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
437 |
-# If you need to apply a patch which requires python for bootstrapping, please |
438 |
-# run the bootstrap code on your dev box and include the results in the |
439 |
-# patchset. See bug 447752. |
440 |
- |
441 |
-RDEPEND="app-arch/bzip2:0= |
442 |
- >=sys-libs/zlib-1.1.3:0= |
443 |
- virtual/libffi |
444 |
- virtual/libintl |
445 |
- berkdb? ( || ( |
446 |
- sys-libs/db:5.3 |
447 |
- sys-libs/db:5.2 |
448 |
- sys-libs/db:5.1 |
449 |
- sys-libs/db:5.0 |
450 |
- sys-libs/db:4.8 |
451 |
- sys-libs/db:4.7 |
452 |
- sys-libs/db:4.6 |
453 |
- sys-libs/db:4.5 |
454 |
- sys-libs/db:4.4 |
455 |
- sys-libs/db:4.3 |
456 |
- sys-libs/db:4.2 |
457 |
- ) ) |
458 |
- gdbm? ( sys-libs/gdbm:0=[berkdb] ) |
459 |
- ncurses? ( |
460 |
- >=sys-libs/ncurses-5.2:0= |
461 |
- readline? ( >=sys-libs/readline-4.1:0= ) |
462 |
- ) |
463 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
464 |
- ssl? ( |
465 |
- !libressl? ( dev-libs/openssl:0= ) |
466 |
- libressl? ( dev-libs/libressl:= ) |
467 |
- ) |
468 |
- tk? ( |
469 |
- >=dev-lang/tcl-8.0:0= |
470 |
- >=dev-lang/tk-8.0:0= |
471 |
- dev-tcltk/blt:0= |
472 |
- dev-tcltk/tix |
473 |
- ) |
474 |
- xml? ( >=dev-libs/expat-2.1 ) |
475 |
- !!<sys-apps/portage-2.1.9" |
476 |
-DEPEND="${RDEPEND} |
477 |
- virtual/pkgconfig |
478 |
- >=sys-devel/autoconf-2.65 |
479 |
- !sys-devel/gcc[libffi(-)]" |
480 |
-RDEPEND+=" !build? ( app-misc/mime-types ) |
481 |
- doc? ( dev-python/python-docs:${SLOT} )" |
482 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
483 |
- |
484 |
-S="${WORKDIR}/${MY_P}" |
485 |
- |
486 |
-pkg_setup() { |
487 |
- if use berkdb; then |
488 |
- ewarn "'bsddb' module is out-of-date and no longer maintained inside" |
489 |
- ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally" |
490 |
- ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module" |
491 |
- ewarn "is provided by dev-python/bsddb3." |
492 |
- else |
493 |
- if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then |
494 |
- ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]" |
495 |
- ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]." |
496 |
- ewarn "You might need to migrate your databases." |
497 |
- fi |
498 |
- fi |
499 |
-} |
500 |
- |
501 |
-src_prepare() { |
502 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
503 |
- rm -r Modules/expat || die |
504 |
- rm -r Modules/_ctypes/libffi* || die |
505 |
- rm -r Modules/zlib || die |
506 |
- |
507 |
- if tc-is-cross-compiler; then |
508 |
- local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch" |
509 |
- fi |
510 |
- |
511 |
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" |
512 |
- |
513 |
- # Fix for cross-compiling. |
514 |
- epatch "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch" |
515 |
- epatch "${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch" |
516 |
- epatch "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch" |
517 |
- epatch "${FILESDIR}/python-2.7.10-system-libffi.patch" |
518 |
- |
519 |
- epatch_user |
520 |
- |
521 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
522 |
- Lib/distutils/command/install.py \ |
523 |
- Lib/distutils/sysconfig.py \ |
524 |
- Lib/site.py \ |
525 |
- Lib/sysconfig.py \ |
526 |
- Lib/test/test_site.py \ |
527 |
- Makefile.pre.in \ |
528 |
- Modules/Setup.dist \ |
529 |
- Modules/getpath.c \ |
530 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
531 |
- |
532 |
- eautoreconf |
533 |
-} |
534 |
- |
535 |
-src_configure() { |
536 |
- # dbm module can be linked against berkdb or gdbm. |
537 |
- # Defaults to gdbm when both are enabled, #204343. |
538 |
- local disable |
539 |
- use berkdb || use gdbm || disable+=" dbm" |
540 |
- use berkdb || disable+=" _bsddb" |
541 |
- use gdbm || disable+=" gdbm" |
542 |
- use ncurses || disable+=" _curses _curses_panel" |
543 |
- use readline || disable+=" readline" |
544 |
- use sqlite || disable+=" _sqlite3" |
545 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
546 |
- use tk || disable+=" _tkinter" |
547 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
548 |
- export PYTHON_DISABLE_MODULES="${disable}" |
549 |
- |
550 |
- if ! use xml; then |
551 |
- ewarn "You have configured Python without XML support." |
552 |
- ewarn "This is NOT a recommended configuration as you" |
553 |
- ewarn "may face problems parsing any XML documents." |
554 |
- fi |
555 |
- |
556 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
557 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
558 |
- fi |
559 |
- |
560 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
561 |
- append-flags -fwrapv |
562 |
- fi |
563 |
- |
564 |
- filter-flags -malign-double |
565 |
- |
566 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
567 |
- if is-flagq -O3; then |
568 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
569 |
- use hardened && replace-flags -O3 -O2 |
570 |
- fi |
571 |
- |
572 |
- if tc-is-cross-compiler; then |
573 |
- # Force some tests that try to poke fs paths. |
574 |
- export ac_cv_file__dev_ptc=no |
575 |
- export ac_cv_file__dev_ptmx=yes |
576 |
- fi |
577 |
- |
578 |
- # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. |
579 |
- tc-export CXX |
580 |
- # The configure script fails to use pkg-config correctly. |
581 |
- # http://bugs.python.org/issue15506 |
582 |
- export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) |
583 |
- |
584 |
- # Set LDFLAGS so we link modules with -lpython2.7 correctly. |
585 |
- # Needed on FreeBSD unless Python 2.7 is already installed. |
586 |
- # Please query BSD team before removing this! |
587 |
- append-ldflags "-L." |
588 |
- |
589 |
- local dbmliborder |
590 |
- if use gdbm; then |
591 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
592 |
- fi |
593 |
- if use berkdb; then |
594 |
- dbmliborder+="${dbmliborder:+:}bdb" |
595 |
- fi |
596 |
- |
597 |
- BUILD_DIR="${WORKDIR}/${CHOST}" |
598 |
- mkdir -p "${BUILD_DIR}" || die |
599 |
- cd "${BUILD_DIR}" || die |
600 |
- |
601 |
- ECONF_SOURCE="${S}" OPT="" \ |
602 |
- econf \ |
603 |
- --with-fpectl \ |
604 |
- --enable-shared \ |
605 |
- $(use_enable ipv6) \ |
606 |
- $(use_with threads) \ |
607 |
- $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \ |
608 |
- --infodir='${prefix}/share/info' \ |
609 |
- --mandir='${prefix}/share/man' \ |
610 |
- --with-computed-gotos \ |
611 |
- --with-dbmliborder="${dbmliborder}" \ |
612 |
- --with-libc="" \ |
613 |
- --enable-loadable-sqlite-extensions \ |
614 |
- --with-system-expat \ |
615 |
- --with-system-ffi \ |
616 |
- --without-ensurepip |
617 |
- |
618 |
- if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
619 |
- eerror "configure has detected that the sem_open function is broken." |
620 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
621 |
- die "Broken sem_open function (bug 496328)" |
622 |
- fi |
623 |
-} |
624 |
- |
625 |
-src_compile() { |
626 |
- # Avoid invoking pgen for cross-compiles. |
627 |
- touch Include/graminit.h Python/graminit.c |
628 |
- |
629 |
- cd "${BUILD_DIR}" || die |
630 |
- emake |
631 |
- |
632 |
- # Work around bug 329499. See also bug 413751 and 457194. |
633 |
- if has_version dev-libs/libffi[pax_kernel]; then |
634 |
- pax-mark E python |
635 |
- else |
636 |
- pax-mark m python |
637 |
- fi |
638 |
-} |
639 |
- |
640 |
-src_test() { |
641 |
- # Tests will not work when cross compiling. |
642 |
- if tc-is-cross-compiler; then |
643 |
- elog "Disabling tests due to crosscompiling." |
644 |
- return |
645 |
- fi |
646 |
- |
647 |
- cd "${BUILD_DIR}" || die |
648 |
- |
649 |
- # Skip failing tests. |
650 |
- local skipped_tests="distutils gdb" |
651 |
- |
652 |
- for test in ${skipped_tests}; do |
653 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
654 |
- done |
655 |
- |
656 |
- # Daylight saving time problem |
657 |
- # https://bugs.python.org/issue22067 |
658 |
- # https://bugs.gentoo.org/610628 |
659 |
- local -x TZ=UTC |
660 |
- |
661 |
- # Rerun failed tests in verbose mode (regrtest -w). |
662 |
- emake test EXTRATESTOPTS="-w" < /dev/tty |
663 |
- local result="$?" |
664 |
- |
665 |
- for test in ${skipped_tests}; do |
666 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
667 |
- done |
668 |
- |
669 |
- elog "The following tests have been skipped:" |
670 |
- for test in ${skipped_tests}; do |
671 |
- elog "test_${test}.py" |
672 |
- done |
673 |
- |
674 |
- elog "If you would like to run them, you may:" |
675 |
- elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" |
676 |
- elog "and run the tests separately." |
677 |
- |
678 |
- if [[ "${result}" -ne 0 ]]; then |
679 |
- die "emake test failed" |
680 |
- fi |
681 |
-} |
682 |
- |
683 |
-src_install() { |
684 |
- local libdir=${ED}/usr/$(get_libdir)/python${SLOT} |
685 |
- |
686 |
- cd "${BUILD_DIR}" || die |
687 |
- emake DESTDIR="${D}" altinstall |
688 |
- |
689 |
- sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed" |
690 |
- |
691 |
- # Fix collisions between different slots of Python. |
692 |
- mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" |
693 |
- mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" |
694 |
- mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" |
695 |
- rm -f "${ED}usr/bin/smtpd.py" |
696 |
- |
697 |
- use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die |
698 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
699 |
- use tk || rm -r "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die |
700 |
- use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} |
701 |
- |
702 |
- use threads || rm -r "${libdir}/multiprocessing" || die |
703 |
- use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die |
704 |
- |
705 |
- dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
706 |
- |
707 |
- if use examples; then |
708 |
- insinto /usr/share/doc/${PF}/examples |
709 |
- doins -r "${S}"/Tools |
710 |
- fi |
711 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
712 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
713 |
- emake --no-print-directory -s -f - 2>/dev/null) |
714 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
715 |
- |
716 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} |
717 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} |
718 |
- sed \ |
719 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ |
720 |
- -e "s:@PYDOC@:pydoc${SLOT}:" \ |
721 |
- -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" |
722 |
- |
723 |
- # for python-exec |
724 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
725 |
- |
726 |
- # if not using a cross-compiler, use the fresh binary |
727 |
- if ! tc-is-cross-compiler; then |
728 |
- local -x PYTHON=./python |
729 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
730 |
- else |
731 |
- vars=( PYTHON "${vars[@]}" ) |
732 |
- fi |
733 |
- |
734 |
- python_export "python${SLOT}" "${vars[@]}" |
735 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
736 |
- python_domodule epython.py |
737 |
- |
738 |
- # python-exec wrapping support |
739 |
- local pymajor=${SLOT%.*} |
740 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
741 |
- # python and pythonX |
742 |
- ln -s "../../../bin/python${SLOT}" \ |
743 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
744 |
- ln -s "python${pymajor}" \ |
745 |
- "${D}${PYTHON_SCRIPTDIR}/python" || die |
746 |
- # python-config and pythonX-config |
747 |
- ln -s "../../../bin/python${SLOT}-config" \ |
748 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
749 |
- ln -s "python${pymajor}-config" \ |
750 |
- "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
751 |
- # 2to3, pydoc, pyvenv |
752 |
- ln -s "../../../bin/2to3-${SLOT}" \ |
753 |
- "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
754 |
- ln -s "../../../bin/pydoc${SLOT}" \ |
755 |
- "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
756 |
- # idle |
757 |
- if use tk; then |
758 |
- ln -s "../../../bin/idle${SLOT}" \ |
759 |
- "${D}${PYTHON_SCRIPTDIR}/idle" || die |
760 |
- fi |
761 |
-} |
762 |
- |
763 |
-eselect_python_update() { |
764 |
- if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
765 |
- eselect python update |
766 |
- fi |
767 |
- |
768 |
- if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
769 |
- eselect python update --python${PV%%.*} |
770 |
- fi |
771 |
-} |
772 |
- |
773 |
-pkg_postinst() { |
774 |
- eselect_python_update |
775 |
-} |
776 |
- |
777 |
-pkg_postrm() { |
778 |
- eselect_python_update |
779 |
-} |
780 |
|
781 |
diff --git a/dev-lang/python/python-3.4.5.ebuild b/dev-lang/python/python-3.4.5.ebuild |
782 |
deleted file mode 100644 |
783 |
index 29991dd53ae..00000000000 |
784 |
--- a/dev-lang/python/python-3.4.5.ebuild |
785 |
+++ /dev/null |
786 |
@@ -1,357 +0,0 @@ |
787 |
-# Copyright 1999-2017 Gentoo Foundation |
788 |
-# Distributed under the terms of the GNU General Public License v2 |
789 |
- |
790 |
-EAPI="5" |
791 |
-WANT_LIBTOOL="none" |
792 |
- |
793 |
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing |
794 |
- |
795 |
-MY_P="Python-${PV/_/}" |
796 |
-PATCHSET_VERSION="3.4.5-0" |
797 |
- |
798 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
799 |
-HOMEPAGE="https://www.python.org/" |
800 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz |
801 |
- https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" |
802 |
- |
803 |
-LICENSE="PSF-2" |
804 |
-SLOT="3.4/3.4m" |
805 |
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
806 |
-IUSE="build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml" |
807 |
- |
808 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
809 |
-# If you need to apply a patch which requires python for bootstrapping, please |
810 |
-# run the bootstrap code on your dev box and include the results in the |
811 |
-# patchset. See bug 447752. |
812 |
- |
813 |
-RDEPEND="app-arch/bzip2:0= |
814 |
- app-arch/xz-utils:0= |
815 |
- >=sys-libs/zlib-1.1.3:0= |
816 |
- virtual/libffi |
817 |
- virtual/libintl |
818 |
- gdbm? ( sys-libs/gdbm:0=[berkdb] ) |
819 |
- ncurses? ( |
820 |
- >=sys-libs/ncurses-5.2:0= |
821 |
- readline? ( >=sys-libs/readline-4.1:0= ) |
822 |
- ) |
823 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
824 |
- ssl? ( |
825 |
- !libressl? ( dev-libs/openssl:0= ) |
826 |
- libressl? ( dev-libs/libressl:= ) |
827 |
- ) |
828 |
- tk? ( |
829 |
- >=dev-lang/tcl-8.0:0= |
830 |
- >=dev-lang/tk-8.0:0= |
831 |
- dev-tcltk/blt:0= |
832 |
- dev-tcltk/tix |
833 |
- ) |
834 |
- xml? ( >=dev-libs/expat-2.1:0= ) |
835 |
- !!<sys-apps/sandbox-2.6-r1" |
836 |
-DEPEND="${RDEPEND} |
837 |
- virtual/pkgconfig |
838 |
- >=sys-devel/autoconf-2.65 |
839 |
- !sys-devel/gcc[libffi(-)]" |
840 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
841 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
842 |
- |
843 |
-S="${WORKDIR}/${MY_P}" |
844 |
- |
845 |
-PYVER=${SLOT%/*} |
846 |
- |
847 |
-src_prepare() { |
848 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
849 |
- rm -fr Modules/expat |
850 |
- rm -fr Modules/_ctypes/libffi* |
851 |
- rm -fr Modules/zlib |
852 |
- |
853 |
- if tc-is-cross-compiler; then |
854 |
- # Invokes BUILDPYTHON, which is built for the host arch |
855 |
- local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch" |
856 |
- fi |
857 |
- |
858 |
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" |
859 |
- epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch" |
860 |
- epatch "${FILESDIR}/${PN}-3.4.5-cross.patch" |
861 |
- epatch "${FILESDIR}/3.4-getentropy-linux.patch" |
862 |
- |
863 |
- epatch_user |
864 |
- |
865 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
866 |
- configure.ac \ |
867 |
- Lib/distutils/command/install.py \ |
868 |
- Lib/distutils/sysconfig.py \ |
869 |
- Lib/site.py \ |
870 |
- Lib/sysconfig.py \ |
871 |
- Lib/test/test_site.py \ |
872 |
- Makefile.pre.in \ |
873 |
- Modules/Setup.dist \ |
874 |
- Modules/getpath.c \ |
875 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
876 |
- |
877 |
- eautoreconf |
878 |
-} |
879 |
- |
880 |
-src_configure() { |
881 |
- local disable |
882 |
- use gdbm || disable+=" gdbm" |
883 |
- use ncurses || disable+=" _curses _curses_panel" |
884 |
- use readline || disable+=" readline" |
885 |
- use sqlite || disable+=" _sqlite3" |
886 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
887 |
- use tk || disable+=" _tkinter" |
888 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
889 |
- export PYTHON_DISABLE_MODULES="${disable}" |
890 |
- |
891 |
- if ! use xml; then |
892 |
- ewarn "You have configured Python without XML support." |
893 |
- ewarn "This is NOT a recommended configuration as you" |
894 |
- ewarn "may face problems parsing any XML documents." |
895 |
- fi |
896 |
- |
897 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
898 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
899 |
- fi |
900 |
- |
901 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
902 |
- append-flags -fwrapv |
903 |
- fi |
904 |
- |
905 |
- filter-flags -malign-double |
906 |
- |
907 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
908 |
- if is-flagq -O3; then |
909 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
910 |
- use hardened && replace-flags -O3 -O2 |
911 |
- fi |
912 |
- |
913 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
914 |
- tc-export CXX |
915 |
- |
916 |
- # The configure script fails to use pkg-config correctly. |
917 |
- # http://bugs.python.org/issue15506 |
918 |
- export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) |
919 |
- |
920 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
921 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
922 |
- # Please query BSD team before removing this! |
923 |
- append-ldflags "-L." |
924 |
- |
925 |
- local dbmliborder |
926 |
- if use gdbm; then |
927 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
928 |
- fi |
929 |
- |
930 |
- BUILD_DIR="${WORKDIR}/${CHOST}" |
931 |
- mkdir -p "${BUILD_DIR}" || die |
932 |
- cd "${BUILD_DIR}" || die |
933 |
- |
934 |
- ECONF_SOURCE="${S}" OPT="" \ |
935 |
- econf \ |
936 |
- --with-fpectl \ |
937 |
- --enable-shared \ |
938 |
- $(use_enable ipv6) \ |
939 |
- $(use_with threads) \ |
940 |
- --infodir='${prefix}/share/info' \ |
941 |
- --mandir='${prefix}/share/man' \ |
942 |
- --with-computed-gotos \ |
943 |
- --with-dbmliborder="${dbmliborder}" \ |
944 |
- --with-libc="" \ |
945 |
- --enable-loadable-sqlite-extensions \ |
946 |
- --with-system-expat \ |
947 |
- --with-system-ffi \ |
948 |
- --without-ensurepip |
949 |
- |
950 |
- if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
951 |
- eerror "configure has detected that the sem_open function is broken." |
952 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
953 |
- die "Broken sem_open function (bug 496328)" |
954 |
- fi |
955 |
-} |
956 |
- |
957 |
-src_compile() { |
958 |
- # Ensure sed works as expected |
959 |
- # https://bugs.gentoo.org/594768 |
960 |
- local -x LC_ALL=C |
961 |
- |
962 |
- # Avoid invoking pgen for cross-compiles. |
963 |
- touch Include/graminit.h Python/graminit.c || die |
964 |
- |
965 |
- cd "${BUILD_DIR}" || die |
966 |
- |
967 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
968 |
- |
969 |
- # Work around bug 329499. See also bug 413751 and 457194. |
970 |
- if has_version dev-libs/libffi[pax_kernel]; then |
971 |
- pax-mark E python |
972 |
- else |
973 |
- pax-mark m python |
974 |
- fi |
975 |
-} |
976 |
- |
977 |
-src_test() { |
978 |
- # Tests will not work when cross compiling. |
979 |
- if tc-is-cross-compiler; then |
980 |
- elog "Disabling tests due to crosscompiling." |
981 |
- return |
982 |
- fi |
983 |
- |
984 |
- cd "${BUILD_DIR}" || die |
985 |
- |
986 |
- # Skip failing tests. |
987 |
- local skipped_tests="gdb" |
988 |
- |
989 |
- for test in ${skipped_tests}; do |
990 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
991 |
- done |
992 |
- |
993 |
- local -x PYTHONDONTWRITEBYTECODE= |
994 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
995 |
- local result=$? |
996 |
- |
997 |
- for test in ${skipped_tests}; do |
998 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
999 |
- done |
1000 |
- |
1001 |
- elog "The following tests have been skipped:" |
1002 |
- for test in ${skipped_tests}; do |
1003 |
- elog "test_${test}.py" |
1004 |
- done |
1005 |
- |
1006 |
- elog "If you would like to run them, you may:" |
1007 |
- elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" |
1008 |
- elog "and run the tests separately." |
1009 |
- |
1010 |
- if [[ ${result} -ne 0 ]]; then |
1011 |
- die "emake test failed" |
1012 |
- fi |
1013 |
-} |
1014 |
- |
1015 |
-src_install() { |
1016 |
- local libdir=${ED}/usr/$(get_libdir)/python${PYVER} |
1017 |
- |
1018 |
- cd "${BUILD_DIR}" || die |
1019 |
- |
1020 |
- emake DESTDIR="${D}" altinstall |
1021 |
- |
1022 |
- sed \ |
1023 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
1024 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
1025 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
1026 |
- |
1027 |
- # Fix collisions between different slots of Python. |
1028 |
- rm -f "${ED}usr/$(get_libdir)/libpython3.so" |
1029 |
- |
1030 |
- # Cheap hack to get version with ABIFLAGS |
1031 |
- local abiver=$(cd "${ED}usr/include"; echo python*) |
1032 |
- if [[ ${abiver} != python${PYVER} ]]; then |
1033 |
- # Replace python3.X with a symlink to python3.Xm |
1034 |
- rm "${ED}usr/bin/python${PYVER}" || die |
1035 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
1036 |
- # Create python3.X-config symlink |
1037 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
1038 |
- # Create python-3.5m.pc symlink |
1039 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
1040 |
- fi |
1041 |
- |
1042 |
- use elibc_uclibc && rm -fr "${libdir}/test" |
1043 |
- use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} |
1044 |
- use tk || rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} |
1045 |
- |
1046 |
- use threads || rm -fr "${libdir}/multiprocessing" |
1047 |
- use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe |
1048 |
- |
1049 |
- dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
1050 |
- |
1051 |
- if use examples; then |
1052 |
- insinto /usr/share/doc/${PF}/examples |
1053 |
- find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr |
1054 |
- doins -r "${S}"/Tools |
1055 |
- fi |
1056 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
1057 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
1058 |
- emake --no-print-directory -s -f - 2>/dev/null) |
1059 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
1060 |
- |
1061 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
1062 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
1063 |
- sed \ |
1064 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
1065 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
1066 |
- -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed" |
1067 |
- |
1068 |
- # for python-exec |
1069 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
1070 |
- |
1071 |
- # if not using a cross-compiler, use the fresh binary |
1072 |
- if ! tc-is-cross-compiler; then |
1073 |
- local -x PYTHON=./python |
1074 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
1075 |
- else |
1076 |
- vars=( PYTHON "${vars[@]}" ) |
1077 |
- fi |
1078 |
- |
1079 |
- python_export "python${PYVER}" "${vars[@]}" |
1080 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
1081 |
- python_domodule epython.py |
1082 |
- |
1083 |
- # python-exec wrapping support |
1084 |
- local pymajor=${PYVER%.*} |
1085 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
1086 |
- # python and pythonX |
1087 |
- ln -s "../../../bin/${abiver}" \ |
1088 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
1089 |
- ln -s "python${pymajor}" \ |
1090 |
- "${D}${PYTHON_SCRIPTDIR}/python" || die |
1091 |
- # python-config and pythonX-config |
1092 |
- # note: we need to create a wrapper rather than symlinking it due |
1093 |
- # to some random dirname(argv[0]) magic performed by python-config |
1094 |
- cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die |
1095 |
- #!/bin/sh |
1096 |
- exec "${abiver}-config" "\${@}" |
1097 |
- EOF |
1098 |
- chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
1099 |
- ln -s "python${pymajor}-config" \ |
1100 |
- "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
1101 |
- # 2to3, pydoc, pyvenv |
1102 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
1103 |
- "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
1104 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
1105 |
- "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
1106 |
- ln -s "../../../bin/pyvenv-${PYVER}" \ |
1107 |
- "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die |
1108 |
- # idle |
1109 |
- if use tk; then |
1110 |
- ln -s "../../../bin/idle${PYVER}" \ |
1111 |
- "${D}${PYTHON_SCRIPTDIR}/idle" || die |
1112 |
- fi |
1113 |
-} |
1114 |
- |
1115 |
-pkg_preinst() { |
1116 |
- if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then |
1117 |
- python_updater_warning="1" |
1118 |
- fi |
1119 |
-} |
1120 |
- |
1121 |
-eselect_python_update() { |
1122 |
- if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
1123 |
- eselect python update |
1124 |
- fi |
1125 |
- |
1126 |
- if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
1127 |
- eselect python update --python${PV%%.*} |
1128 |
- fi |
1129 |
-} |
1130 |
- |
1131 |
-pkg_postinst() { |
1132 |
- eselect_python_update |
1133 |
- |
1134 |
- if [[ "${python_updater_warning}" == "1" ]]; then |
1135 |
- ewarn "You have just upgraded from an older version of Python." |
1136 |
- ewarn |
1137 |
- ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." |
1138 |
- fi |
1139 |
-} |
1140 |
- |
1141 |
-pkg_postrm() { |
1142 |
- eselect_python_update |
1143 |
-} |
1144 |
|
1145 |
diff --git a/dev-lang/python/python-3.4.6.ebuild b/dev-lang/python/python-3.4.6.ebuild |
1146 |
deleted file mode 100644 |
1147 |
index 4e06debaade..00000000000 |
1148 |
--- a/dev-lang/python/python-3.4.6.ebuild |
1149 |
+++ /dev/null |
1150 |
@@ -1,357 +0,0 @@ |
1151 |
-# Copyright 1999-2017 Gentoo Foundation |
1152 |
-# Distributed under the terms of the GNU General Public License v2 |
1153 |
- |
1154 |
-EAPI="5" |
1155 |
-WANT_LIBTOOL="none" |
1156 |
- |
1157 |
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing |
1158 |
- |
1159 |
-MY_P="Python-${PV/_/}" |
1160 |
-PATCHSET_VERSION="3.4.6-0" |
1161 |
- |
1162 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
1163 |
-HOMEPAGE="https://www.python.org/" |
1164 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz |
1165 |
- https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" |
1166 |
- |
1167 |
-LICENSE="PSF-2" |
1168 |
-SLOT="3.4/3.4m" |
1169 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
1170 |
-IUSE="build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml" |
1171 |
- |
1172 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
1173 |
-# If you need to apply a patch which requires python for bootstrapping, please |
1174 |
-# run the bootstrap code on your dev box and include the results in the |
1175 |
-# patchset. See bug 447752. |
1176 |
- |
1177 |
-RDEPEND="app-arch/bzip2:0= |
1178 |
- app-arch/xz-utils:0= |
1179 |
- >=sys-libs/zlib-1.1.3:0= |
1180 |
- virtual/libffi |
1181 |
- virtual/libintl |
1182 |
- gdbm? ( sys-libs/gdbm:0=[berkdb] ) |
1183 |
- ncurses? ( |
1184 |
- >=sys-libs/ncurses-5.2:0= |
1185 |
- readline? ( >=sys-libs/readline-4.1:0= ) |
1186 |
- ) |
1187 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
1188 |
- ssl? ( |
1189 |
- !libressl? ( dev-libs/openssl:0= ) |
1190 |
- libressl? ( dev-libs/libressl:= ) |
1191 |
- ) |
1192 |
- tk? ( |
1193 |
- >=dev-lang/tcl-8.0:0= |
1194 |
- >=dev-lang/tk-8.0:0= |
1195 |
- dev-tcltk/blt:0= |
1196 |
- dev-tcltk/tix |
1197 |
- ) |
1198 |
- xml? ( >=dev-libs/expat-2.1:0= ) |
1199 |
- !!<sys-apps/sandbox-2.6-r1" |
1200 |
-DEPEND="${RDEPEND} |
1201 |
- virtual/pkgconfig |
1202 |
- >=sys-devel/autoconf-2.65 |
1203 |
- !sys-devel/gcc[libffi(-)]" |
1204 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
1205 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
1206 |
- |
1207 |
-S="${WORKDIR}/${MY_P}" |
1208 |
- |
1209 |
-PYVER=${SLOT%/*} |
1210 |
- |
1211 |
-src_prepare() { |
1212 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
1213 |
- rm -fr Modules/expat |
1214 |
- rm -fr Modules/_ctypes/libffi* |
1215 |
- rm -fr Modules/zlib |
1216 |
- |
1217 |
- if tc-is-cross-compiler; then |
1218 |
- # Invokes BUILDPYTHON, which is built for the host arch |
1219 |
- local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch" |
1220 |
- fi |
1221 |
- |
1222 |
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" |
1223 |
- epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch" |
1224 |
- epatch "${FILESDIR}/${PN}-3.4.5-cross.patch" |
1225 |
- epatch "${FILESDIR}/3.4-getentropy-linux.patch" |
1226 |
- |
1227 |
- epatch_user |
1228 |
- |
1229 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
1230 |
- configure.ac \ |
1231 |
- Lib/distutils/command/install.py \ |
1232 |
- Lib/distutils/sysconfig.py \ |
1233 |
- Lib/site.py \ |
1234 |
- Lib/sysconfig.py \ |
1235 |
- Lib/test/test_site.py \ |
1236 |
- Makefile.pre.in \ |
1237 |
- Modules/Setup.dist \ |
1238 |
- Modules/getpath.c \ |
1239 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
1240 |
- |
1241 |
- eautoreconf |
1242 |
-} |
1243 |
- |
1244 |
-src_configure() { |
1245 |
- local disable |
1246 |
- use gdbm || disable+=" gdbm" |
1247 |
- use ncurses || disable+=" _curses _curses_panel" |
1248 |
- use readline || disable+=" readline" |
1249 |
- use sqlite || disable+=" _sqlite3" |
1250 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
1251 |
- use tk || disable+=" _tkinter" |
1252 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
1253 |
- export PYTHON_DISABLE_MODULES="${disable}" |
1254 |
- |
1255 |
- if ! use xml; then |
1256 |
- ewarn "You have configured Python without XML support." |
1257 |
- ewarn "This is NOT a recommended configuration as you" |
1258 |
- ewarn "may face problems parsing any XML documents." |
1259 |
- fi |
1260 |
- |
1261 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
1262 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
1263 |
- fi |
1264 |
- |
1265 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
1266 |
- append-flags -fwrapv |
1267 |
- fi |
1268 |
- |
1269 |
- filter-flags -malign-double |
1270 |
- |
1271 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
1272 |
- if is-flagq -O3; then |
1273 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
1274 |
- use hardened && replace-flags -O3 -O2 |
1275 |
- fi |
1276 |
- |
1277 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
1278 |
- tc-export CXX |
1279 |
- |
1280 |
- # The configure script fails to use pkg-config correctly. |
1281 |
- # http://bugs.python.org/issue15506 |
1282 |
- export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) |
1283 |
- |
1284 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
1285 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
1286 |
- # Please query BSD team before removing this! |
1287 |
- append-ldflags "-L." |
1288 |
- |
1289 |
- local dbmliborder |
1290 |
- if use gdbm; then |
1291 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
1292 |
- fi |
1293 |
- |
1294 |
- BUILD_DIR="${WORKDIR}/${CHOST}" |
1295 |
- mkdir -p "${BUILD_DIR}" || die |
1296 |
- cd "${BUILD_DIR}" || die |
1297 |
- |
1298 |
- ECONF_SOURCE="${S}" OPT="" \ |
1299 |
- econf \ |
1300 |
- --with-fpectl \ |
1301 |
- --enable-shared \ |
1302 |
- $(use_enable ipv6) \ |
1303 |
- $(use_with threads) \ |
1304 |
- --infodir='${prefix}/share/info' \ |
1305 |
- --mandir='${prefix}/share/man' \ |
1306 |
- --with-computed-gotos \ |
1307 |
- --with-dbmliborder="${dbmliborder}" \ |
1308 |
- --with-libc="" \ |
1309 |
- --enable-loadable-sqlite-extensions \ |
1310 |
- --with-system-expat \ |
1311 |
- --with-system-ffi \ |
1312 |
- --without-ensurepip |
1313 |
- |
1314 |
- if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
1315 |
- eerror "configure has detected that the sem_open function is broken." |
1316 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
1317 |
- die "Broken sem_open function (bug 496328)" |
1318 |
- fi |
1319 |
-} |
1320 |
- |
1321 |
-src_compile() { |
1322 |
- # Ensure sed works as expected |
1323 |
- # https://bugs.gentoo.org/594768 |
1324 |
- local -x LC_ALL=C |
1325 |
- |
1326 |
- # Avoid invoking pgen for cross-compiles. |
1327 |
- touch Include/graminit.h Python/graminit.c || die |
1328 |
- |
1329 |
- cd "${BUILD_DIR}" || die |
1330 |
- |
1331 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
1332 |
- |
1333 |
- # Work around bug 329499. See also bug 413751 and 457194. |
1334 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1335 |
- pax-mark E python |
1336 |
- else |
1337 |
- pax-mark m python |
1338 |
- fi |
1339 |
-} |
1340 |
- |
1341 |
-src_test() { |
1342 |
- # Tests will not work when cross compiling. |
1343 |
- if tc-is-cross-compiler; then |
1344 |
- elog "Disabling tests due to crosscompiling." |
1345 |
- return |
1346 |
- fi |
1347 |
- |
1348 |
- cd "${BUILD_DIR}" || die |
1349 |
- |
1350 |
- # Skip failing tests. |
1351 |
- local skipped_tests="gdb" |
1352 |
- |
1353 |
- for test in ${skipped_tests}; do |
1354 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
1355 |
- done |
1356 |
- |
1357 |
- local -x PYTHONDONTWRITEBYTECODE= |
1358 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
1359 |
- local result=$? |
1360 |
- |
1361 |
- for test in ${skipped_tests}; do |
1362 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
1363 |
- done |
1364 |
- |
1365 |
- elog "The following tests have been skipped:" |
1366 |
- for test in ${skipped_tests}; do |
1367 |
- elog "test_${test}.py" |
1368 |
- done |
1369 |
- |
1370 |
- elog "If you would like to run them, you may:" |
1371 |
- elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" |
1372 |
- elog "and run the tests separately." |
1373 |
- |
1374 |
- if [[ ${result} -ne 0 ]]; then |
1375 |
- die "emake test failed" |
1376 |
- fi |
1377 |
-} |
1378 |
- |
1379 |
-src_install() { |
1380 |
- local libdir=${ED}/usr/$(get_libdir)/python${PYVER} |
1381 |
- |
1382 |
- cd "${BUILD_DIR}" || die |
1383 |
- |
1384 |
- emake DESTDIR="${D}" altinstall |
1385 |
- |
1386 |
- sed \ |
1387 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
1388 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
1389 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
1390 |
- |
1391 |
- # Fix collisions between different slots of Python. |
1392 |
- rm -f "${ED}usr/$(get_libdir)/libpython3.so" |
1393 |
- |
1394 |
- # Cheap hack to get version with ABIFLAGS |
1395 |
- local abiver=$(cd "${ED}usr/include"; echo python*) |
1396 |
- if [[ ${abiver} != python${PYVER} ]]; then |
1397 |
- # Replace python3.X with a symlink to python3.Xm |
1398 |
- rm "${ED}usr/bin/python${PYVER}" || die |
1399 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
1400 |
- # Create python3.X-config symlink |
1401 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
1402 |
- # Create python-3.5m.pc symlink |
1403 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
1404 |
- fi |
1405 |
- |
1406 |
- use elibc_uclibc && rm -fr "${libdir}/test" |
1407 |
- use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} |
1408 |
- use tk || rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} |
1409 |
- |
1410 |
- use threads || rm -fr "${libdir}/multiprocessing" |
1411 |
- use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe |
1412 |
- |
1413 |
- dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
1414 |
- |
1415 |
- if use examples; then |
1416 |
- insinto /usr/share/doc/${PF}/examples |
1417 |
- find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr |
1418 |
- doins -r "${S}"/Tools |
1419 |
- fi |
1420 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
1421 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
1422 |
- emake --no-print-directory -s -f - 2>/dev/null) |
1423 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
1424 |
- |
1425 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
1426 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
1427 |
- sed \ |
1428 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
1429 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
1430 |
- -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed" |
1431 |
- |
1432 |
- # for python-exec |
1433 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
1434 |
- |
1435 |
- # if not using a cross-compiler, use the fresh binary |
1436 |
- if ! tc-is-cross-compiler; then |
1437 |
- local -x PYTHON=./python |
1438 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
1439 |
- else |
1440 |
- vars=( PYTHON "${vars[@]}" ) |
1441 |
- fi |
1442 |
- |
1443 |
- python_export "python${PYVER}" "${vars[@]}" |
1444 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
1445 |
- python_domodule epython.py |
1446 |
- |
1447 |
- # python-exec wrapping support |
1448 |
- local pymajor=${PYVER%.*} |
1449 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
1450 |
- # python and pythonX |
1451 |
- ln -s "../../../bin/${abiver}" \ |
1452 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
1453 |
- ln -s "python${pymajor}" \ |
1454 |
- "${D}${PYTHON_SCRIPTDIR}/python" || die |
1455 |
- # python-config and pythonX-config |
1456 |
- # note: we need to create a wrapper rather than symlinking it due |
1457 |
- # to some random dirname(argv[0]) magic performed by python-config |
1458 |
- cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die |
1459 |
- #!/bin/sh |
1460 |
- exec "${abiver}-config" "\${@}" |
1461 |
- EOF |
1462 |
- chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
1463 |
- ln -s "python${pymajor}-config" \ |
1464 |
- "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
1465 |
- # 2to3, pydoc, pyvenv |
1466 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
1467 |
- "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
1468 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
1469 |
- "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
1470 |
- ln -s "../../../bin/pyvenv-${PYVER}" \ |
1471 |
- "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die |
1472 |
- # idle |
1473 |
- if use tk; then |
1474 |
- ln -s "../../../bin/idle${PYVER}" \ |
1475 |
- "${D}${PYTHON_SCRIPTDIR}/idle" || die |
1476 |
- fi |
1477 |
-} |
1478 |
- |
1479 |
-pkg_preinst() { |
1480 |
- if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then |
1481 |
- python_updater_warning="1" |
1482 |
- fi |
1483 |
-} |
1484 |
- |
1485 |
-eselect_python_update() { |
1486 |
- if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
1487 |
- eselect python update |
1488 |
- fi |
1489 |
- |
1490 |
- if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
1491 |
- eselect python update --python${PV%%.*} |
1492 |
- fi |
1493 |
-} |
1494 |
- |
1495 |
-pkg_postinst() { |
1496 |
- eselect_python_update |
1497 |
- |
1498 |
- if [[ "${python_updater_warning}" == "1" ]]; then |
1499 |
- ewarn "You have just upgraded from an older version of Python." |
1500 |
- ewarn |
1501 |
- ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." |
1502 |
- fi |
1503 |
-} |
1504 |
- |
1505 |
-pkg_postrm() { |
1506 |
- eselect_python_update |
1507 |
-} |
1508 |
|
1509 |
diff --git a/dev-lang/python/python-3.5.4.ebuild b/dev-lang/python/python-3.5.4.ebuild |
1510 |
deleted file mode 100644 |
1511 |
index f4ff5b8cc75..00000000000 |
1512 |
--- a/dev-lang/python/python-3.5.4.ebuild |
1513 |
+++ /dev/null |
1514 |
@@ -1,362 +0,0 @@ |
1515 |
-# Copyright 1999-2017 Gentoo Foundation |
1516 |
-# Distributed under the terms of the GNU General Public License v2 |
1517 |
- |
1518 |
-EAPI="5" |
1519 |
-WANT_LIBTOOL="none" |
1520 |
- |
1521 |
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs |
1522 |
- |
1523 |
-MY_P="Python-${PV/_/}" |
1524 |
-PATCHSET_VERSION="3.5.4-0" |
1525 |
- |
1526 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
1527 |
-HOMEPAGE="https://www.python.org/" |
1528 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz |
1529 |
- https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" |
1530 |
- |
1531 |
-LICENSE="PSF-2" |
1532 |
-SLOT="3.5/3.5m" |
1533 |
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
1534 |
-IUSE="build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml" |
1535 |
- |
1536 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
1537 |
-# If you need to apply a patch which requires python for bootstrapping, please |
1538 |
-# run the bootstrap code on your dev box and include the results in the |
1539 |
-# patchset. See bug 447752. |
1540 |
- |
1541 |
-RDEPEND="app-arch/bzip2:0= |
1542 |
- app-arch/xz-utils:0= |
1543 |
- >=sys-libs/zlib-1.1.3:0= |
1544 |
- virtual/libffi |
1545 |
- virtual/libintl |
1546 |
- gdbm? ( sys-libs/gdbm:0=[berkdb] ) |
1547 |
- ncurses? ( |
1548 |
- >=sys-libs/ncurses-5.2:0= |
1549 |
- readline? ( >=sys-libs/readline-4.1:0= ) |
1550 |
- ) |
1551 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
1552 |
- ssl? ( |
1553 |
- !libressl? ( dev-libs/openssl:0= ) |
1554 |
- libressl? ( dev-libs/libressl:= ) |
1555 |
- ) |
1556 |
- tk? ( |
1557 |
- >=dev-lang/tcl-8.0:0= |
1558 |
- >=dev-lang/tk-8.0:0= |
1559 |
- dev-tcltk/blt:0= |
1560 |
- dev-tcltk/tix |
1561 |
- ) |
1562 |
- xml? ( >=dev-libs/expat-2.1:0= ) |
1563 |
- !!<sys-apps/sandbox-2.6-r1" |
1564 |
-DEPEND="${RDEPEND} |
1565 |
- virtual/pkgconfig |
1566 |
- !sys-devel/gcc[libffi(-)]" |
1567 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
1568 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
1569 |
- |
1570 |
-S="${WORKDIR}/${MY_P}" |
1571 |
- |
1572 |
-PYVER=${SLOT%/*} |
1573 |
- |
1574 |
-src_prepare() { |
1575 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
1576 |
- rm -fr Modules/expat |
1577 |
- rm -fr Modules/_ctypes/libffi* |
1578 |
- rm -fr Modules/zlib |
1579 |
- |
1580 |
- if tc-is-cross-compiler; then |
1581 |
- # Invokes BUILDPYTHON, which is built for the host arch |
1582 |
- local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch" |
1583 |
- fi |
1584 |
- |
1585 |
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" |
1586 |
- epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch" |
1587 |
- epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch" |
1588 |
- |
1589 |
- epatch_user |
1590 |
- |
1591 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
1592 |
- configure.ac \ |
1593 |
- Lib/distutils/command/install.py \ |
1594 |
- Lib/distutils/sysconfig.py \ |
1595 |
- Lib/site.py \ |
1596 |
- Lib/sysconfig.py \ |
1597 |
- Lib/test/test_site.py \ |
1598 |
- Makefile.pre.in \ |
1599 |
- Modules/getpath.c \ |
1600 |
- Modules/Setup.dist \ |
1601 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
1602 |
- |
1603 |
- eautoreconf |
1604 |
-} |
1605 |
- |
1606 |
-src_configure() { |
1607 |
- local disable |
1608 |
- use gdbm || disable+=" gdbm" |
1609 |
- use ncurses || disable+=" _curses _curses_panel" |
1610 |
- use readline || disable+=" readline" |
1611 |
- use sqlite || disable+=" _sqlite3" |
1612 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
1613 |
- use tk || disable+=" _tkinter" |
1614 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
1615 |
- export PYTHON_DISABLE_MODULES="${disable}" |
1616 |
- |
1617 |
- if ! use xml; then |
1618 |
- ewarn "You have configured Python without XML support." |
1619 |
- ewarn "This is NOT a recommended configuration as you" |
1620 |
- ewarn "may face problems parsing any XML documents." |
1621 |
- fi |
1622 |
- |
1623 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
1624 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
1625 |
- fi |
1626 |
- |
1627 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
1628 |
- append-flags -fwrapv |
1629 |
- fi |
1630 |
- |
1631 |
- filter-flags -malign-double |
1632 |
- |
1633 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
1634 |
- if is-flagq -O3; then |
1635 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
1636 |
- use hardened && replace-flags -O3 -O2 |
1637 |
- fi |
1638 |
- |
1639 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
1640 |
- tc-export CXX |
1641 |
- |
1642 |
- # The configure script fails to use pkg-config correctly. |
1643 |
- # http://bugs.python.org/issue15506 |
1644 |
- export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) |
1645 |
- |
1646 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
1647 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
1648 |
- # Please query BSD team before removing this! |
1649 |
- append-ldflags "-L." |
1650 |
- |
1651 |
- local dbmliborder |
1652 |
- if use gdbm; then |
1653 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
1654 |
- fi |
1655 |
- |
1656 |
- BUILD_DIR="${WORKDIR}/${CHOST}" |
1657 |
- mkdir -p "${BUILD_DIR}" || die |
1658 |
- cd "${BUILD_DIR}" || die |
1659 |
- |
1660 |
- local myeconfargs=( |
1661 |
- --with-fpectl |
1662 |
- --enable-shared |
1663 |
- $(use_enable ipv6) |
1664 |
- $(use_with threads) |
1665 |
- --infodir='${prefix}/share/info' |
1666 |
- --mandir='${prefix}/share/man' |
1667 |
- --with-computed-gotos |
1668 |
- --with-dbmliborder="${dbmliborder}" |
1669 |
- --with-libc= |
1670 |
- --enable-loadable-sqlite-extensions |
1671 |
- --without-ensurepip |
1672 |
- --with-system-expat |
1673 |
- --with-system-ffi |
1674 |
- ) |
1675 |
- |
1676 |
- ECONF_SOURCE="${S}" OPT="" econf "${myeconfargs[@]}" |
1677 |
- |
1678 |
- if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
1679 |
- eerror "configure has detected that the sem_open function is broken." |
1680 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
1681 |
- die "Broken sem_open function (bug 496328)" |
1682 |
- fi |
1683 |
-} |
1684 |
- |
1685 |
-src_compile() { |
1686 |
- # Ensure sed works as expected |
1687 |
- # https://bugs.gentoo.org/594768 |
1688 |
- local -x LC_ALL=C |
1689 |
- |
1690 |
- cd "${BUILD_DIR}" || die |
1691 |
- |
1692 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
1693 |
- |
1694 |
- # Work around bug 329499. See also bug 413751 and 457194. |
1695 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1696 |
- pax-mark E python |
1697 |
- else |
1698 |
- pax-mark m python |
1699 |
- fi |
1700 |
-} |
1701 |
- |
1702 |
-src_test() { |
1703 |
- # Tests will not work when cross compiling. |
1704 |
- if tc-is-cross-compiler; then |
1705 |
- elog "Disabling tests due to crosscompiling." |
1706 |
- return |
1707 |
- fi |
1708 |
- |
1709 |
- cd "${BUILD_DIR}" || die |
1710 |
- |
1711 |
- # Skip failing tests. |
1712 |
- local skipped_tests="gdb" |
1713 |
- |
1714 |
- for test in ${skipped_tests}; do |
1715 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
1716 |
- done |
1717 |
- |
1718 |
- local -x PYTHONDONTWRITEBYTECODE= |
1719 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
1720 |
- local result=$? |
1721 |
- |
1722 |
- for test in ${skipped_tests}; do |
1723 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
1724 |
- done |
1725 |
- |
1726 |
- elog "The following tests have been skipped:" |
1727 |
- for test in ${skipped_tests}; do |
1728 |
- elog "test_${test}.py" |
1729 |
- done |
1730 |
- |
1731 |
- elog "If you would like to run them, you may:" |
1732 |
- elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" |
1733 |
- elog "and run the tests separately." |
1734 |
- |
1735 |
- if [[ ${result} -ne 0 ]]; then |
1736 |
- die "emake test failed" |
1737 |
- fi |
1738 |
-} |
1739 |
- |
1740 |
-src_install() { |
1741 |
- local libdir=${ED}/usr/$(get_libdir)/python${PYVER} |
1742 |
- |
1743 |
- cd "${BUILD_DIR}" || die |
1744 |
- |
1745 |
- emake DESTDIR="${D}" altinstall |
1746 |
- |
1747 |
- sed \ |
1748 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
1749 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
1750 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
1751 |
- |
1752 |
- # Fix collisions between different slots of Python. |
1753 |
- rm -f "${ED}usr/$(get_libdir)/libpython3.so" |
1754 |
- |
1755 |
- # Cheap hack to get version with ABIFLAGS |
1756 |
- local abiver=$(cd "${ED}usr/include"; echo python*) |
1757 |
- if [[ ${abiver} != python${PYVER} ]]; then |
1758 |
- # Replace python3.X with a symlink to python3.Xm |
1759 |
- rm "${ED}usr/bin/python${PYVER}" || die |
1760 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
1761 |
- # Create python3.X-config symlink |
1762 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
1763 |
- # Create python-3.5m.pc symlink |
1764 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
1765 |
- fi |
1766 |
- |
1767 |
- # python seems to get rebuilt in src_install (bug 569908) |
1768 |
- # Work around it for now. |
1769 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1770 |
- pax-mark E "${ED}usr/bin/${abiver}" |
1771 |
- else |
1772 |
- pax-mark m "${ED}usr/bin/${abiver}" |
1773 |
- fi |
1774 |
- |
1775 |
- use elibc_uclibc && rm -fr "${libdir}/test" |
1776 |
- use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} |
1777 |
- use tk || rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} |
1778 |
- |
1779 |
- use threads || rm -fr "${libdir}/multiprocessing" |
1780 |
- use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe |
1781 |
- |
1782 |
- dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
1783 |
- |
1784 |
- if use examples; then |
1785 |
- insinto /usr/share/doc/${PF}/examples |
1786 |
- find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr |
1787 |
- doins -r "${S}"/Tools |
1788 |
- fi |
1789 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
1790 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
1791 |
- emake --no-print-directory -s -f - 2>/dev/null) |
1792 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
1793 |
- |
1794 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
1795 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
1796 |
- sed \ |
1797 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
1798 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
1799 |
- -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed" |
1800 |
- |
1801 |
- # for python-exec |
1802 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
1803 |
- |
1804 |
- # if not using a cross-compiler, use the fresh binary |
1805 |
- if ! tc-is-cross-compiler; then |
1806 |
- local -x PYTHON=./python |
1807 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
1808 |
- else |
1809 |
- vars=( PYTHON "${vars[@]}" ) |
1810 |
- fi |
1811 |
- |
1812 |
- python_export "python${PYVER}" "${vars[@]}" |
1813 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
1814 |
- python_domodule epython.py |
1815 |
- |
1816 |
- # python-exec wrapping support |
1817 |
- local pymajor=${PYVER%.*} |
1818 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
1819 |
- # python and pythonX |
1820 |
- ln -s "../../../bin/${abiver}" \ |
1821 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
1822 |
- ln -s "python${pymajor}" \ |
1823 |
- "${D}${PYTHON_SCRIPTDIR}/python" || die |
1824 |
- # python-config and pythonX-config |
1825 |
- # note: we need to create a wrapper rather than symlinking it due |
1826 |
- # to some random dirname(argv[0]) magic performed by python-config |
1827 |
- cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die |
1828 |
- #!/bin/sh |
1829 |
- exec "${abiver}-config" "\${@}" |
1830 |
- EOF |
1831 |
- chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
1832 |
- ln -s "python${pymajor}-config" \ |
1833 |
- "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
1834 |
- # 2to3, pydoc, pyvenv |
1835 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
1836 |
- "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
1837 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
1838 |
- "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
1839 |
- ln -s "../../../bin/pyvenv-${PYVER}" \ |
1840 |
- "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die |
1841 |
- # idle |
1842 |
- if use tk; then |
1843 |
- ln -s "../../../bin/idle${PYVER}" \ |
1844 |
- "${D}${PYTHON_SCRIPTDIR}/idle" || die |
1845 |
- fi |
1846 |
-} |
1847 |
- |
1848 |
-pkg_preinst() { |
1849 |
- if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then |
1850 |
- python_updater_warning="1" |
1851 |
- fi |
1852 |
-} |
1853 |
- |
1854 |
-eselect_python_update() { |
1855 |
- if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
1856 |
- eselect python update |
1857 |
- fi |
1858 |
- |
1859 |
- if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
1860 |
- eselect python update --python${PV%%.*} |
1861 |
- fi |
1862 |
-} |
1863 |
- |
1864 |
-pkg_postinst() { |
1865 |
- eselect_python_update |
1866 |
- |
1867 |
- if [[ "${python_updater_warning}" == "1" ]]; then |
1868 |
- ewarn "You have just upgraded from an older version of Python." |
1869 |
- ewarn |
1870 |
- ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." |
1871 |
- fi |
1872 |
-} |
1873 |
- |
1874 |
-pkg_postrm() { |
1875 |
- eselect_python_update |
1876 |
-} |
1877 |
|
1878 |
diff --git a/dev-lang/python/python-3.6.3.ebuild b/dev-lang/python/python-3.6.3.ebuild |
1879 |
deleted file mode 100644 |
1880 |
index 4cf258819ee..00000000000 |
1881 |
--- a/dev-lang/python/python-3.6.3.ebuild |
1882 |
+++ /dev/null |
1883 |
@@ -1,342 +0,0 @@ |
1884 |
-# Copyright 1999-2017 Gentoo Foundation |
1885 |
-# Distributed under the terms of the GNU General Public License v2 |
1886 |
- |
1887 |
-EAPI="5" |
1888 |
-WANT_LIBTOOL="none" |
1889 |
- |
1890 |
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs |
1891 |
- |
1892 |
-MY_P="Python-${PV}" |
1893 |
-PATCHSET_VERSION="3.6.2-0" |
1894 |
- |
1895 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
1896 |
-HOMEPAGE="https://www.python.org/" |
1897 |
-SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz |
1898 |
- https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" |
1899 |
- |
1900 |
-LICENSE="PSF-2" |
1901 |
-SLOT="3.6/3.6m" |
1902 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
1903 |
-IUSE="build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml" |
1904 |
- |
1905 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
1906 |
-# If you need to apply a patch which requires python for bootstrapping, please |
1907 |
-# run the bootstrap code on your dev box and include the results in the |
1908 |
-# patchset. See bug 447752. |
1909 |
- |
1910 |
-RDEPEND="app-arch/bzip2:0= |
1911 |
- app-arch/xz-utils:0= |
1912 |
- >=sys-libs/zlib-1.1.3:0= |
1913 |
- virtual/libffi |
1914 |
- virtual/libintl |
1915 |
- gdbm? ( sys-libs/gdbm:0=[berkdb] ) |
1916 |
- ncurses? ( |
1917 |
- >=sys-libs/ncurses-5.2:0= |
1918 |
- readline? ( >=sys-libs/readline-4.1:0= ) |
1919 |
- ) |
1920 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
1921 |
- ssl? ( |
1922 |
- !libressl? ( dev-libs/openssl:0= ) |
1923 |
- libressl? ( dev-libs/libressl:= ) |
1924 |
- ) |
1925 |
- tk? ( |
1926 |
- >=dev-lang/tcl-8.0:0= |
1927 |
- >=dev-lang/tk-8.0:0= |
1928 |
- dev-tcltk/blt:0= |
1929 |
- dev-tcltk/tix |
1930 |
- ) |
1931 |
- xml? ( >=dev-libs/expat-2.1:0= ) |
1932 |
- !!<sys-apps/sandbox-2.6-r1" |
1933 |
-DEPEND="${RDEPEND} |
1934 |
- virtual/pkgconfig |
1935 |
- !sys-devel/gcc[libffi(-)]" |
1936 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
1937 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
1938 |
- |
1939 |
-S="${WORKDIR}/${MY_P}" |
1940 |
-PYVER=${SLOT%/*} |
1941 |
- |
1942 |
-src_prepare() { |
1943 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
1944 |
- rm -fr Modules/expat |
1945 |
- rm -fr Modules/_ctypes/libffi* |
1946 |
- rm -fr Modules/zlib |
1947 |
- |
1948 |
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" |
1949 |
- epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch" |
1950 |
- epatch "${FILESDIR}/3.6-blake2.patch" |
1951 |
- |
1952 |
- epatch_user |
1953 |
- |
1954 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
1955 |
- Lib/distutils/command/install.py \ |
1956 |
- Lib/distutils/sysconfig.py \ |
1957 |
- Lib/site.py \ |
1958 |
- Lib/sysconfig.py \ |
1959 |
- Lib/test/test_site.py \ |
1960 |
- Makefile.pre.in \ |
1961 |
- Modules/Setup.dist \ |
1962 |
- Modules/getpath.c \ |
1963 |
- configure.ac \ |
1964 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
1965 |
- |
1966 |
- eautoreconf |
1967 |
-} |
1968 |
- |
1969 |
-src_configure() { |
1970 |
- local disable |
1971 |
- use gdbm || disable+=" gdbm" |
1972 |
- use ncurses || disable+=" _curses _curses_panel" |
1973 |
- use readline || disable+=" readline" |
1974 |
- use sqlite || disable+=" _sqlite3" |
1975 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
1976 |
- use tk || disable+=" _tkinter" |
1977 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
1978 |
- export PYTHON_DISABLE_MODULES="${disable}" |
1979 |
- |
1980 |
- if ! use xml; then |
1981 |
- ewarn "You have configured Python without XML support." |
1982 |
- ewarn "This is NOT a recommended configuration as you" |
1983 |
- ewarn "may face problems parsing any XML documents." |
1984 |
- fi |
1985 |
- |
1986 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
1987 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
1988 |
- fi |
1989 |
- |
1990 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
1991 |
- append-flags -fwrapv |
1992 |
- fi |
1993 |
- |
1994 |
- filter-flags -malign-double |
1995 |
- |
1996 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
1997 |
- if is-flagq -O3; then |
1998 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
1999 |
- use hardened && replace-flags -O3 -O2 |
2000 |
- fi |
2001 |
- |
2002 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
2003 |
- tc-export CXX |
2004 |
- |
2005 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
2006 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
2007 |
- # Please query BSD team before removing this! |
2008 |
- append-ldflags "-L." |
2009 |
- |
2010 |
- local dbmliborder |
2011 |
- if use gdbm; then |
2012 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
2013 |
- fi |
2014 |
- |
2015 |
- local myeconfargs=( |
2016 |
- --with-fpectl |
2017 |
- --enable-shared |
2018 |
- $(use_enable ipv6) |
2019 |
- $(use_with threads) |
2020 |
- --infodir='${prefix}/share/info' |
2021 |
- --mandir='${prefix}/share/man' |
2022 |
- --with-computed-gotos |
2023 |
- --with-dbmliborder="${dbmliborder}" |
2024 |
- --with-libc= |
2025 |
- --enable-loadable-sqlite-extensions |
2026 |
- --without-ensurepip |
2027 |
- --with-system-expat |
2028 |
- --with-system-ffi |
2029 |
- ) |
2030 |
- |
2031 |
- OPT="" econf "${myeconfargs[@]}" |
2032 |
- |
2033 |
- if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
2034 |
- eerror "configure has detected that the sem_open function is broken." |
2035 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
2036 |
- die "Broken sem_open function (bug 496328)" |
2037 |
- fi |
2038 |
-} |
2039 |
- |
2040 |
-src_compile() { |
2041 |
- # Ensure sed works as expected |
2042 |
- # https://bugs.gentoo.org/594768 |
2043 |
- local -x LC_ALL=C |
2044 |
- |
2045 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
2046 |
- |
2047 |
- # Work around bug 329499. See also bug 413751 and 457194. |
2048 |
- if has_version dev-libs/libffi[pax_kernel]; then |
2049 |
- pax-mark E python |
2050 |
- else |
2051 |
- pax-mark m python |
2052 |
- fi |
2053 |
-} |
2054 |
- |
2055 |
-src_test() { |
2056 |
- # Tests will not work when cross compiling. |
2057 |
- if tc-is-cross-compiler; then |
2058 |
- elog "Disabling tests due to crosscompiling." |
2059 |
- return |
2060 |
- fi |
2061 |
- |
2062 |
- # Skip failing tests. |
2063 |
- local skipped_tests="gdb" |
2064 |
- |
2065 |
- for test in ${skipped_tests}; do |
2066 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
2067 |
- done |
2068 |
- |
2069 |
- local -x PYTHONDONTWRITEBYTECODE= |
2070 |
- |
2071 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
2072 |
- local result=$? |
2073 |
- |
2074 |
- for test in ${skipped_tests}; do |
2075 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
2076 |
- done |
2077 |
- |
2078 |
- elog "The following tests have been skipped:" |
2079 |
- for test in ${skipped_tests}; do |
2080 |
- elog "test_${test}.py" |
2081 |
- done |
2082 |
- |
2083 |
- elog "If you would like to run them, you may:" |
2084 |
- elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" |
2085 |
- elog "and run the tests separately." |
2086 |
- |
2087 |
- if [[ ${result} -ne 0 ]]; then |
2088 |
- die "emake test failed" |
2089 |
- fi |
2090 |
-} |
2091 |
- |
2092 |
-src_install() { |
2093 |
- local libdir=${ED}/usr/$(get_libdir)/python${PYVER} |
2094 |
- |
2095 |
- emake DESTDIR="${D}" altinstall |
2096 |
- |
2097 |
- sed \ |
2098 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
2099 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
2100 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
2101 |
- |
2102 |
- # Fix collisions between different slots of Python. |
2103 |
- rm -f "${ED}usr/$(get_libdir)/libpython3.so" |
2104 |
- |
2105 |
- # Cheap hack to get version with ABIFLAGS |
2106 |
- local abiver=$(cd "${ED}usr/include"; echo python*) |
2107 |
- if [[ ${abiver} != python${PYVER} ]]; then |
2108 |
- # Replace python3.X with a symlink to python3.Xm |
2109 |
- rm "${ED}usr/bin/python${PYVER}" || die |
2110 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
2111 |
- # Create python3.X-config symlink |
2112 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
2113 |
- # Create python-3.5m.pc symlink |
2114 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
2115 |
- fi |
2116 |
- |
2117 |
- # python seems to get rebuilt in src_install (bug 569908) |
2118 |
- # Work around it for now. |
2119 |
- if has_version dev-libs/libffi[pax_kernel]; then |
2120 |
- pax-mark E "${ED}usr/bin/${abiver}" |
2121 |
- else |
2122 |
- pax-mark m "${ED}usr/bin/${abiver}" |
2123 |
- fi |
2124 |
- |
2125 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
2126 |
- use tk || rm -r "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
2127 |
- |
2128 |
- use threads || rm -r "${libdir}/multiprocessing" || die |
2129 |
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die |
2130 |
- |
2131 |
- dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
2132 |
- |
2133 |
- if use examples; then |
2134 |
- insinto /usr/share/doc/${PF}/examples |
2135 |
- find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr |
2136 |
- doins -r "${S}"/Tools |
2137 |
- fi |
2138 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
2139 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
2140 |
- emake --no-print-directory -s -f - 2>/dev/null) |
2141 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
2142 |
- |
2143 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
2144 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
2145 |
- sed \ |
2146 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
2147 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
2148 |
- -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed" |
2149 |
- |
2150 |
- # for python-exec |
2151 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
2152 |
- |
2153 |
- # if not using a cross-compiler, use the fresh binary |
2154 |
- if ! tc-is-cross-compiler; then |
2155 |
- local -x PYTHON=./python |
2156 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
2157 |
- else |
2158 |
- vars=( PYTHON "${vars[@]}" ) |
2159 |
- fi |
2160 |
- |
2161 |
- python_export "python${PYVER}" "${vars[@]}" |
2162 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
2163 |
- python_domodule epython.py |
2164 |
- |
2165 |
- # python-exec wrapping support |
2166 |
- local pymajor=${PYVER%.*} |
2167 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
2168 |
- # python and pythonX |
2169 |
- ln -s "../../../bin/${abiver}" \ |
2170 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
2171 |
- ln -s "python${pymajor}" \ |
2172 |
- "${D}${PYTHON_SCRIPTDIR}/python" || die |
2173 |
- # python-config and pythonX-config |
2174 |
- # note: we need to create a wrapper rather than symlinking it due |
2175 |
- # to some random dirname(argv[0]) magic performed by python-config |
2176 |
- cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die |
2177 |
- #!/bin/sh |
2178 |
- exec "${abiver}-config" "\${@}" |
2179 |
- EOF |
2180 |
- chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
2181 |
- ln -s "python${pymajor}-config" \ |
2182 |
- "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
2183 |
- # 2to3, pydoc, pyvenv |
2184 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
2185 |
- "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
2186 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
2187 |
- "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
2188 |
- ln -s "../../../bin/pyvenv-${PYVER}" \ |
2189 |
- "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die |
2190 |
- # idle |
2191 |
- if use tk; then |
2192 |
- ln -s "../../../bin/idle${PYVER}" \ |
2193 |
- "${D}${PYTHON_SCRIPTDIR}/idle" || die |
2194 |
- fi |
2195 |
-} |
2196 |
- |
2197 |
-pkg_preinst() { |
2198 |
- if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then |
2199 |
- python_updater_warning="1" |
2200 |
- fi |
2201 |
-} |
2202 |
- |
2203 |
-eselect_python_update() { |
2204 |
- if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
2205 |
- eselect python update |
2206 |
- fi |
2207 |
- |
2208 |
- if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
2209 |
- eselect python update --python${PV%%.*} |
2210 |
- fi |
2211 |
-} |
2212 |
- |
2213 |
-pkg_postinst() { |
2214 |
- eselect_python_update |
2215 |
- |
2216 |
- if [[ "${python_updater_warning}" == "1" ]]; then |
2217 |
- ewarn "You have just upgraded from an older version of Python." |
2218 |
- ewarn |
2219 |
- ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." |
2220 |
- fi |
2221 |
-} |
2222 |
- |
2223 |
-pkg_postrm() { |
2224 |
- eselect_python_update |
2225 |
-} |