commit:     67aa32ae2dad6462b40299f0ac958064b7e21726
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  4 15:16:06 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Oct  4 16:00:54 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67aa32ae

dev-python/pypy-bin: New version built on libffi.so.7

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pypy-bin/Manifest                   |  10 ++
 dev-python/pypy-bin/pypy-bin-6.0.0-r100.ebuild | 208 +++++++++++++++++++++++++
 2 files changed, 218 insertions(+)

diff --git a/dev-python/pypy-bin/Manifest b/dev-python/pypy-bin/Manifest
index 80e3da1f11b..7c893464428 100644
--- a/dev-python/pypy-bin/Manifest
+++ b/dev-python/pypy-bin/Manifest
@@ -12,6 +12,16 @@ DIST pypy-bin-6.0.0-amd64+bzip2+jit+libressl+ncurses.tar.lz 
12940199 BLAKE2B c37
 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.tar.lz 7466895 BLAKE2B 
e199b8330dd4ac2acfe668fd19b2900843c96de961b3ea2fc418ec71c289c98d9c505cd42581e726179441dc877feb7eb57b89ee63c8ec00895302dacb039fbe
 SHA512 
560886744633197abf14c21fb872f41d3d614427861045d6654c72b940e7b16996af4077ef9d531cfecc28c3e65dc64e2db149fe23c370aa8ee446dd5b0359e8
 DIST pypy-bin-6.0.0-amd64+bzip2+ncurses.tar.lz 7547568 BLAKE2B 
713cd16e54cdab7e25c091db931a760f51de990bf53e566b711754c5a705507257f1c54abc5f85aba7b2449f6d3967e820d14f55953a3880e7bac3eb028db203
 SHA512 
e8efb0af8e8ef89c95e5fe73b177f34b9120a172e0af7e52990e428e498e3b84b31eba3dfaa28bffcb121625b5494eaeec71af2a2fa46d6b888c148ca162836b
+DIST pypy-bin-6.0.0-ffi7-amd64+bzip2+jit+libressl+ncurses.tar.lz 13018301 
BLAKE2B 
b851ec3e73d4203a4c1eece2cf81dada7cc2b8f7047c9f4e06bd4f24008c1650d95fbd29697fafbdbed953d19595c8e77143a7bd9c8306ab3a15b2c62be48bcf
 SHA512 
8edaf5fdad14886f4120358066fbb09be17d2b7f10dd7600f256a3f3d4b66c90502b85e8a500a70113135ce408ae2877296e1a9cb82d06ae0d031db26e09066c
+DIST pypy-bin-6.0.0-ffi7-amd64+bzip2+jit+ncurses.tar.lz 12916168 BLAKE2B 
f23aa0800c48d976f60d6826a424703fed1e1a00b0eb1fa09adce609cd1379f47e42df4669dad6edb59270d708f145049a7342ed73971d33183fef80dbd00539
 SHA512 
0ec4acf8fa2fb4b7ea409eb21a5dc0dcf14fb5616b8cb11d7892fd99aea6aa0984d0951ac474fd1469fe362e841a684d2292cafe6f69c078d003b90f224f2780
+DIST pypy-bin-6.0.0-ffi7-amd64+bzip2+libressl+ncurses.tar.lz 7546991 BLAKE2B 
d4e84d839dfa106a4e9b3a60327bae1fa96c326bf219b4f8dddc9dc968412b4be67e80ed1009120cf6a8b14aeede83ebb863bee1296eeafdae95a01ef0efd1eb
 SHA512 
e3775fbf8e2a28d30a90f5bbde84bb03007aa00a6b778834db067d470d97b87c6e15ae792996d801b96d1486aecceff124854f0bd2d2bd8e353c0ee1c12662d4
+DIST pypy-bin-6.0.0-ffi7-amd64+bzip2+ncurses.tar.lz 7558174 BLAKE2B 
62dc408c958c18d9751466b24c5dde46bc8705634e7312593c996c9517cc36bbaad7278aa09b179bbcb962c4124399d27647b82356c79e20e13434153b8c79b9
 SHA512 
8c232c7852f3e8d9e3b5bfcc3785e171ea64c63d3e1658662d9eb0340a21efecd4fa037b15ede155015b262e2f60e4fa0e80d72beb18d5e4b01dcb3e003a516f
+DIST pypy-bin-6.0.0-ffi7-x86+bzip2+jit+libressl+ncurses+sse2.tar.lz 9857459 
BLAKE2B 
a125f68fe7ca8259d614c1d375029df776944a8f14960528d5b96125a1b46c7c014894ca3f952157957cca654dc8143033d04f4db0fdef182a6915304b630dcb
 SHA512 
4fa02202d2ceee6cdbd2473e8f3028695a73577504053eafd87464dd75116028a3b2129be16d422fbac5372cd7623c0ee4d9ab75b87a1423dac9470eecda1227
+DIST pypy-bin-6.0.0-ffi7-x86+bzip2+jit+ncurses+sse2.tar.lz 9859596 BLAKE2B 
e76d456b931bb9ffd5f5140cf4125ed1446ec81432785a97f7a631adb3b97c7184d174ef928df0089e6327a1818ce70072e6835561877a6a6398bc6c6ab6705d
 SHA512 
80895434011f8ba14cf04cd060e6b022f8f7a92fc11b3005bf92b20c267200aafa98f114eaa7b473ce2a27a44f22882ed20b59b7bff4d1b1eef3540b9154e1e5
+DIST pypy-bin-6.0.0-ffi7-x86+bzip2+libressl+ncurses+sse2.tar.lz 5940394 
BLAKE2B 
4f83e1bd745e686999c39fc8976c204a95b1e2e2f6a4ec23020e136f0c1046eed4ba4e8327c7bd6c2f11d80abb398fa46fd57ea18f9e9a7ed24577c67e274e7c
 SHA512 
7007867780b9dd8f0501d278a651e0e6e82bdfcf40e66344a4d194ea71d311e0efdb8ac00a7bc413d796cadcbbe10b603707c371bec4fe12f1b090da81e11226
+DIST pypy-bin-6.0.0-ffi7-x86+bzip2+libressl+ncurses.tar.lz 5938624 BLAKE2B 
218e2a75d601cad1346d4513f01e8b9544cf2d8e0de68e43e6645758efa94e8f770e06c73be16e53964752e2a747414141a99137e7f6820f33ea1d7f3463736b
 SHA512 
c2d17b21de8fc2658c4ffca3ca02138d2446503427c7fb4d488a2a58e1e0b0bcc1eaa0548dbe176cd7a668cdf296ffdb3a0356b27dbfbd7b6be44d2224779358
+DIST pypy-bin-6.0.0-ffi7-x86+bzip2+ncurses+sse2.tar.lz 5943737 BLAKE2B 
ba39bff2fcccebed496c12ff85d95ea6f7d6092661b251673b53c061fba831eeab74b1286d4fb3873bbd5daa6f4ad5af2cef2c9db561afecd34285b806e0b794
 SHA512 
8c6a6dd5adb6a0b80c1ea3cc461ff2316084319e26b3f0c531ccf67bf518f603156624596d94f65a2b307e462cc97cef39dff33d662f847a20620103b78fcc5e
+DIST pypy-bin-6.0.0-ffi7-x86+bzip2+ncurses.tar.lz 5939972 BLAKE2B 
86ca6f1dd9f00d993986476fbeb253b2a7efb862dec7c8b90945c32e9418d52460d3d305fd0e182e9351e6de148928cf786f461cb3174601d84f5604ca1ae132
 SHA512 
4d14693ba0bcf3d6f56c9e8a45959d84ba5aacbccee0a643a8c713569a0e5de1449e726e7c813a93105c8dd145f1be6a7f78eec22bbb5c5a8aba31f15cffdbe5
 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.tar.lz 9857367 BLAKE2B 
48d9271213dfa04991fbefab294cf3ee1a8d69d954315b0b3e543bffaae2134f0ce1e5f3da09e45041b988b0e08359c68b49acaf14c8bf26913cb540ac1928f6
 SHA512 
deeabbf19d95a6e6e55dea59cb0ff06fdf1ce687d6cd9499ef010d90445e05102056b5c8bfe9f44528cf86f087e4a2b1dee00fb5df1f7526673333cf73d5c8ab
 DIST pypy-bin-6.0.0-x86+bzip2+libressl+ncurses+sse2.tar.lz 6301309 BLAKE2B 
8f8e16bd05da671fbe3e762dff33f32b1c50f3ce866432d3bc039724d025192a7116d6aa2590007e3adb52e5b3dd3ad9eadbc7c8f388bc7e02b049fcd980e3f1
 SHA512 
e6d32352ecb3a17e614f4ddac600f7dafb0a39fa807ba2fcce506eae881ee5c8f959e2d797f8126bfea74b801b76efbd9a3df86dc03c8521ec320fd06d05659e

diff --git a/dev-python/pypy-bin/pypy-bin-6.0.0-r100.ebuild 
b/dev-python/pypy-bin/pypy-bin-6.0.0-r100.ebuild
new file mode 100644
index 00000000000..82d0da2ce0a
--- /dev/null
+++ b/dev-python/pypy-bin/pypy-bin-6.0.0-r100.ebuild
@@ -0,0 +1,208 @@
+# Copyright 1999-2018 Gentoo Foundation
+# 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";
+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}-ffi7-amd64+bzip2+jit+ncurses.tar.lz )
+                       !jit? ( ${BINHOST}/${P}-ffi7-amd64+bzip2+ncurses.tar.lz 
)
+               )
+               libressl? (
+                       jit? ( 
${BINHOST}/${P}-ffi7-amd64+bzip2+jit+libressl+ncurses.tar.lz )
+                       !jit? ( 
${BINHOST}/${P}-ffi7-amd64+bzip2+libressl+ncurses.tar.lz )
+               )
+       )
+       x86? (
+               !libressl? (
+                       cpu_flags_x86_sse2? (
+                               jit? ( 
${BINHOST}/${P}-ffi7-x86+bzip2+jit+ncurses+sse2.tar.lz )
+                               !jit? ( 
${BINHOST}/${P}-ffi7-x86+bzip2+ncurses+sse2.tar.lz )
+                       )
+                       !cpu_flags_x86_sse2? (
+                               !jit? ( 
${BINHOST}/${P}-ffi7-x86+bzip2+ncurses.tar.lz )
+                       )
+               )
+               libressl? (
+                       cpu_flags_x86_sse2? (
+                               jit? ( 
${BINHOST}/${P}-ffi7-x86+bzip2+jit+libressl+ncurses+sse2.tar.lz )
+                               !jit? ( 
${BINHOST}/${P}-ffi7-x86+bzip2+libressl+ncurses+sse2.tar.lz )
+                       )
+                       !cpu_flags_x86_sse2? (
+                               !jit? ( 
${BINHOST}/${P}-ffi7-x86+bzip2+libressl+ncurses.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/0[-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}"
+}

Reply via email to