dev-python/pypy-bin: Bump to 5.9.0
authorMichał Górny <mgorny@gentoo.org>
Mon, 9 Oct 2017 18:18:57 +0000 (20:18 +0200)
committerMichał Górny <mgorny@gentoo.org>
Mon, 9 Oct 2017 18:58:15 +0000 (20:58 +0200)
dev-python/pypy-bin/Manifest
dev-python/pypy-bin/pypy-bin-5.9.0.ebuild [new file with mode: 0644]

index 3ec972ea110e4bf479bc6aa509792c86a724fbfe..7db387bfce18d2b62a9071aa326d8152d872bf2a 100644 (file)
@@ -15,8 +15,15 @@ DIST pypy-bin-5.8.0-amd64+bzip2+ncurses.tar.lz 7617650 SHA256 3b8b42a1bc0ca61295
 DIST pypy-bin-5.8.0-x86+bzip2+jit+ncurses+sse2.tar.lz 10744836 SHA256 9d943e832695ec4d66b07ed9a6dc5e58885ea671d96ba7b728d03b18686111f7 SHA512 bd39bad8f292eabae37b384b9f9f36bc221606b1d2d4aa3df8a45fb1f7ad94755d5fe5dbb7983a49c4e44df87f745ce00691bcb3a5b6c197509c360d9b24d24c WHIRLPOOL b473572a5a84b1ab0510f7274038546836ef3f61ed3cea3260f7ee4e4086093555673064f9fd58c2510b2d80848ec276ca7069372826ef466408c6cabdc74424
 DIST pypy-bin-5.8.0-x86+bzip2+ncurses+sse2.tar.lz 6493961 SHA256 41d51005cf935ab395f318d88f0f80dfaf42d9e6c766f1e65bbfb6af0b25f586 SHA512 97075ef6589d4671dd8ea79fb87c42842023b3f9b5539b3aed8ed90785e001d9725937fb21cf1339df6425ddb50e1e9aab42630770ed39bbd96e953c6369c249 WHIRLPOOL a562152061ee390e033e69fda6508d04e53a5ca6f051a49dd14d78021bff4ed9cb4070bc36f3e175c10538246cdb1bf5cc63f5f70daa50ee079d4cf8ead1fde9
 DIST pypy-bin-5.8.0-x86+bzip2+ncurses.tar.lz 6489741 SHA256 6146c19101d34c1ee8dd03b652f34495b816b93ef5bd41332afd5a302e9385c8 SHA512 e15572f318b0c1f1d68cdb8c1068de853443c7b350b8aa25b41db50d075e2bb6c53530a035c31c98b530e96742c10d0e92ca20081ffefbe475d00e0974aa8b85 WHIRLPOOL cd682aafe11aeed7571186fe99b544f8ea7a182b35c2685d09418df7abe05a49e86e8385d909a1627a2e3b30c9c1e09526de8ef45f69d5ca5e0080a4726a6950
+DIST pypy-bin-5.9.0-amd64+bzip2+jit+ncurses.tar.lz 12849816 SHA256 37f8ed931123477aa9ecb350b72b671ee2c14149328a7c90de8c2b9dc314fbeb SHA512 d4d67f2281d01ecb19602fdaf1149e424e6e331d9e98278ed5f0a948e7ef8b6dc0307accc5d924cb9491f789cea2285cdc9e16f0e9f0c1b76804d259ce5df6bb WHIRLPOOL 8971d32afe20dd73703498c0e47386d89b87f934b89a70979152d39b0537e4a3ce655536acb81aa9f4a02cccb72434261368e50cf6a1cb13a88a4c3bc161451b
+DIST pypy-bin-5.9.0-amd64+bzip2+ncurses.tar.lz 7452420 SHA256 a7ffddd40bb61c18f0d0bb8e82cbcdce7ca6e435c0ec7c0daadab38daecb9223 SHA512 caaa9fce43e67055b75bff059e288124cb5ac7a2d34f512e613b083ab7ee42bc07b26f013250f74e361bcf79498c2cba0277c1005ba1ff9d7cc7b24e18d40475 WHIRLPOOL 0fcb9a19d1ac788eff3477d0a6df3e3801a240f88a7f66a64e8fae3d63711d3a0842bb0acc09fab12c7765b69e56897d99fecb628041060504bfe30b91da4a3b
+DIST pypy-bin-5.9.0-x86+bzip2+jit+ncurses+sse2.tar.lz 10218708 SHA256 c3130b6d01b03521e0333a3d90be643b1ce16ebdd207122d959eeb146377d8de SHA512 b2a4169dc7ad8216f754d1245283024d0accc0543d86acf6452a19e67051482ac4cf5b3cf4ae20be7c865bfdb1515b75030a5d4a02b8965252e7810baaefcff8 WHIRLPOOL abf4276d93be4b8e9370969ca6d8a730a3337ace944fbe1eb75b54032fcf1e2bcbf081dd820918afaadd416ead8cd10797735606d948c17b4bb676adbf358e52
+DIST pypy-bin-5.9.0-x86+bzip2+ncurses+sse2.tar.lz 6269532 SHA256 8d28e152919e01b6cce9aa9350107972307fc63918bec3d24408bfb1fa92f2ad SHA512 ee447e8b03733b41f92625a02653ed70a9f4cb3866a27bcbdbaf1383a00551c5f4617540eea227b120a7adab5cf87afddffde663c7cb79abde852e0bbf18d622 WHIRLPOOL 9b484c003485daa36a5ecfb5aade84b431d692aeaa73e604868934b27e7006b530f7d6661aa580aaceafd1e52ff5573627ed8dd6c3c18da001c20eded9af21dd
+DIST pypy-bin-5.9.0-x86+bzip2+ncurses.tar.lz 6261498 SHA256 64207bf1703e3a3666c60effed55fa176e6be0282504db3271121616e81df8d8 SHA512 6151ed379dc3dd4d9eda892718a5cdeea55386251c27230cb4606fd0a16589035de332c549d108d699c506f8ff46bed3cec3edb960155550a9746ae2fc0d2349 WHIRLPOOL 5e84a4ab7cbe3efff867d9e11c758e4e0ea0d9585745966fb29fea399fff1dc0dfa5dc727a21e84b6100cc659b6bc658a4a574d4e7e89607e3fe8fc90f4873fb
 DIST pypy2-v5.6.0-src.tar.bz2 18388539 SHA256 7411448045f77eb9e087afdce66fe7eafda1876c9e17aad88cf891f762b608b0 SHA512 a92ef611ae2417aaa202b9f5c75dd86e82fc2549e53bab3164cccff37d131542bc71cbce6aaedf428d3dfc7d59a2d3b3a5ed03e3a3439628f29d43c4d30a64de WHIRLPOOL 896894225407f8cd462b094d77723880f6a423d60a79e5d3cf4e0804737fdd0337fc668b05573902fe81f826798b2046cb115c8d230f0810ec0ad2508590ee4a
 DIST pypy2-v5.7.1-src.tar.bz2 18940413 SHA256 d01bee43c6df79f7bbc1149bb3e85f489491fb2358a6a1f9a7f0d6e07715832f SHA512 1ad2dddb40c28d2d3e95a9f0730e765d981dee6e2d0664cf1274eb7c1021690a848c3485c846eac8a8b64425b44946b5b2d223058ec4699155a2122ee7d38b75 WHIRLPOOL e0223d889a26f8a5bc5097561dbe617ff9b11972590f3a8d717d572798a2d685540bc6059e4ce4ff73ce0db9d2476a4274f17dad1f825fb780726d6ecd78a4c8
 DIST pypy2-v5.8.0-src.tar.bz2 19163498 SHA256 504c2d522595baf8775ae1045a217a2b120732537861d31b889d47c340b58bd5 SHA512 222c6ce11b00830e310b766df4c145b7f554f23b87fc6146f214d758d7a6159c5c00af475aa7fa630ef4c37b52cdf2fd73049b6ec3610715b6abc0a925fe1365 WHIRLPOOL 775fbe656996e80fce9cb9a4d4f44fe1b87f0b22f18f74940d5824143337773bb5e3a4d23564bfdc22d010693010f31689026432134a8a2e30ddee670dba1b6d
+DIST pypy2-v5.9.0-src.tar.bz2 19175394 SHA256 de4bf05df47f1349dbac97233d9277bbaf1ef3331663ea2557fd5da3dbcfd0a7 SHA512 3170747e81088043c6a4885bd0bc92e911556420b6c2539a4ed7e62956f1c741651f772def0fb00d8826a1bef9d6f4e79a13682a4456a31d987f7c9bd8608a4d WHIRLPOOL 5cbfc6922469450fdd55cda79afbd41e5750446eb09396ea53a65d6fbe099905103f14ab08665ecd76bf4da44f11d2c4609d8df97999a41d03f2985d6fae32fa
 DIST python-gentoo-patches-2.7.11-0.tar.xz 12916 SHA256 e14b47bb1fd64d366d7dfb8339cc2cbf4a53fc288b11dd83f575eb36a8a6408d SHA512 f0447bb699a163afc08df39b111394377539935546ae23732d7239e78d2bff0c04bc94949f86aef0c1be83736127dbd25c2c531e49befed2d638c3cd4940ac52 WHIRLPOOL 305992849d9d244da1e308e739c9bf62a3ef5c74eb65c765bdc666fb5767eb16c7a609f7c442c17da17f76c3ab81e4b09fa8c21e43f89366539a6a9d656bea77
 DIST python-gentoo-patches-2.7.13-0.tar.xz 13292 SHA256 271835eb36125d09cc5e904ef23a5263acd8e5f513202a8d4f8a9a0f64fc80a8 SHA512 d70f6baba1a465a752c515e33dfdee2a5cc75400fadfb8ea0bd1e82d50089abdf02d7726c697850dc47de2054aa494bbdc08de2673c260b54e609f29dab259ad WHIRLPOOL 6a6d8b099fa814839bf5b3455b3889205c649ef522b35c3a501831d63d0e916d7747b83ac9b8991f8f8c34b328478d84cf7a12a32161ce0fec37204f9c019e2d
+DIST python-gentoo-patches-2.7.14-0.tar.xz 13428 SHA256 3567feeb8f0c66161efaea1922bbfe4e71f6051533ef5f54a74b6ccf9e0359b6 SHA512 6da5b52065752b54e9215d0f0809c75167dc3690d0e94fa21dd7595626925bc5c1dd065d31b3bd696d7087f3986de145d3a335a29eb7bd77442637a7ec2863c1 WHIRLPOOL ab77023ac66def132d1dce72f98add3108fd7be303ef5b167a2374df3a94949c75f089dcfdd84ed05a5eb813d6c22cfecd0de03b5819817a20b04f30030f5f6d
diff --git a/dev-python/pypy-bin/pypy-bin-5.9.0.ebuild b/dev-python/pypy-bin/pypy-bin-5.9.0.ebuild
new file mode 100644 (file)
index 0000000..b528c67
--- /dev/null
@@ -0,0 +1,189 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 pypy )
+inherit pax-utils python-any-r1 unpacker versionator
+
+BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}"
+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? (
+               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/41"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc 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/pypy:0"
+DEPEND="${RDEPEND}
+       app-arch/lzip
+       app-arch/xz-utils
+       doc? ( ${PYTHON_DEPS}
+               dev-python/sphinx )"
+
+S=${WORKDIR}/${MY_P}-src
+
+QA_PREBUILT="
+       usr/lib*/pypy/pypy-c
+       usr/lib*/pypy/libpypy-c.so"
+
+pkg_setup() {
+       if [[ ${MERGE_TYPE} != binary ]]; then
+               use doc && python-any-r1_pkg_setup
+       fi
+}
+
+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
+
+       use doc && emake -C pypy/doc/ html
+       #needed even without jit :( also needed in both compile and install phases
+       pax-mark m pypy-c libpypy-c.so
+}
+
+src_test() {
+       # (unset)
+       local -x PYTHONDONTWRITEBYTECODE
+
+       ./pypy-c ./pypy/test_all.py --pypy=./pypy-c lib-python || die
+}
+
+src_install() {
+       local dest=/usr/$(get_libdir)/pypy
+       einfo "Installing PyPy ..."
+       insinto "${dest}"
+       doins -r include lib_pypy lib-python pypy-c libpypy-c.so
+       fperms a+x ${dest}/pypy-c ${dest}/libpypy-c.so
+       pax-mark m "${ED%/}${dest}/pypy-c" "${ED%/}${dest}/libpypy-c.so"
+       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
+
+       # Install docs
+       use doc && dodoc -r pypy/doc/_build/html
+
+       einfo "Generating caches and byte-compiling ..."
+
+       local -x PYTHON=${ED%/}${dest}/pypy-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)/pypy/site-packages
+       python_export pypy 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,
+       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 "${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}"
+}