DIST pypy3-bin-5.7.1-amd64+bzip2+ncurses.tar.lz 6352387 SHA256 0243a016a7b836af72e6e1172f2a4516b9705169a9ba2318093b5c3005917766 SHA512 a63b02dfc11b7675bd4ccceb58801aeb1fd40d0245196dd7fa9f646e4618f46c8e6c4d95072c6432381064d37bc13cb74fbd383d19f8769f069827a8969e7a95 WHIRLPOOL f09b82a6c8a4dada7597bfbe0b2ecd07d90d724eae3d2cc6f35a69c0f219b420236ed8ad37024ad8f9516d729389cbe919f58a48cf1aa323c3a74220c62b8aa3
DIST pypy3-bin-5.8.0-amd64+bzip2+jit+ncurses.tar.lz 10706804 SHA256 fd8e3550426d747f65d52fb2edbe5b9133c1946eed5f1ada5a454fe5a99b489f SHA512 38e46503ba50987a36b68e7d6316b64a00c1e2fa0d2d0b0e0e517bbfa96cb777522346d2c4a78cc7bdf44fa237453dc97867f9323785ba38b21c1f1058d5e701 WHIRLPOOL 59ecc9f9c5d4a29819d0911cc1402f38bd9708ec3e28ba90cb33159b88e11a150a33390c2a73e26831de578ec77598018945e001a1bc3e8f2659b17743a3cdf6
DIST pypy3-bin-5.8.0-amd64+bzip2+ncurses.tar.lz 6626453 SHA256 f840fba90a52e0bfaf9f7f3197f47823154709b86b33dbe61df1f721d8eb46ef SHA512 51d418668c48f8e2d740264855e193353900d56893c0fc81de09e8fab338a36a696a725dd3387ee1d626f82e8319b797bfa4957a5cc8f0b11610b3e6ece67539 WHIRLPOOL 45348517cb0bf8e98ac53149314288716cf8ee972505c354192a46b6472fff694cc037689f2f61707396ed55b9baebe35fa4e99695789f93cb8edeaa08e71fe2
+DIST pypy3-bin-5.9.0-amd64+bzip2+jit+ncurses.tar.lz 10510722 SHA256 e970e4750897e6fb2a703511adc863611fe4a9da1f0190b8b6231babbd56bc02 SHA512 659ed24c9f540168203098fc9b6086cc22a42767b55f3dbbf132b11cf8e1bc01a66baac78d7689dcc31d9f06e7f2ecfbda9969c9ba150d5af9c462e480aa288c WHIRLPOOL 4293c2d4912032360513cbfff03ad9271a90802652fc360c199c3469130871d66d8cf48c87a2d72c660f03e0318c8e08efb87fc33973b0c97b964bd61c2726cb
+DIST pypy3-bin-5.9.0-amd64+bzip2+ncurses.tar.lz 6589457 SHA256 e9ff832ce9a1d3384485348dfe185a9108d104e4b5471d33e145cc340b480e19 SHA512 7ad9e5934bc096b5087f8f1654e598dae1c2802b99b83f48b65c8d0b941a570d17c8f4e0f8b3f591600d7cdc471dc45cd903d166ea639e562453bf7ad93144eb WHIRLPOOL 4047873a056fff3c681d7e127e11452030902f693c20600eefbc1ce0bb8eab6e1b8da7cc1be9f757913b094a5289da3fc094b943b9e3ee12380532a1788ae125
+DIST pypy3-bin-5.9.0-x86+bzip2+jit+ncurses+sse2.tar.lz 8595527 SHA256 9d7a4d4b25f1a3f8a7376e5f19dfcbe98753233dee1c14a98d1a19fb7ca553bd SHA512 6d118cf2e9a657dcf719ca5e508b5b4bb2ab7f85ec3597840706b748ea2f6d582ed884fc34697a3ec36e343de4a40b113d7c8749683a53f2dda299a9e106a2f8 WHIRLPOOL 635f45fd92b94042e44d1f81a2b4312b6c0d79ffa776d21532c495501d344d1f5fa5561eba944f797a6c69a7c52ae59d0a2217af6c7f8e54197fc2fd99c4c83e
+DIST pypy3-bin-5.9.0-x86+bzip2+ncurses+sse2.tar.lz 5654668 SHA256 7d8ced801dc94c0cf19ac580d7ebb21f7ebeae98f3a991ae8a37a925b4fe2669 SHA512 a378159ca39654fbf117e3bd5a0cdcdb23100a21caf837bba5d764b63bf039a791b27d397a6be918a2539d721fc8564f2b10a163df3bae89a4ddb3991ac33ec8 WHIRLPOOL 0e3ab5dacf2bdf5c2e08d21330fd4cad34b5f4424863a999469c53a1b61980fd4307795545f5e735b53aa198634646a11387a753552c66c40dba47599716c2ca
+DIST pypy3-bin-5.9.0-x86+bzip2+ncurses.tar.lz 5640443 SHA256 13c47cdd603d647e8a5fe0d11a7165abd2599ad7ae2f6bbdd47829785b62f955 SHA512 663fae9004eb7f002b849d4697ef67fb72df33faddfba7272a6d795432ecca4c110dc1fab43617909f962584c7519582f085854f55829ccc63dc988654b6add5 WHIRLPOOL 57a16723235fc3a4e1fcb3defb68cecfa0a78f090750c6a3001904d68e1240094659828affc4d34113e81bb7aa5aed5865e4da6afb7aa3a16d815c26fd83c8c5
DIST pypy3-v5.7.1-src.tar.bz2 28811162 SHA256 40ece0145282980ac121390f13709404c0532896507d5767496381180b631bd0 SHA512 f8ead8214ad7d89fe80e24d97b13ece7f2c80b2f11446257a2eab0e3025fc7d8fec26474b0e9eb2b2e3ccd629532dd062829459361b601add12e40793bd5aa60 WHIRLPOOL 180a5cb39c9a5e3840f4940463dd9cccf44486f11a657d2ac644d1eac4561068f08905fdadc495918fb0ceaf018d4b85a3e5756ca6d99a020310b46bdb16ef87
DIST pypy3-v5.8.0-src.tar.bz2 28986883 SHA256 9d090127335c3c0fd2b14c8835bf91752e62756e55ea06aad3353f24a6854223 SHA512 d78b4c899a5643028664365ed973a7b292a8e5b3989cc75203cd381ea3cda7dd73121c574726e23dca86e8364fcfcf42c372c9deee438c805f30d6e1c4ac115a WHIRLPOOL b7567fa21e3ded400a72ec06197184df37e0b5893adfb55622ea9afb668bfbda7ebbecd9b80660efef42f160838966d103c4181a9b07355e873981b35f4bf104
+DIST pypy3-v5.9.0-src.tar.bz2 29055111 SHA256 a014f47f50a1480f871a0b82705f904b38c93c4ca069850eb37653fedafb1b97 SHA512 3d5384d644fdd1bc8b95f5747dbd1771ae06eb2cfc7b57be359b8bf40177676afd097620d0cb9d9000c40d8cce075cfa6bfd92de987d3dd927c04d7d595dc5bd WHIRLPOOL e0936d56c64c3c077910c4713295010ec3e0fabebe654115ddf07407884d1564db7de2f85bcedf1226449c516085f3e4814a2c523f0d48e3ad8ac21150a93a72
DIST pypy3.3-v5.5.0-alpha-src.tar.bz2 25122033 SHA256 d5591c34d77253e9ed57d182b6f49585b95f7c09c3e121f0e8630e5a7e75ab5f SHA512 b2cf9700e45c452293297edffe08e572dffc3c567026b4b5d9165c1ba1b4d858ffc8a6754f5f28781020016c36440e5c02d07562d075b12444c9c32ea5dd2168 WHIRLPOOL 6bde174969413c55d6d077cd14e737c4f034f19935536af1bffaf3a1caa456d2bf6850760a18c274ad99089bd5ab7331d7d185f914cd6c69f708abf857d35df3
DIST python-gentoo-patches-3.3.5-0.tar.xz 12892 SHA256 a7240de9598033cb40f8f273d8104d4e2b1dcaea028d45ac28efaa3c680ff6f7 SHA512 27eef4c2b3f631b000db3f6a5c426d9b498d63a08fe82b1ab7c2c010fb72208109461a5f008d47703852526655b70a734ea95be8742897026db5750bb9cc9d16 WHIRLPOOL edab9222d7da94cab3b1de0e1a27c6c7dbd49194b813a0a1cf9e532063029c4e4f19151c9f4878eeabed3168ff1f97eae7f008280c7ed2897fc14c5516c68d7e
--- /dev/null
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# some random parts need python 2...
+PYTHON_COMPAT=( python2_7 pypy )
+inherit pax-utils python-any-r1 unpacker versionator
+
+BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy3-bin/${PV}"
+MY_P=pypy3-v${PV}
+
+DESCRIPTION="A fast, compliant alternative implementation of Python 3.3 (binary package)"
+HOMEPAGE="http://pypy.org/"
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2
+ amd64? (
+ jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz )
+ !jit? ( ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz )
+ )
+ x86? (
+ cpu_flags_x86_sse2? (
+ jit? ( ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.lz )
+ !jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.lz )
+ )
+ !cpu_flags_x86_sse2? (
+ !jit? ( ${BINHOST}/${P}-x86+bzip2+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/59"
+KEYWORDS="~amd64 ~x86"
+IUSE="gdbm +jit sqlite cpu_flags_x86_sse2 test tk"
+
+# yep, world would be easier if people started filling subslots...
+RDEPEND="
+ app-arch/bzip2:0=
+ dev-libs/expat:0=
+ dev-libs/libffi:0=
+ dev-libs/openssl:0=[-bindist]
+ sys-libs/glibc:2.2=
+ sys-libs/ncurses:0/6
+ sys-libs/zlib:0=
+ gdbm? ( sys-libs/gdbm:0= )
+ sqlite? ( dev-db/sqlite:3= )
+ tk? (
+ dev-lang/tk:0=
+ dev-tcltk/tix:0=
+ )
+ !dev-python/pypy3:0"
+DEPEND="${RDEPEND}
+ app-arch/lzip
+ app-arch/xz-utils
+ test? ( ${PYTHON_DEPS} )"
+# doc? ( ${PYTHON_DEPS}
+# dev-python/sphinx )
+
+S=${WORKDIR}/${MY_P}-src
+
+QA_PREBUILT="
+ usr/lib*/pypy3/pypy3-c
+ usr/lib*/pypy3/libpypy3-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/3/distutils/command/install.py || die
+
+ # apply CPython stdlib patches
+ pushd lib-python/3 > /dev/null || die
+ eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch
+ eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
+ popd > /dev/null || die
+
+ eapply_user
+}
+
+src_compile() {
+ # Tadaam! PyPy compiled!
+ mv "${WORKDIR}"/${P}*/{libpypy3-c.so,pypy3-c} . || die
+ mv "${WORKDIR}"/${P}*/include/*.h include/ || die
+ mv pypy/module/cpyext/include/*.h include/ || die
+ mv pypy/module/cpyext/parse/*.h include/ || die
+
+ #use doc && emake -C pypy/doc/ html
+ #needed even without jit :( also needed in both compile and install phases
+ pax-mark m pypy3-c libpypy3-c.so
+}
+
+src_test() {
+ # (unset)
+ local -x PYTHONDONTWRITEBYTECODE
+
+ # Test runner requires Python 2 too. However, it spawns PyPy3
+ # internally so that we end up testing the correct interpreter.
+ "${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c lib-python || die
+}
+
+src_install() {
+ local dest=/usr/$(get_libdir)/pypy3
+ einfo "Installing PyPy ..."
+ insinto "${dest}"
+ doins -r include lib_pypy lib-python pypy3-c libpypy3-c.so
+ fperms a+x ${dest}/pypy3-c ${dest}/libpypy3-c.so
+ pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so"
+ dosym ../$(get_libdir)/pypy3/pypy3-c /usr/bin/pypy3
+ dodoc README.rst
+
+ if ! use gdbm; then
+ rm -r "${ED%/}${dest}"/lib_pypy/_gdbm* || die
+ fi
+ if ! use sqlite; then
+ rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
+ "${ED%/}${dest}"/lib_pypy/_sqlite3* \
+ "${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || die
+ fi
+ if ! use tk; then
+ rm -r "${ED%/}${dest}"/lib-python/*3/{idlelib,tkinter} \
+ "${ED%/}${dest}"/lib_pypy/_tkinter \
+ "${ED%/}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
+ fi
+
+ # Install docs
+ #use doc && dodoc -r pypy/doc/_build/html
+
+ einfo "Generating caches and byte-compiling ..."
+
+ local -x PYTHON=${ED%/}${dest}/pypy3-c
+ local -x LD_LIBRARY_PATH="${ED%/}${dest}"
+ # 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)/pypy3/site-packages
+ python_export pypy3 EPYTHON
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # Generate Grammar and PatternGrammar pickles.
+ "${PYTHON}" -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,
+# "lzma": "_lzma_build.py",
+# "_decimal": "_decimal_build.py",
+# "ssl": "_ssl_build.py",
+ cffi_targets=( audioop curses syslog pwdgrp resource lzma decimal ssl )
+ 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 "${ED%/}${dest}"/lib_pypy || die
+ for t in "${cffi_targets[@]}"; do
+ # tkinter doesn't work via -m
+ "${PYTHON}" "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
+ done
+
+ # Cleanup temporary objects
+ find "${ED%/}${dest}" -name "_cffi_*.[co]" -delete || die
+ find "${ED%/}${dest}" -type d -empty -delete || die
+
+ # compile the installed modules
+ python_optimize "${ED%/}${dest}"
+}