From 16449a80e28af2209916cc66d19c9a44ca2b90d9 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 20 Feb 2019 15:11:50 +0000 Subject: gentoo resync : 20.02.2019 --- dev-python/pypy-bin/Manifest | 3 +- dev-python/pypy-bin/files/7.0.0-gentoo-path.patch | 52 ++++++ dev-python/pypy-bin/pypy-bin-7.0.0-r1.ebuild | 208 ++++++++++++++++++++++ dev-python/pypy-bin/pypy-bin-7.0.0.ebuild | 204 --------------------- 4 files changed, 262 insertions(+), 205 deletions(-) create mode 100644 dev-python/pypy-bin/files/7.0.0-gentoo-path.patch create mode 100644 dev-python/pypy-bin/pypy-bin-7.0.0-r1.ebuild delete mode 100644 dev-python/pypy-bin/pypy-bin-7.0.0.ebuild (limited to 'dev-python/pypy-bin') diff --git a/dev-python/pypy-bin/Manifest b/dev-python/pypy-bin/Manifest index 11974a6c8331..84f19fcf2ae8 100644 --- a/dev-python/pypy-bin/Manifest +++ b/dev-python/pypy-bin/Manifest @@ -1,6 +1,7 @@ AUX 1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch 555 BLAKE2B 4976bf66e4e96f89e64ad79910bb7b6fc7c3929cf7b7f1a0a59e66b5bb87e600864df2556f1dccf7695223121c7271382227e16cfb8fb7851cf56be25542b7ab SHA512 f2df0a67480bbe46fbb25dd06abcbc226a7034410855105012045287e662a598fae467f5bc81b3d4adb738f812bf41819aaa5827151db0d6bba573305ee88474 AUX 4.0.0-gentoo-path.patch 1915 BLAKE2B edc8656d4bed771124c22d45e130aa7ef812ae7a4829091216222fa80371cb7a4100850f366e5065b565f27542bb7e4e599d06cca6bdfa2bf189905e2c498ddf SHA512 d1c9925ddd19c252d4222dbea6db866a867abefff65219f7fa0fe070fa68e675f3a815f418d214eb508375a49911dd3cc4851f42552e5fff0b7fc2d7f0272278 AUX 5.8.0_all_distutils_cxx.patch 18248 BLAKE2B c48346df7bab8a38552eb7439e37f2c57c00ec534cb5e20a54d0c2a7d5f975b65746e556dc0a5876665498f165945adf9e8af5a053980b317dfe4c75c2338f62 SHA512 a1bfe2ac4380c87094d4b934603956260eafa5ad6059160603e636690d99ae65181e5752fba38f145ccfb263340a1aa03a46e31f7ceccb5643df14b0190e1d8a +AUX 7.0.0-gentoo-path.patch 1945 BLAKE2B 15cf6008d0032fd839e91e968eeadce5b0ab633f97cc0ce17c8c838746a83bab0255d3f009dfe42f322f512b2996608963db70e936a7c4535c8533e3f80d15f3 SHA512 8d946c79b116d8912f0b68146579b7cce70adf439023678d803c0b8085d53c8409d1fe0a66e53ecde2cd1bf22154e456b62f09561f62dab13f01c3fbdd9bb901 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 @@ -43,5 +44,5 @@ DIST python-gentoo-patches-2.7.15.tar.xz 16208 BLAKE2B 5739c2b3a236d48f8e33f0fe6 EBUILD pypy-bin-6.0.0-r100.ebuild 6329 BLAKE2B c2533c30797562a60c8db615279cbf110c3b7756a8ea772da095936fd6125da948d4fe625fb9edccd5c255610287b09280059d3b3c5a324de6030f4dab1b0dab SHA512 644af55ab278e7b4d5441f5dc8adc1b0b91e9b5a901aa32c2eb0979ad290ea5164844e78bb073aa303d9c90847352f158aa9b53da6fac7e39fefbebb79a84356 EBUILD pypy-bin-6.0.0-r200.ebuild 6493 BLAKE2B 2b6bbfd1ec9f0828ef30765a6e8b1c5f3ac59a296f1b3174136ba74b3010a1727a5032f9ab27d282e453dbdfa9ff8d377d26f7248a1e1b6204dcce43538a58ee SHA512 69d360de30278f0d4048ccd66c604b005a1174b8d46d98c5ebc6782cdc5cc65ece9ee913046230e58ed85f9433a8fd6a8c152f30190bd40f85bf7c3339e25cc6 EBUILD pypy-bin-6.0.0.ebuild 6277 BLAKE2B 87ff3104c49ddaa0ecdfe85433ab8e258de55487f025dfd849dc48cd6885e4d3365b398a6ec22fa53a71830fbc206bd87270233f355cf903600acd7a0cd0c8e0 SHA512 2158d69a46abb87bea0f7f006ee6ce6a681bada8ca532042416a5d1797e241293988d5070ada0f6cac02ffa822a08397aded11e8009d7c56ef8e7cb9cf4c0bc1 -EBUILD pypy-bin-7.0.0.ebuild 6132 BLAKE2B 44163b8adee7131a76680dd1fdf2b89b0d81eaff8f79454140f26899ab8fa2ff482edd5e95fa906ef5a7c81531dff5322517808312e4c6ea7e0fba7196d2e9c4 SHA512 29db83d245bf9dcc8598998d50c0395758f8d178ae7baf644e5cafc79826bd2bb12e6c67bb35c606117b862d8ade20dff803ac5360b9fe8344c90ee9b9869d4e +EBUILD pypy-bin-7.0.0-r1.ebuild 6282 BLAKE2B 0f476e3f5011de66e0b783c0d0af329940e5874dedbf2fbc278f1ba580dfd1bfe3a590b0b25f26c9df4ff94fb98a58b8dd0fba9cfce052c3cb1f863f089d328a SHA512 e5642c50817bb249bac279e40ed195eba6f3def312a334256b3ad7a02e9d35fdcc410f05492d5c9479b23a572f6bfbb19985e963fd4499e209debe2155e29d51 MISC metadata.xml 317 BLAKE2B d7be288f31d09754073e991e0f753e673e47fe1698408d13ce01dd58aa458e9ff9894973b27a293e426c074fbafaf5ca784fdbae0c784c1a5bf5d51bad1abd21 SHA512 65d1795605d0120c94911b2c295d8da13e01f9ac6b0750a7d536be64bf5244e20e2bb7286b33e75346e0dea333dc8970c4dcf0e98842e28f5a202ee2ddbba294 diff --git a/dev-python/pypy-bin/files/7.0.0-gentoo-path.patch b/dev-python/pypy-bin/files/7.0.0-gentoo-path.patch new file mode 100644 index 000000000000..9be52cd0b753 --- /dev/null +++ b/dev-python/pypy-bin/files/7.0.0-gentoo-path.patch @@ -0,0 +1,52 @@ +From 959e2aafbe6cabd4e6860f842bce9b8644f627ca Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Fri, 27 Nov 2015 17:02:42 +0100 +Subject: [PATCH] Gentoo: override paths for system-wide install based on + sys.prefix + +Override all default distutils install paths to ones suitable for +system-wide install when sys.prefix indicates we're running the Gentoo +system-wide install of PyPy with no prefix overrides (e.g. virtualenv). + +Fixes: https://bugs.gentoo.org/462306 +Fixes: https://bugs.gentoo.org/465546 + +[updated for 7.0.0] +--- + lib-python/2.7/distutils/command/install.py | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/lib-python/2.7/distutils/command/install.py b/lib-python/2.7/distutils/command/install.py +index fc43951da0..c2564188cb 100644 +--- a/lib-python/2.7/distutils/command/install.py ++++ b/lib-python/2.7/distutils/command/install.py +@@ -90,6 +90,13 @@ INSTALL_SCHEMES = { + 'scripts': '$base/bin', + 'data' : '$base', + }, ++ 'gentoo': { ++ 'purelib': '$base/site-packages', ++ 'platlib': '$base/site-packages', ++ 'headers': '$base/include', ++ 'scripts': '@EPREFIX@/usr/bin', ++ 'data' : '@EPREFIX@/usr', ++ }, + } + + # The keys to an installation scheme; if any new types of files are to be +@@ -476,7 +483,11 @@ class install (Command): + # it's the caller's problem if they supply a bad name! + if (hasattr(sys, 'pypy_version_info') and + not name.endswith(('_user', '_home'))): +- name = 'pypy' ++ if self.install_base == os.path.normpath('@EPREFIX@/usr/lib/pypy2.7'): ++ # override paths for system-wide install ++ name = 'gentoo' ++ else: ++ name = 'pypy' + scheme = INSTALL_SCHEMES[name] + for key in SCHEME_KEYS: + attrname = 'install_' + key +-- +2.21.0.rc1 + diff --git a/dev-python/pypy-bin/pypy-bin-7.0.0-r1.ebuild b/dev-python/pypy-bin/pypy-bin-7.0.0-r1.ebuild new file mode 100644 index 000000000000..53daf3ce27be --- /dev/null +++ b/dev-python/pypy-bin/pypy-bin-7.0.0-r1.ebuild @@ -0,0 +1,208 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit pax-utils python-utils-r1 unpacker + +BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}" +CPY_PATCHSET_VERSION="2.7.15" +MY_P=pypy2.7-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/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz + amd64? ( + !libressl? ( + jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz ) + !jit? ( ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz ) + ) + libressl? ( + jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+libressl+ncurses.tar.lz ) + !jit? ( ${BINHOST}/${P}-amd64+bzip2+libressl+ncurses.tar.lz ) + ) + ) + x86? ( + !libressl? ( + 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 ) + ) + ) + libressl? ( + cpu_flags_x86_sse2? ( + jit? ( ${BINHOST}/${P}-x86+bzip2+jit+libressl+ncurses+sse2.tar.lz ) + !jit? ( ${BINHOST}/${P}-x86+bzip2+libressl+ncurses+sse2.tar.lz ) + ) + !cpu_flags_x86_sse2? ( + !jit? ( ${BINHOST}/${P}-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")' +# pypy 7.0.0: install directory changed to 'pypy2.7' +SLOT="0/41-py27" +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-2.28 + 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/pypy2.7/pypy-c + usr/lib/pypy2.7/libpypy-c.so" + +src_prepare() { + eapply "${FILESDIR}/7.0.0-gentoo-path.patch" + eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" + + sed -e "s^@EPREFIX@^${EPREFIX}^" \ + -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 -p2 "${WORKDIR}"/patches/0011-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/lib/pypy2.7 + 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 ../lib/pypy2.7/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/lib/pypy2.7/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}" +} diff --git a/dev-python/pypy-bin/pypy-bin-7.0.0.ebuild b/dev-python/pypy-bin/pypy-bin-7.0.0.ebuild deleted file mode 100644 index 3793bd49daa5..000000000000 --- a/dev-python/pypy-bin/pypy-bin-7.0.0.ebuild +++ /dev/null @@ -1,204 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit pax-utils python-utils-r1 unpacker - -BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}" -CPY_PATCHSET_VERSION="2.7.15" -MY_P=pypy2.7-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/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz - amd64? ( - !libressl? ( - jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz ) - !jit? ( ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz ) - ) - libressl? ( - jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+libressl+ncurses.tar.lz ) - !jit? ( ${BINHOST}/${P}-amd64+bzip2+libressl+ncurses.tar.lz ) - ) - ) - x86? ( - !libressl? ( - 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 ) - ) - ) - libressl? ( - cpu_flags_x86_sse2? ( - jit? ( ${BINHOST}/${P}-x86+bzip2+jit+libressl+ncurses+sse2.tar.lz ) - !jit? ( ${BINHOST}/${P}-x86+bzip2+libressl+ncurses+sse2.tar.lz ) - ) - !cpu_flags_x86_sse2? ( - !jit? ( ${BINHOST}/${P}-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")' -# pypy 7.0.0: install directory changed to 'pypy2.7' -SLOT="0/41-py27" -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}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" - - # 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 -p2 "${WORKDIR}"/patches/0011-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/lib/pypy2.7 - 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 ../lib/pypy2.7/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/lib/pypy2.7/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}" -} -- cgit v1.2.3