Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: dev-lang/python/
Date: Thu, 03 May 2018 12:05:48
Message-Id: 1525348108.f4d87c92c4886700c5fd7570a8af293d0dedcb5d.grobian@gentoo
1 commit: f4d87c92c4886700c5fd7570a8af293d0dedcb5d
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 3 11:48:28 2018 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Thu May 3 11:48:28 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=f4d87c92
7
8 dev-lang/python: remove old 3.4.5
9
10 Package-Manager: Portage-2.3.18-prefix, Repoman-2.3.6
11
12 dev-lang/python/Manifest | 3 -
13 dev-lang/python/python-3.4.5.ebuild | 450 ------------------------------------
14 2 files changed, 453 deletions(-)
15
16 diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
17 index 00c4315df3..3a746050dc 100644
18 --- a/dev-lang/python/Manifest
19 +++ b/dev-lang/python/Manifest
20 @@ -1,18 +1,15 @@
21 DIST 7be648659ef46f33db6913ca0ca5a809219d5629.zip 9199 BLAKE2B 85803bc1677bd16650cb5fc4a2c54fdac0228326f25cfba4fcd098ac9d689312d3e0dde6fca57f720d5235361d6462461cf018325c23fda9139e0f1683055aff SHA512 cabc21d2d7379daf1f4bafe7ab00b70e5b4f707d3102496b96ff0dfdced26347097ad771c69e0b9488b7c54b1ef36f9bc019bee72f1ffcbb55dcd0e71095edfe
22 DIST 8ee84829be03c2a1aa74f0f095c994c1f43f4688.zip 14239 BLAKE2B 3dd91f83e5886cb9ba5c1fd9f3da38ab521db70645fa187752cd784919d523d9bf59b61223ea1a455b6d9002ba88dac5bd834c8e943b121db84e30bbb0f65204 SHA512 2f3ada7ff2bd97f90e3b972b681624ddf45c6d1db8d5e89f1313b4693db240a3c4e27c84bd2cf8ff71d5fb276b381ca6a3b8a6945f8db53ff3496cc4cc0b1d62
23 DIST Python-2.7.14.tar.xz 12576112 BLAKE2B e03c4134cfdd88678acc26f383130a598ce4de908ab6bb9ee00e9235de3e0fcb9e653fec86f39db64fb895ef797d33736524655c5b94fab2cde2544b966b2cfb SHA512 78310b0be6388ffa15f29a80afb9ab3c03a572cb094e9da00cfe391afadb51696e41f592eb658d6a31a2f422fdac8a55214a382cbb8cfb43d4a127d5b35ea7f9
24 -DIST Python-3.4.5.tar.xz 14516820 BLAKE2B f9ddabd2df2241089d07756d3a8ba1c70096bee60d7cdef84041edbb20c488c3a573762441a4b7f543dbc0ce403ce84ff7d02e7d25699917bd014ab96deead85 SHA512 b548a5338d141b3086dea372fa2cc245ba5350ee9f0d1304ef6222dc45380b66d380b092e547d54206d56ca68563b95036f445f97f72bb0ef1d48f81a74a3d4c
25 DIST Python-3.4.8.tar.xz 14576444 BLAKE2B 262b82fbc0e4852216d2edf05f9e9194bc93be7b14a2d6ef56789b808cff274e58b2fa7134955464fd05ab36181b5861aeca31e2e05b27f0f58ac66d145bd56b SHA512 478552c72efe606cb1993024b81839c51d01f1c949564c007ab2b76016f110e1f7bd418e5de3f4f93b466ce7dbe6583d3c150830d1f28f75e0809625b568a7ec
26 DIST Python-3.5.4.tar.xz 15332320 BLAKE2B 1fc3ba4eb1ed949062961c13fd1f9851c7f9cbeb4916c06a0389349ee2d4872b2b1c2d30138822e6329b6a715f35a66df704b7a04aa4adeb95b685b8d6e45d61 SHA512 dbbe2740ee1cce5404b7b6436a9b3887e15f415a1006efa22014ec7e5b1e48c43eed0ff98f6f5b365c527b8d2525be4ce72bbe404ce71c0835529fcd6f0267ff
27 DIST Python-3.5.5.tar.xz 15351440 BLAKE2B 217cb7f51e04d57983ce053ff4276d056e17c8223b6f3d87b69f556453fe2ae3d4dc2c1a6b9c2c6aad033cea9b40cd32264d8208cc81a1ec34ff252379bf95b8 SHA512 c9056baee6a2d1fe7f14b1f310db95b78e8972766d086f8ae10954f38f8182956171580bde01ddadebe897f2545a6fbe47669ca3e4887026ac1fae5ee9197f22
28 DIST Python-3.6.3.tar.xz 16974296 BLAKE2B 8220fc0c2eaa315d3972085b0f531f169adb6cfad57023ad2c115603b5a484573ea3540eb3216edd0f4514256c8edb07469cf38d17727d69cdc15cdf1f601623 SHA512 32f24a3adcb7880003c7ecdc5e53e838e774adda76b308961d8215e28db630b2fa2828097817924c76afa4212b2df3362eb64d4e10f37c0147f512ec5aa8662b
29 DIST python-gentoo-patches-2.7.14-0.tar.xz 13428 BLAKE2B 0048e48ddaaa4bef08451354fde95a123042880f26dddc9267c7f9a90fd8abb40955e26ee8c9dfc5a1165556bb3e11585b27288e635d42a4000dd3d7654c41ad SHA512 6da5b52065752b54e9215d0f0809c75167dc3690d0e94fa21dd7595626925bc5c1dd065d31b3bd696d7087f3986de145d3a335a29eb7bd77442637a7ec2863c1
30 -DIST python-gentoo-patches-3.4.5-0.tar.xz 12044 BLAKE2B 7fb3cc7dcd987debd5aa263d8e26b21aad439d8e3177c06c3683406a53bbda9652175673b09b6300f6a5b62148190cd8a75c9b65a5de04d770866733fcc0ebcb SHA512 108a4845667ecdf4001fcbeffab0cfbbac87439a449a7351428b0f3e2f159e3848ee0c0dfa45c9fba893b9f9584b33722fc8bb0bd7485a1d0909c3a35ede6ed8
31 DIST python-gentoo-patches-3.4.6-0.tar.xz 11728 BLAKE2B 2a636f5500f4c7d354f421133f086cba9a25c30d5feaaa2dc25c9c588125d7c9097baecaa11f31548fa598b5dc137ca310ad86222510c0a955fa632a6d0a4b06 SHA512 41c22dc8f1db8800fc0b97eed2b27bf1873e5de1369bd4aecf7a7a91e609a78e45a4b56fc89d575317f33a7704c0c1cad1494e8a993415a198f256e8338f49ab
32 DIST python-gentoo-patches-3.5.4-0.tar.xz 11704 BLAKE2B 4a7d71feff18c7c8c109bed10748348484d314183c3de3ec950d5ca5ce7048bb322c470f3f5bff2d63eb7f2ed99c0fe75c621df050273d9d118681b28926061d SHA512 d395a87695f700598026038d6929ea5038abd7d494294037a4dfa02d5262203dbbaa6ae258a5a7f35ff5542f6266dcf69cc0b9c3df2a047cd2f6699a87e182ec
33 DIST python-gentoo-patches-3.6.2-0.tar.xz 10744 BLAKE2B 3075754627617ac2ceee879eaf1a0e6564505655cdbdff380233a09df701a6188d64fe1f6a8c642b1fb05ef3c460a07042b6a362d655cd02717d6d9ba47983a1 SHA512 2aac1700c541202aa4f43bff4cb521b996d52ab350133318abaddb43f4b6e20548f37de472ace8024ef325ebf63fdfff0d43f8aa1f717d3c56f974b7aa1764e3
34 DIST python-prefix-2.7.14-gentoo-patches-r0.tar.xz 14736 BLAKE2B 75422fc7390f559d9864f6e22a0b85982ccbdb07d5f2507db8e528285e56d1f11d4bc0b21a0b78d5340eafd562220d2f1b9d0a78b1f7c811c5689a426a81f9f3 SHA512 bf8e5039fff834d03a5a671269905f1ea10961995f2327ea023f6ad4d9b49bf210ec746ac6f45a01ff7501f1eb616013951d164410f6c64bce04df0e8b9715c8
35 -DIST python-prefix-3.4.5-gentoo-patches-r0.tar.xz 12932 BLAKE2B 228cea390cd16f68579896ccec06025446d6378ee164090a7f8ab8174d28e73e35b0e311b95ab78be7a54b21eefce7c01238e3cb31fae1f49a1706476c5abda5 SHA512 e32556c63e48d8dacd86218945147d1bbbc5777a6bb3441373827da47771a8eb387f26885acd35343cc598c719c9feec63007144fc1fdd1aca253a2ec1a19825
36 DIST python-prefix-3.4.8-gentoo-patches-r0.tar.xz 12928 BLAKE2B d270f27485a70b4186c0d509836f66e6ae8218270cbb0a473b4579de7a8d9fa16eb2387d0441979aa62fc88e54a52f863c58d91b3df64dd6a40ad4bc4236cbb2 SHA512 84554d2b320922d7ac6e20012f847a81d6501693a4d9f2146faa8764fca4fbc5e3bf1c0f352853f1ab34ed905ab13097f2e82285ada54c9b4e219e72b39804c2
37 DIST python-prefix-3.5.4-gentoo-patches-r0.tar.xz 12768 BLAKE2B ab0cbc5430e9588f71cfd7b001a07f9a77097262f17e1f980e3945e39855e1c9437117bf4eb2d424dadf701d37d025e09627d7efdbb9f8867714039f62f261a7 SHA512 334cd8990483f973386cc6bbc962d2843449c493f7d33349fcc8f68120e246c52ea80236c99685555974e439fa877b537b32ef7d181198f58950f5e9b835b1c5
38 DIST python-prefix-3.6.3-gentoo-patches-r0.tar.xz 12676 BLAKE2B 5221ae00d16db401d5674947923451d850978d930d9449d9b4f6ae6d117c26971e2f384c5a698b7acc8d62e6a6b673f4ec870da3788f87372593a5ac4897a227 SHA512 9d1673bc7b327be6b7e95491940eeeaa40db9e94f2183f4605a9a5a7fd2e187017164e9b2ef31f3bc8d694e467de6843706d3341b4ce24d4d8717513c246b62f
39
40 diff --git a/dev-lang/python/python-3.4.5.ebuild b/dev-lang/python/python-3.4.5.ebuild
41 deleted file mode 100644
42 index 3bd820c161..0000000000
43 --- a/dev-lang/python/python-3.4.5.ebuild
44 +++ /dev/null
45 @@ -1,450 +0,0 @@
46 -# Copyright 1999-2017 Gentoo Foundation
47 -# Distributed under the terms of the GNU General Public License v2
48 -# $Id$
49 -
50 -EAPI="5"
51 -WANT_LIBTOOL="none"
52 -
53 -inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing
54 -
55 -MY_P="Python-${PV/_/}"
56 -PATCHSET_VERSION="3.4.5-0"
57 -PREFIX_PATCHREV="r0"
58 -CYGWINPORTS_GITREV="8ee84829be03c2a1aa74f0f095c994c1f43f4688"
59 -
60 -DESCRIPTION="An interpreted, interactive, object-oriented programming language"
61 -HOMEPAGE="http://www.python.org/"
62 -SRC_URI="http://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz
63 - https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz
64 - https://dev.gentoo.org/~grobian/distfiles/python-prefix-${PV}-gentoo-patches-${PREFIX_PATCHREV}.tar.xz"
65 -
66 -[[ -n ${CYGWINPORTS_GITREV} ]] &&
67 -SRC_URI+=" elibc_Cygwin? ( https://github.com/cygwinports/python3/archive/${CYGWINPORTS_GITREV}.zip )"
68 -
69 -LICENSE="PSF-2"
70 -SLOT="3.4/3.4m"
71 -KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
72 -IUSE="aqua build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml"
73 -
74 -# Do not add a dependency on dev-lang/python to this ebuild.
75 -# If you need to apply a patch which requires python for bootstrapping, please
76 -# run the bootstrap code on your dev box and include the results in the
77 -# patchset. See bug 447752.
78 -
79 -RDEPEND="app-arch/bzip2:0=
80 - app-arch/xz-utils:0=
81 - >=sys-libs/zlib-1.1.3:0=
82 - virtual/libffi
83 - virtual/libintl
84 - gdbm? ( sys-libs/gdbm:0=[berkdb] )
85 - ncurses? (
86 - >=sys-libs/ncurses-5.2:0=
87 - readline? ( >=sys-libs/readline-4.1:0= )
88 - )
89 - sqlite? ( >=dev-db/sqlite-3.3.8:3= )
90 - ssl? (
91 - !libressl? ( dev-libs/openssl:0= )
92 - libressl? ( dev-libs/libressl:= )
93 - )
94 - tk? (
95 - >=dev-lang/tcl-8.0:0=
96 - >=dev-lang/tk-8.0:0=[-aqua]
97 - dev-tcltk/blt:0=
98 - dev-tcltk/tix
99 - )
100 - xml? ( >=dev-libs/expat-2.1:0= )
101 - !!<sys-apps/sandbox-2.6-r1"
102 -DEPEND="${RDEPEND}
103 - virtual/pkgconfig
104 - >=sys-devel/autoconf-2.65
105 - !sys-devel/gcc[libffi(-)]"
106 -RDEPEND+=" !build? ( app-misc/mime-types )"
107 -PDEPEND=">=app-eselect/eselect-python-20140125-r1"
108 -
109 -[[ -n ${CYGWINPORTS_GITREV} ]] &&
110 -DEPEND+=" elibc_Cygwin? ( app-arch/unzip )"
111 -
112 -S="${WORKDIR}/${MY_P}"
113 -
114 -PYVER=${SLOT%/*}
115 -
116 -src_prepare() {
117 - # Ensure that internal copies of expat, libffi and zlib are not used.
118 - rm -fr Modules/expat
119 - rm -fr Modules/_ctypes/libffi*
120 - rm -fr Modules/zlib
121 -
122 - if tc-is-cross-compiler; then
123 - # Invokes BUILDPYTHON, which is built for the host arch
124 - local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch"
125 - fi
126 -
127 - EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
128 - epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch"
129 - epatch "${FILESDIR}/${PN}-3.4.5-cross.patch"
130 -
131 - # Prefix' round of patches
132 - # http://prefix.gentooexperimental.org:8000/python-patches-3_3
133 - EPATCH_EXCLUDE="${excluded_patches}" EPATCH_SUFFIX="patch" \
134 - epatch "${WORKDIR}"/python-prefix-${PV}-gentoo-patches-${PREFIX_PATCHREV}
135 -
136 - # https://forums.developer.apple.com/thread/9233, bug #572726
137 - sed -i -e '/$(RUNSHARED) .\/regen/s/^/export RUNSHARED=$(RUNSHARED); /' \
138 - Makefile.pre.in || die
139 - sed -i -e '/python$EXE/s/^/env ${RUNSHARED} /' \
140 - Lib/plat-darwin/regen || die
141 -
142 - # we provide a fully working readline also on Darwin, so don't force
143 - # usage of less functional libedit
144 - sed -i -e 's/__APPLE__/__NO_MUCKING_AROUND__/g' Modules/readline.c || die
145 -
146 - # We may have wrapped /usr/ccs/bin/nm on AIX for long TMPDIR.
147 - sed -i -e "/^NM=.*nm$/s,^.*$,NM=$(tc-getNM)," Modules/makexp_aix || die
148 -
149 - # Make sure python doesn't use the host libffi.
150 - use prefix && epatch "${FILESDIR}/python-3.2-libffi-pkgconfig.patch"
151 -
152 - if [[ -n ${CYGWINPORTS_GITREV} ]] && use elibc_Cygwin; then
153 - local p d="${WORKDIR}/python3-${CYGWINPORTS_GITREV}"
154 - for p in $(
155 - eval "$(sed -ne '/PATCH_URI="/,/"/p' < "${d}"/python3.cygport)"
156 - echo ${PATCH_URI}
157 - ); do
158 - # dropped by 01_all_prefix-no-patch-invention.patch
159 - [[ ${p} == *-tkinter-* ]] && continue
160 - epatch "${d}/${p}"
161 - done
162 - fi
163 -
164 - epatch_user
165 -
166 - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
167 - configure.ac \
168 - Lib/distutils/command/install.py \
169 - Lib/distutils/sysconfig.py \
170 - Lib/site.py \
171 - Lib/sysconfig.py \
172 - Lib/test/test_site.py \
173 - Makefile.pre.in \
174 - Modules/Setup.dist \
175 - Modules/getpath.c \
176 - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
177 -
178 - # workaround a development build env problem and muck around
179 - # framework install to get the best of both worlds (non-standard)
180 - sed -i \
181 - -e "s:FRAMEWORKINSTALLAPPSPREFIX=\":FRAMEWORKINSTALLAPPSPREFIX=\"${EPREFIX}:" \
182 - -e '/RUNSHARED=DYLD_FRAMEWORK_PATH/s/FRAMEWORK/LIBRARY/g' \
183 - configure.ac configure || die
184 - sed -i -e '/find/s/$/ || true/' Mac/PythonLauncher/Makefile.in || die
185 -
186 - # Disable ABI flags.
187 - sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed failed"
188 -
189 - eautoreconf
190 -}
191 -
192 -src_configure() {
193 - local disable
194 - use gdbm || disable+=" gdbm"
195 - use ncurses || disable+=" _curses _curses_panel"
196 - use readline || disable+=" readline"
197 - use sqlite || disable+=" _sqlite3"
198 - use ssl || export PYTHON_DISABLE_SSL="1"
199 - use tk || disable+=" _tkinter"
200 - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
201 - export PYTHON_DISABLE_MODULES="${disable}"
202 -
203 - if ! use xml; then
204 - ewarn "You have configured Python without XML support."
205 - ewarn "This is NOT a recommended configuration as you"
206 - ewarn "may face problems parsing any XML documents."
207 - fi
208 -
209 - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
210 - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
211 - fi
212 -
213 - if [[ "$(gcc-major-version)" -ge 4 ]]; then
214 - append-flags -fwrapv
215 - fi
216 -
217 - filter-flags -malign-double
218 -
219 - # https://bugs.gentoo.org/show_bug.cgi?id=50309
220 - if is-flagq -O3; then
221 - is-flagq -fstack-protector-all && replace-flags -O3 -O2
222 - use hardened && replace-flags -O3 -O2
223 - fi
224 -
225 - # Export CC so even AIX will use gcc instead of xlc_r.
226 - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
227 - tc-export CC CXX
228 -
229 - # The configure script fails to use pkg-config correctly.
230 - # http://bugs.python.org/issue15506
231 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
232 -
233 - # Set LDFLAGS so we link modules with -lpython3.2 correctly.
234 - # Needed on FreeBSD unless Python 3.2 is already installed.
235 - # Please query BSD team before removing this!
236 - append-ldflags "-L."
237 -
238 - # make sure setup.py considers Prefix' paths before system ones
239 - use prefix && append-cppflags -I"${EPREFIX}"/usr/include
240 - use prefix && append-ldflags -L"${EPREFIX}"/lib -L"${EPREFIX}"/usr/lib
241 -
242 - local dbmliborder
243 - if use gdbm; then
244 - dbmliborder+="${dbmliborder:+:}gdbm"
245 - fi
246 -
247 - BUILD_DIR="${WORKDIR}/${CHOST}"
248 - mkdir -p "${BUILD_DIR}" || die
249 - cd "${BUILD_DIR}" || die
250 -
251 - if use aqua ; then
252 - ECONF_SOURCE="${S}" OPT="" \
253 - econf \
254 - --enable-framework="${EPREFIX}"/usr/lib \
255 - --config-cache
256 - fi
257 -
258 - # pymalloc #452720
259 - ECONF_SOURCE="${S}" OPT="" \
260 - econf \
261 - $(use aqua && echo --config-cache) \
262 - --with-fpectl \
263 - --enable-shared \
264 - $(use_enable ipv6) \
265 - $(use_with threads) \
266 - --infodir='${prefix}/share/info' \
267 - --mandir='${prefix}/share/man' \
268 - --with-computed-gotos \
269 - --with-dbmliborder="${dbmliborder}" \
270 - --with-libc="" \
271 - --enable-loadable-sqlite-extensions \
272 - --with-system-expat \
273 - --with-system-ffi \
274 - --without-ensurepip \
275 - --without-pymalloc
276 -
277 - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
278 - eerror "configure has detected that the sem_open function is broken."
279 - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
280 - die "Broken sem_open function (bug 496328)"
281 - fi
282 -}
283 -
284 -src_compile() {
285 - # Ensure sed works as expected
286 - # https://bugs.gentoo.org/594768
287 - local -x LC_ALL=C
288 -
289 - # Avoid invoking pgen for cross-compiles.
290 - touch Include/graminit.h Python/graminit.c || die
291 -
292 - cd "${BUILD_DIR}" || die
293 -
294 - emake CPPFLAGS= CFLAGS= LDFLAGS=
295 -
296 - # Work around bug 329499. See also bug 413751 and 457194.
297 - if has_version dev-libs/libffi[pax_kernel]; then
298 - pax-mark E python
299 - else
300 - pax-mark m python
301 - fi
302 -}
303 -
304 -src_test() {
305 - # Tests will not work when cross compiling.
306 - if tc-is-cross-compiler; then
307 - elog "Disabling tests due to crosscompiling."
308 - return
309 - fi
310 -
311 - cd "${BUILD_DIR}" || die
312 -
313 - # Skip failing tests.
314 - local skipped_tests="gdb"
315 -
316 - for test in ${skipped_tests}; do
317 - mv "${S}"/Lib/test/test_${test}.py "${T}"
318 - done
319 -
320 - local -x PYTHONDONTWRITEBYTECODE=
321 - emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
322 - local result=$?
323 -
324 - for test in ${skipped_tests}; do
325 - mv "${T}/test_${test}.py" "${S}"/Lib/test
326 - done
327 -
328 - elog "The following tests have been skipped:"
329 - for test in ${skipped_tests}; do
330 - elog "test_${test}.py"
331 - done
332 -
333 - elog "If you would like to run them, you may:"
334 - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'"
335 - elog "and run the tests separately."
336 -
337 - if [[ ${result} -ne 0 ]]; then
338 - die "emake test failed"
339 - fi
340 -}
341 -
342 -src_install() {
343 - local libdir=${ED}/usr/$(get_libdir)/python${PYVER}
344 -
345 - cd "${BUILD_DIR}" || die
346 -
347 - emake DESTDIR="${D}" altinstall
348 -
349 - if use aqua ; then
350 - # avoid config.status to be triggered
351 - find Mac -name "Makefile" -exec touch \{\} + || die
352 -
353 - # Python_Launcher is kind of a wrapper, and we should fix it for
354 - # Prefix (it uses /usr/bin/pythonw) so useless
355 - # IDLE doesn't run, no idea, but definitely not used
356 - emake DESTDIR="${D}" -C Mac install_Python || die
357 - rmdir "${ED}"/Applications/Python* || die
358 - rmdir "${ED}"/Applications || die
359 -
360 - local fwdir=/usr/$(get_libdir)/Python.framework/Versions/${PYVER}
361 - ln -s "${EPREFIX}"/usr/include/python${PYVER} \
362 - "${ED}${fwdir}"/Headers || die
363 - ln -s "${EPREFIX}"/usr/lib/libpython${PYVER}.dylib \
364 - "${ED}${fwdir}"/Python || die
365 - fi
366 -
367 - sed \
368 - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
369 - -e "s/\(PY_LDFLAGS=\).*/\1/" \
370 - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
371 -
372 - # Fix collisions between different slots of Python.
373 - rm -f "${ED}usr/$(get_libdir)/libpython3.so"
374 -
375 - # Cheap hack to get version with ABIFLAGS
376 - local abiver=$(cd "${ED}usr/include"; echo python*)
377 - if [[ ${abiver} != python${PYVER} ]]; then
378 - # Replace python3.X with a symlink to python3.Xm
379 - rm "${ED}usr/bin/python${PYVER}" || die
380 - dosym "${abiver}" "/usr/bin/python${PYVER}"
381 - # Create python3.X-config symlink
382 - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
383 - # Create python-3.5m.pc symlink
384 - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
385 - fi
386 -
387 - use elibc_uclibc && rm -fr "${libdir}/test"
388 - use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
389 - use tk || rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*}
390 -
391 - use threads || rm -fr "${libdir}/multiprocessing"
392 - use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe
393 -
394 - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
395 -
396 - if use examples; then
397 - insinto /usr/share/doc/${PF}/examples
398 - find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr
399 - doins -r "${S}"/Tools
400 - fi
401 - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
402 - if use aqua ; then
403 - # we do framework, so the emake trick below returns a pathname
404 - # since that won't work here, use a (cheap) trick instead
405 - local libname=libpython${PYVER}
406 - else
407 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
408 - emake --no-print-directory -s -f - 2>/dev/null)
409 - fi
410 - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
411 -
412 - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
413 - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
414 - sed \
415 - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
416 - -e "s:@PYDOC@:pydoc${PYVER}:" \
417 - -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
418 -
419 - # for python-exec
420 - local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
421 -
422 - # if not using a cross-compiler, use the fresh binary
423 - if ! tc-is-cross-compiler; then
424 - local -x PYTHON=./python$(sed -n '/BUILDEXE=/s/^.*=\s\+//p' Makefile)
425 - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
426 - local -x DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}.
427 - else
428 - vars=( PYTHON "${vars[@]}" )
429 - fi
430 -
431 - python_export "python${PYVER}" "${vars[@]}"
432 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
433 - python_domodule epython.py
434 -
435 - # python-exec wrapping support
436 - local pymajor=${PYVER%.*}
437 - mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
438 - # python and pythonX
439 - ln -s "../../../bin/${abiver}" \
440 - "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
441 - ln -s "python${pymajor}" \
442 - "${D}${PYTHON_SCRIPTDIR}/python" || die
443 - # python-config and pythonX-config
444 - # note: we need to create a wrapper rather than symlinking it due
445 - # to some random dirname(argv[0]) magic performed by python-config
446 - cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die
447 - #!/bin/sh
448 - exec "${abiver}-config" "\${@}"
449 - EOF
450 - chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
451 - ln -s "python${pymajor}-config" \
452 - "${D}${PYTHON_SCRIPTDIR}/python-config" || die
453 - # 2to3, pydoc, pyvenv
454 - ln -s "../../../bin/2to3-${PYVER}" \
455 - "${D}${PYTHON_SCRIPTDIR}/2to3" || die
456 - ln -s "../../../bin/pydoc${PYVER}" \
457 - "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
458 - ln -s "../../../bin/pyvenv-${PYVER}" \
459 - "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
460 - # idle
461 - if use tk; then
462 - ln -s "../../../bin/idle${PYVER}" \
463 - "${D}${PYTHON_SCRIPTDIR}/idle" || die
464 - fi
465 -}
466 -
467 -pkg_preinst() {
468 - if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then
469 - python_updater_warning="1"
470 - fi
471 -}
472 -
473 -eselect_python_update() {
474 - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
475 - eselect python update
476 - fi
477 -
478 - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
479 - eselect python update --python${PV%%.*}
480 - fi
481 -}
482 -
483 -pkg_postinst() {
484 - eselect_python_update
485 -
486 - if [[ "${python_updater_warning}" == "1" ]]; then
487 - ewarn "You have just upgraded from an older version of Python."
488 - ewarn
489 - ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules."
490 - fi
491 -}
492 -
493 -pkg_postrm() {
494 - eselect_python_update
495 -}