From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6F1FA138335 for ; Sat, 5 Jan 2019 13:40:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7FE78E0A8C; Sat, 5 Jan 2019 13:40:03 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3CA66E0A89 for ; Sat, 5 Jan 2019 13:40:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DE634335D25 for ; Sat, 5 Jan 2019 13:39:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9C5A6507 for ; Sat, 5 Jan 2019 13:39:56 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1546695585.77bc0334874fdd6ee7c58b40665ab52cbb46c1a2.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy-bin/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pypy-bin/Manifest dev-python/pypy-bin/pypy-bin-6.0.0-r200.ebuild X-VCS-Directories: dev-python/pypy-bin/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 77bc0334874fdd6ee7c58b40665ab52cbb46c1a2 X-VCS-Branch: master Date: Sat, 5 Jan 2019 13:39:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9f5ccafa-f7c6-480a-8fe7-421e467b1ddf X-Archives-Hash: 2cf630810bf505871acdfb6882eb9fe8 commit: 77bc0334874fdd6ee7c58b40665ab52cbb46c1a2 Author: Michał Górny gentoo org> AuthorDate: Sat Jan 5 13:25:29 2019 +0000 Commit: Michał Górny gentoo org> CommitDate: Sat Jan 5 13:39:45 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77bc0334 dev-python/pypy-bin: Add openssl-1.1 builds Signed-off-by: Michał Górny gentoo.org> dev-python/pypy-bin/Manifest | 5 + dev-python/pypy-bin/pypy-bin-6.0.0-r200.ebuild | 209 +++++++++++++++++++++++++ 2 files changed, 214 insertions(+) diff --git a/dev-python/pypy-bin/Manifest b/dev-python/pypy-bin/Manifest index 4c3b7e0600e..0b5e0611511 100644 --- a/dev-python/pypy-bin/Manifest +++ b/dev-python/pypy-bin/Manifest @@ -10,22 +10,27 @@ DIST pypy-bin-5.10.0-x86+bzip2+ncurses+sse2.tar.lz 5912628 BLAKE2B 5859cb60c9cc6 DIST pypy-bin-5.10.0-x86+bzip2+ncurses.tar.lz 5912272 BLAKE2B e50e3f5cc2c8411700f00009bfb6d9fe0c06b32faed6fc5b94dfd3eeb404e37fe353741aeb0851a4e42dc86e2bed524750cfe527bfc005abbec4cfa6e65444e1 SHA512 ea63b7ff20633bcec55258cf02d0035e213e94595032cf7a43342292cbdd4bf4276ea36d299bb3342e6de8919dadb338f879393950770473329ed6a0fd982897 DIST pypy-bin-6.0.0-amd64+bzip2+jit+libressl+ncurses.ffi7.tar.lz 13018301 BLAKE2B b851ec3e73d4203a4c1eece2cf81dada7cc2b8f7047c9f4e06bd4f24008c1650d95fbd29697fafbdbed953d19595c8e77143a7bd9c8306ab3a15b2c62be48bcf SHA512 8edaf5fdad14886f4120358066fbb09be17d2b7f10dd7600f256a3f3d4b66c90502b85e8a500a70113135ce408ae2877296e1a9cb82d06ae0d031db26e09066c DIST pypy-bin-6.0.0-amd64+bzip2+jit+libressl+ncurses.tar.lz 12940199 BLAKE2B c3790050d17e98a0fc78fa12218267aea62580287fef06559df136b15fbbd791b43ad191f4a91865ceb4e6f0954af40676beb89182a0d6f720644d4aea98f439 SHA512 967a2332439ae349d47713c33518e88f350769c4ba2c8191f63c145b4d036b53308232adcbf08199e0111ba1cf9bb9df78beb16f6933f9b377f617f34af4dee1 +DIST pypy-bin-6.0.0-amd64+bzip2+jit+ncurses.ffi7.ossl11.tar.lz 12981891 BLAKE2B b098e2ee15bbdfbeab5b9ab0b2b818f24160badadc8d7e3e8921eca85251a2246a595964ec491e1d23f84150253f2db23642038b476ebe930129d1b9ad170ff8 SHA512 65202d2970e52df83e206068d66079e7fd3254c9d6fa3e410f23f379b3accf324af09fd3da4c13a483c00b9de523485b8f3008f4160f134b5935948f05028c80 DIST pypy-bin-6.0.0-amd64+bzip2+jit+ncurses.ffi7.tar.lz 12916168 BLAKE2B f23aa0800c48d976f60d6826a424703fed1e1a00b0eb1fa09adce609cd1379f47e42df4669dad6edb59270d708f145049a7342ed73971d33183fef80dbd00539 SHA512 0ec4acf8fa2fb4b7ea409eb21a5dc0dcf14fb5616b8cb11d7892fd99aea6aa0984d0951ac474fd1469fe362e841a684d2292cafe6f69c078d003b90f224f2780 DIST pypy-bin-6.0.0-amd64+bzip2+jit+ncurses.tar.lz 12932560 BLAKE2B 97693b27ce350dd35103cf6176e7113503f790de1fc498810bfd23ed70f324fb148f801ec3d5ffcc1c578d49098ff7c4353da10509c0d56a2f3c6c4dad0a0dfa SHA512 03db8101a5aa288eb59b73d849ca0767a2b6cdffe1bfecb5f4ee5a70ceb7d73c4e1ca9be06424e18e62c2939b07c152bad1c762a9d209faa8bac9b91c48b4317 DIST pypy-bin-6.0.0-amd64+bzip2+libressl+ncurses.ffi7.tar.lz 7546991 BLAKE2B d4e84d839dfa106a4e9b3a60327bae1fa96c326bf219b4f8dddc9dc968412b4be67e80ed1009120cf6a8b14aeede83ebb863bee1296eeafdae95a01ef0efd1eb SHA512 e3775fbf8e2a28d30a90f5bbde84bb03007aa00a6b778834db067d470d97b87c6e15ae792996d801b96d1486aecceff124854f0bd2d2bd8e353c0ee1c12662d4 DIST pypy-bin-6.0.0-amd64+bzip2+libressl+ncurses.tar.lz 7466895 BLAKE2B e199b8330dd4ac2acfe668fd19b2900843c96de961b3ea2fc418ec71c289c98d9c505cd42581e726179441dc877feb7eb57b89ee63c8ec00895302dacb039fbe SHA512 560886744633197abf14c21fb872f41d3d614427861045d6654c72b940e7b16996af4077ef9d531cfecc28c3e65dc64e2db149fe23c370aa8ee446dd5b0359e8 +DIST pypy-bin-6.0.0-amd64+bzip2+ncurses.ffi7.ossl11.tar.lz 7525252 BLAKE2B ccb34328f579a61070d6021f59fb948a80cb11803479a7960d6459cd4df861f125057982c4b051b7e9825ce3eb4c6ae3308b9639c9ed91dac1e042c76af1bd68 SHA512 a2439faae18ed12e1c8d2693471f665c08c29163957f94fe1daf240844e932b012d6cec6d1e70c9b14837ddb800359dacde44ac1444af56b296ab913fd541d44 DIST pypy-bin-6.0.0-amd64+bzip2+ncurses.ffi7.tar.lz 7558174 BLAKE2B 62dc408c958c18d9751466b24c5dde46bc8705634e7312593c996c9517cc36bbaad7278aa09b179bbcb962c4124399d27647b82356c79e20e13434153b8c79b9 SHA512 8c232c7852f3e8d9e3b5bfcc3785e171ea64c63d3e1658662d9eb0340a21efecd4fa037b15ede155015b262e2f60e4fa0e80d72beb18d5e4b01dcb3e003a516f DIST pypy-bin-6.0.0-amd64+bzip2+ncurses.tar.lz 7547568 BLAKE2B 713cd16e54cdab7e25c091db931a760f51de990bf53e566b711754c5a705507257f1c54abc5f85aba7b2449f6d3967e820d14f55953a3880e7bac3eb028db203 SHA512 e8efb0af8e8ef89c95e5fe73b177f34b9120a172e0af7e52990e428e498e3b84b31eba3dfaa28bffcb121625b5494eaeec71af2a2fa46d6b888c148ca162836b DIST pypy-bin-6.0.0-x86+bzip2+jit+libressl+ncurses+sse2.ffi7.tar.lz 9857459 BLAKE2B a125f68fe7ca8259d614c1d375029df776944a8f14960528d5b96125a1b46c7c014894ca3f952157957cca654dc8143033d04f4db0fdef182a6915304b630dcb SHA512 4fa02202d2ceee6cdbd2473e8f3028695a73577504053eafd87464dd75116028a3b2129be16d422fbac5372cd7623c0ee4d9ab75b87a1423dac9470eecda1227 DIST pypy-bin-6.0.0-x86+bzip2+jit+libressl+ncurses+sse2.tar.lz 10268326 BLAKE2B 0f0c9b9f9a586b7dfc1099a9dbe28fe56d49c808ffd2e632f428b8992d39db3db7f70fd4f2fd0fb261d8c85202ab4ec2febc35b1bd4dc86f38ab8fba5715541c SHA512 40986918e0ea94053b3adc5594a21acff34d4f18b0f4827ce9cb2646d3ddcda8fb6b107ac17869c2c44f99f153a2829fc3ae89e8d4caf61ead4c4a4c9b8e963d +DIST pypy-bin-6.0.0-x86+bzip2+jit+ncurses+sse2.ffi7.ossl11.tar.lz 9877659 BLAKE2B fb017132e28f9249b4cf1878694cde812fb53c26e58e66156d0c7512a66baa8c4961d7aaf5358d3f2acdac9aa41c6abfd9432d9c7e6fc199cd80ade911db3790 SHA512 516f7290ea2f36c9fa6c62464c32bf80f6f15b4d94dee50d1f153400f0b1fe9c12afef517cedee014d8e88f254985c70cba08a0da29250d78057d222b4e529f2 DIST pypy-bin-6.0.0-x86+bzip2+jit+ncurses+sse2.ffi7.tar.lz 9859596 BLAKE2B e76d456b931bb9ffd5f5140cf4125ed1446ec81432785a97f7a631adb3b97c7184d174ef928df0089e6327a1818ce70072e6835561877a6a6398bc6c6ab6705d SHA512 80895434011f8ba14cf04cd060e6b022f8f7a92fc11b3005bf92b20c267200aafa98f114eaa7b473ce2a27a44f22882ed20b59b7bff4d1b1eef3540b9154e1e5 DIST pypy-bin-6.0.0-x86+bzip2+jit+ncurses+sse2.tar.lz 9857367 BLAKE2B 48d9271213dfa04991fbefab294cf3ee1a8d69d954315b0b3e543bffaae2134f0ce1e5f3da09e45041b988b0e08359c68b49acaf14c8bf26913cb540ac1928f6 SHA512 deeabbf19d95a6e6e55dea59cb0ff06fdf1ce687d6cd9499ef010d90445e05102056b5c8bfe9f44528cf86f087e4a2b1dee00fb5df1f7526673333cf73d5c8ab DIST pypy-bin-6.0.0-x86+bzip2+libressl+ncurses+sse2.ffi7.tar.lz 5940394 BLAKE2B 4f83e1bd745e686999c39fc8976c204a95b1e2e2f6a4ec23020e136f0c1046eed4ba4e8327c7bd6c2f11d80abb398fa46fd57ea18f9e9a7ed24577c67e274e7c SHA512 7007867780b9dd8f0501d278a651e0e6e82bdfcf40e66344a4d194ea71d311e0efdb8ac00a7bc413d796cadcbbe10b603707c371bec4fe12f1b090da81e11226 DIST pypy-bin-6.0.0-x86+bzip2+libressl+ncurses+sse2.tar.lz 6301309 BLAKE2B 8f8e16bd05da671fbe3e762dff33f32b1c50f3ce866432d3bc039724d025192a7116d6aa2590007e3adb52e5b3dd3ad9eadbc7c8f388bc7e02b049fcd980e3f1 SHA512 e6d32352ecb3a17e614f4ddac600f7dafb0a39fa807ba2fcce506eae881ee5c8f959e2d797f8126bfea74b801b76efbd9a3df86dc03c8521ec320fd06d05659e DIST pypy-bin-6.0.0-x86+bzip2+libressl+ncurses.ffi7.tar.lz 5938624 BLAKE2B 218e2a75d601cad1346d4513f01e8b9544cf2d8e0de68e43e6645758efa94e8f770e06c73be16e53964752e2a747414141a99137e7f6820f33ea1d7f3463736b SHA512 c2d17b21de8fc2658c4ffca3ca02138d2446503427c7fb4d488a2a58e1e0b0bcc1eaa0548dbe176cd7a668cdf296ffdb3a0356b27dbfbd7b6be44d2224779358 DIST pypy-bin-6.0.0-x86+bzip2+libressl+ncurses.tar.lz 6290475 BLAKE2B e51a49ee9cdf7e2b9194e00ec9480cef3668e7c1fa7e632eaff0b7f1ba415096bdb2a2a4322ae25b611e4ffab28f00d15a4429142bf7a62bf0d32ba4a157ed79 SHA512 258404258f7bb96fc55cf4bd8a086d598e0b583a62b282ed6809af740c09792dd854efe4a3780b85d7b84ff1c8b0169875dae38f271f95db76db494d63f0774b +DIST pypy-bin-6.0.0-x86+bzip2+ncurses+sse2.ffi7.ossl11.tar.lz 5947112 BLAKE2B 9153940c44f99fa0c9e911e3a815679f93413fa4be46cbd965b48e8ffe68a1e7ebfc6e872bd7d59e4d0e0ff9d02fbd5c30b1e0d9db1521448c0b0ffb89cbee7c SHA512 435d33f8ff36f424c162a450f3a9c8419bb46280b34b9d2370bc18f961a78f144128aa712dba094755e7d350cee97f395a9b61fdcc6f0d4054703dbd01d29c3e DIST pypy-bin-6.0.0-x86+bzip2+ncurses+sse2.ffi7.tar.lz 5943737 BLAKE2B ba39bff2fcccebed496c12ff85d95ea6f7d6092661b251673b53c061fba831eeab74b1286d4fb3873bbd5daa6f4ad5af2cef2c9db561afecd34285b806e0b794 SHA512 8c6a6dd5adb6a0b80c1ea3cc461ff2316084319e26b3f0c531ccf67bf518f603156624596d94f65a2b307e462cc97cef39dff33d662f847a20620103b78fcc5e DIST pypy-bin-6.0.0-x86+bzip2+ncurses+sse2.tar.lz 5979890 BLAKE2B 8f47c34f88b7f4900808dfcc8b22920c8053716dd8f46382d5656a15d742be13d5334e40cfca86dac663695bbd7b6ada58546130ee4936ca87c916713d069614 SHA512 498478f91302312b54cec3f42a03f817ef02b4d3bd66019c9bf9e0398b58a791202bbbdffd25778a20ae5d49bbc34d956f2f5bbd5d132c098e979357f8ca5e59 +DIST pypy-bin-6.0.0-x86+bzip2+ncurses.ffi7.ossl11.tar.lz 5940234 BLAKE2B ba4133f9c261c7b8d7c3a5c04de61398f48c1d34d146009535c5445dd8abab17e914fa675c6c9f4717cafb1be5ee8defcb6d1ecb20cda60223677bf5c2b22db9 SHA512 afe12fcac3a93b8b139a0cbbc5475edd23eceddf3b6e58e5d425459dbc51056ad10459133adee3f7d282c403e881fa0d4d1f9c30955163e580c87be7e1b7825a DIST pypy-bin-6.0.0-x86+bzip2+ncurses.ffi7.tar.lz 5939972 BLAKE2B 86ca6f1dd9f00d993986476fbeb253b2a7efb862dec7c8b90945c32e9418d52460d3d305fd0e182e9351e6de148928cf786f461cb3174601d84f5604ca1ae132 SHA512 4d14693ba0bcf3d6f56c9e8a45959d84ba5aacbccee0a643a8c713569a0e5de1449e726e7c813a93105c8dd145f1be6a7f78eec22bbb5c5a8aba31f15cffdbe5 DIST pypy-bin-6.0.0-x86+bzip2+ncurses.tar.lz 5941591 BLAKE2B 45a4c150e1403fd5a579c3d452cd09f4954238fff18702c5cafc1b23f12134f07a05c1aa9277b76b5d8c4e1da48d64699a2540feb4000b6bd1c285ab59b6c4a1 SHA512 3a69284917e0c233ac27fd96707b43499a5d9e05da946cad21f89fd605d34483454703887efc1049abeeb1d503800061027794d277123ad874583074203ce3a0 DIST pypy2-v5.10.0-src.tar.bz2 19181430 BLAKE2B 4a0808c74fb167a7e98625f1d5b8559bb3a0383445387a0c48f951d75d009c57806eb600a141a84a7cb800e2f53fe091367cbb0b23192bc52b995cb65246c076 SHA512 11892418d753ddc59e928a5f59b3406b7c22b8689ad6995eeb183182dbb5184117e68bb567c770ffa60a14d6763550d658e260584e65da5025ed481f48501379 diff --git a/dev-python/pypy-bin/pypy-bin-6.0.0-r200.ebuild b/dev-python/pypy-bin/pypy-bin-6.0.0-r200.ebuild new file mode 100644 index 00000000000..b36272792ba --- /dev/null +++ b/dev-python/pypy-bin/pypy-bin-6.0.0-r200.ebuild @@ -0,0 +1,209 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit pax-utils python-utils-r1 unpacker versionator + +BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}.ffi7.ossl11" +BINHOST_LIBRESSL="https://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}.ffi7" +CPY_PATCHSET_VERSION="2.7.14-0" +MY_P=pypy2-v${PV} + +DESCRIPTION="Pre-built version of PyPy" +HOMEPAGE="http://pypy.org/" +SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2 + https://dev.gentoo.org/~floppym/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz + amd64? ( + !libressl? ( + jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.ffi7.ossl11.tar.lz ) + !jit? ( ${BINHOST}/${P}-amd64+bzip2+ncurses.ffi7.ossl11.tar.lz ) + ) + libressl? ( + jit? ( ${BINHOST_LIBRESSL}/${P}-amd64+bzip2+jit+libressl+ncurses.ffi7.tar.lz ) + !jit? ( ${BINHOST_LIBRESSL}/${P}-amd64+bzip2+libressl+ncurses.ffi7.tar.lz ) + ) + ) + x86? ( + !libressl? ( + cpu_flags_x86_sse2? ( + jit? ( ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.ffi7.ossl11.tar.lz ) + !jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.ffi7.ossl11.tar.lz ) + ) + !cpu_flags_x86_sse2? ( + !jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses.ffi7.ossl11.tar.lz ) + ) + ) + libressl? ( + cpu_flags_x86_sse2? ( + jit? ( ${BINHOST_LIBRESSL}/${P}-x86+bzip2+jit+libressl+ncurses+sse2.ffi7.tar.lz ) + !jit? ( ${BINHOST_LIBRESSL}/${P}-x86+bzip2+libressl+ncurses+sse2.ffi7.tar.lz ) + ) + !cpu_flags_x86_sse2? ( + !jit? ( ${BINHOST_LIBRESSL}/${P}-x86+bzip2+libressl+ncurses.ffi7.tar.lz ) + ) + ) + )" + +# Supported variants +REQUIRED_USE="x86? ( !cpu_flags_x86_sse2? ( !jit ) )" + +LICENSE="MIT" +# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' +SLOT="0/41" +KEYWORDS="~amd64 ~x86" +IUSE="gdbm +jit libressl sqlite cpu_flags_x86_sse2 test tk" + +RDEPEND=" + app-arch/bzip2:0/1 + dev-libs/expat:0/0 + dev-libs/libffi:0/7 + sys-devel/gcc:* + sys-libs/glibc + sys-libs/ncurses:0/6 + sys-libs/zlib:0/1 + gdbm? ( sys-libs/gdbm:0= ) + !libressl? ( dev-libs/openssl:0/1.1[-bindist] ) + libressl? ( dev-libs/libressl:0/44 ) + sqlite? ( dev-db/sqlite:3= ) + tk? ( + dev-lang/tk:0= + dev-tcltk/tix:0= + ) + !dev-python/pypy:0" +DEPEND="${RDEPEND} + app-arch/lzip + app-arch/xz-utils" + +S=${WORKDIR}/${MY_P}-src + +QA_PREBUILT=" + usr/lib*/pypy/pypy-c + usr/lib*/pypy/libpypy-c.so" + +src_prepare() { + eapply "${FILESDIR}/4.0.0-gentoo-path.patch" + eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" + + sed -e "s^@EPREFIX@^${EPREFIX}^" \ + -e "s^@libdir@^$(get_libdir)^" \ + -i lib-python/2.7/distutils/command/install.py || die + + # apply CPython stdlib patches + pushd lib-python/2.7 > /dev/null || die + # TODO: cpy turkish locale patch now fixes C code + # probably needs better port to pypy, if it is broken there + eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch + eapply "${WORKDIR}"/patches/62_all_xml.use_pyxml.patch + popd > /dev/null || die + + eapply_user +} + +src_compile() { + # Tadaam! PyPy compiled! + mv "${WORKDIR}"/${P}*/{libpypy-c.so,pypy-c} . || die + mv "${WORKDIR}"/${P}*/include/*.h include/ || die + # (not installed by pypy) + rm pypy/module/cpyext/include/_numpypy/numpy/README || die + mv pypy/module/cpyext/include/* include/ || die + mv pypy/module/cpyext/parse/*.h include/ || die + + pax-mark m pypy-c libpypy-c.so + + einfo "Generating caches and CFFI modules ..." + + # Generate Grammar and PatternGrammar pickles. + ./pypy-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ + || die "Generation of Grammar and PatternGrammar pickles failed" + + # Generate cffi modules + # Please keep in sync with pypy/tool/build_cffi_imports.py! +#cffi_build_scripts = { +# "sqlite3": "_sqlite3_build.py", +# "audioop": "_audioop_build.py", +# "tk": "_tkinter/tklib_build.py", +# "curses": "_curses_build.py" if sys.platform != "win32" else None, +# "syslog": "_syslog_build.py" if sys.platform != "win32" else None, +# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None, +# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None, +# "resource": "_resource_build.py" if sys.platform != "win32" else None, + cffi_targets=( audioop curses syslog pwdgrp resource ) + use gdbm && cffi_targets+=( gdbm ) + use sqlite && cffi_targets+=( sqlite3 ) + use tk && cffi_targets+=( tkinter/tklib ) + + local t + # all modules except tkinter output to . + # tkinter outputs to the correct dir ... + cd lib_pypy || die + for t in "${cffi_targets[@]}"; do + # tkinter doesn't work via -m + ../pypy-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" + done + + # Cleanup temporary objects + find -name "_cffi_*.[co]" -delete || die + find -type d -empty -delete || die +} + +src_test() { + # (unset) + local -x PYTHONDONTWRITEBYTECODE= + + local ignored_tests=( + # network + --ignore=lib-python/2.7/test/test_urllibnet.py + --ignore=lib-python/2.7/test/test_urllib2net.py + # lots of free space + --ignore=lib-python/2.7/test/test_zipfile64.py + # no module named 'worker' -- a lot + --ignore=lib-python/2.7/test/test_xpickle.py + ) + + ./pypy-c ./pypy/test_all.py --pypy=./pypy-c -vv \ + "${ignored_tests[@]}" lib-python || die +} + +src_install() { + local dest=/usr/$(get_libdir)/pypy + einfo "Installing PyPy ..." + exeinto "${dest}" + doexe pypy-c libpypy-c.so + pax-mark m "${ED%/}${dest}/pypy-c" "${ED%/}${dest}/libpypy-c.so" + insinto "${dest}" + # preserve mtimes to avoid obsoleting caches + insopts -p + doins -r include lib_pypy lib-python + dosym ../$(get_libdir)/pypy/pypy-c /usr/bin/pypy + dodoc README.rst + + if ! use gdbm; then + rm -r "${ED%/}${dest}"/lib_pypy/gdbm.py \ + "${ED%/}${dest}"/lib-python/*2.7/test/test_gdbm.py || die + fi + if ! use sqlite; then + rm -r "${ED%/}${dest}"/lib-python/*2.7/sqlite3 \ + "${ED%/}${dest}"/lib_pypy/_sqlite3.py \ + "${ED%/}${dest}"/lib-python/*2.7/test/test_sqlite.py || die + fi + if ! use tk; then + rm -r "${ED%/}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \ + "${ED%/}${dest}"/lib_pypy/_tkinter \ + "${ED%/}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die + fi + + local -x PYTHON=${ED%/}${dest}/pypy-c + # we can't use eclass function since PyPy is dumb and always gives + # paths relative to the interpreter + local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy/site-packages + python_export pypy EPYTHON + + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_domodule epython.py + + einfo "Byte-compiling Python standard library..." + + # compile the installed modules + python_optimize "${ED%/}${dest}" +}