diff options
Diffstat (limited to 'dev-python/pypy')
-rw-r--r-- | dev-python/pypy/Manifest | 4 | ||||
-rw-r--r-- | dev-python/pypy/pypy-7.3.3.ebuild | 2 | ||||
-rw-r--r-- | dev-python/pypy/pypy-7.3.3_p2-r1.ebuild | 161 |
3 files changed, 165 insertions, 2 deletions
diff --git a/dev-python/pypy/Manifest b/dev-python/pypy/Manifest index 8bd9416ed36b..07723c9e6616 100644 --- a/dev-python/pypy/Manifest +++ b/dev-python/pypy/Manifest @@ -1,7 +1,9 @@ AUX 1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch 555 BLAKE2B 4976bf66e4e96f89e64ad79910bb7b6fc7c3929cf7b7f1a0a59e66b5bb87e600864df2556f1dccf7695223121c7271382227e16cfb8fb7851cf56be25542b7ab SHA512 f2df0a67480bbe46fbb25dd06abcbc226a7034410855105012045287e662a598fae467f5bc81b3d4adb738f812bf41819aaa5827151db0d6bba573305ee88474 AUX 7.3.1-gentoo-path.patch 1575 BLAKE2B e374b879aabdb1a9b4d3bb07ba03510e9df7c00e6fba13e117dd718268118ade06fa76f7468855463fa50112fb780fddb9687198f4a24bb0a6cc69b5b79e70d4 SHA512 14e14e4c000166bfe3f1cd10377baecc721b43c2df43c0d5d85e8dc6f220e1a453d7fe30cfbaab547e5483f8f493ddd840620b8de4de6d55abe8f9cddcca2464 AUX 7.3.3-distutils-cxx.patch 18613 BLAKE2B af9f2a5f0248a865d1a5c7423b35a9a14d7cf8a3d885f5ddeafa68b0c0358a0a9eebf5ba1b687558102c3dd4e2a5b4399db1f4f701628b8fff8f0f4d9795550f SHA512 332396a0a1b8181946ef3b70cd76fad8ef6f06b3fc267229ef70fda5e6d48193981ed5620a5f3577a12e3cfda22a75ee4fdad12351a57c9ade96b3f1796d651c +DIST pypy2.7-gentoo-patches-7.3.3_p2.tar.xz 11184 BLAKE2B b2b9b94478609372d616c65a87cbb12a07e217928beef9fac26c428f81c662ef390db3fd85bf368ffcc8c6fa3802e506412b7bebd14bdc453009008bc3459d25 SHA512 9ab8ed99b42b36e9c212683ef93f7f1fb99caecf056293ab9a5734f8b52eedec192860702baa121630558530cb5c4652f8542300ecaaaa282377ea6456618b95 DIST pypy2.7-v7.3.3-src.tar.bz2 20881821 BLAKE2B ce1ecdd1fffe40574c7662da6038b84d2bca47ab168939ef0c12be2c6348317f17a94a3026e7fa53c71601edc153aefd98f770bd148e7af07ca751c0a5fc1252 SHA512 c2b6c44fdcac5f9445fab01572f859228fc286891fd09a4ddb95d283683d805276c853ec8e61fcd04cb9ee811d0e959d19bb03fdd7442c044f28a773633122e7 DIST python-gentoo-patches-2.7.18-r1.tar.xz 15500 BLAKE2B 7008b29827dbbd80d4ab8f010ccf9efced99c6b4b9109e4430c0ba269ce53529cb6fedd832502c8d2d3aa21938749cc3591c2545b21c0a59a6e60f8598e84ccc SHA512 e656ab07281fd932b92165674619bbf55ecf410d2937ae4ae771d490b4532540498cc731d30d19c1e8aafd1f64df8a406bbfbb46ea985b3dcd8edb89a0b7f20f -EBUILD pypy-7.3.3.ebuild 5588 BLAKE2B b75d0ad8122a0dad40597e98fc11a1a895b9aa2c7f1ac3fba85c1c24139baf497db5dbc87136ce6dc63051f20a7939127698ea1e2583522c1f8056c9e8e9fb19 SHA512 7c25c0e7fdad643c44f348b6b202e245ebad8679b3693af8a697c4f04db8bd7a67bbcc6ebb1574b1ee14c3dc54070f3aee6995490134286451227aaa4b4e6723 +EBUILD pypy-7.3.3.ebuild 5592 BLAKE2B 470f10f9d2ce53951adb8cc108b55a504afaf33598ee9e970b57d42aa8b2b554bc4ae41c1d45c853836c0bad73d70572b683bf95cf9ebe65040ed7e3b9f6a19a SHA512 b5095f9cdfdf68cb9049343f8e888a7da94d5f4c272baacc4e4c8be87adede76b5342a3dfc74fc7f09987e122f98f7b0f4d4e1618f3af62273936ee7e71a3f9d +EBUILD pypy-7.3.3_p2-r1.ebuild 4882 BLAKE2B 53bf57f5c0420e7c09b1a443410a4728fe0536c6bf54ac191c707bb3fd038f9b9297b157ff0424aad9589c1055cb9ab5874d3a791468dc493baeb65051df99ec SHA512 d3704ed1211a8742b9147890937eb7801c12389e67de262d6b010dc7ab04db73e2a6e9c5e4beae588bcb9cd83db69c41171b43839c0a5583d69775ac58697979 MISC metadata.xml 240 BLAKE2B 41e6a4d9da33dab2decc5ff419924f382a8f64d27a81fdb97576db8c6cf125be95911747946ec8be1b453f56617fef1084f5947f84b50a8db419d46df2ae8a0f SHA512 9c23321eaa853f851bf00195ea64ac2ba093e516f9b57855ee5aa58fbb1988130c9f0c17c2a9ce9fae4ee033e0a28a70c868e0f5acdfa1dd316ab533c5279d59 diff --git a/dev-python/pypy/pypy-7.3.3.ebuild b/dev-python/pypy/pypy-7.3.3.ebuild index b3f7eefab9de..8e48bcb5dc59 100644 --- a/dev-python/pypy/pypy-7.3.3.ebuild +++ b/dev-python/pypy/pypy-7.3.3.ebuild @@ -10,7 +10,7 @@ MY_P=pypy2.7-v${PV/_/} PATCHSET="python-gentoo-patches-2.7.18-r1" DESCRIPTION="A fast, compliant alternative implementation of the Python language" -HOMEPAGE="https://pypy.org/" +HOMEPAGE="https://www.pypy.org/" SRC_URI="https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2 https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" S="${WORKDIR}/${MY_P}-src" diff --git a/dev-python/pypy/pypy-7.3.3_p2-r1.ebuild b/dev-python/pypy/pypy-7.3.3_p2-r1.ebuild new file mode 100644 index 000000000000..d9a8bc29d156 --- /dev/null +++ b/dev-python/pypy/pypy-7.3.3_p2-r1.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit pax-utils python-utils-r1 + +PYPY_PV=${PV%_p*} +MY_P=pypy2.7-v${PYPY_PV} +PATCHSET="pypy2.7-gentoo-patches-${PV}" + +DESCRIPTION="A fast, compliant alternative implementation of the Python language" +HOMEPAGE="https://www.pypy.org/" +SRC_URI="https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2 + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" +S="${WORKDIR}/${MY_P}-src" + +LICENSE="MIT" +# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' +SLOT="0/73" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="bzip2 gdbm +jit libressl ncurses sqlite tk" + +RDEPEND=" + || ( + >=dev-python/pypy-exe-${PV}:${PYPY_PV}[bzip2?,ncurses?] + >=dev-python/pypy-exe-bin-${PV}:${PYPY_PV} + ) + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + gdbm? ( sys-libs/gdbm:0= ) + sqlite? ( dev-db/sqlite:3= ) + tk? ( + dev-lang/tk:0= + dev-tcltk/tix:0= + ) + !<dev-python/pypy-bin-7.3.0:0" +DEPEND="${RDEPEND}" + +src_prepare() { + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + default + + sed -e "s^@EPREFIX@^${EPREFIX}^" \ + -i lib-python/2.7/distutils/command/install.py || die +} + +src_compile() { + # copy over to make sys.prefix happy + cp -p "${BROOT}"/usr/lib/pypy2.7/pypy-c-${PYPY_PV} pypy-c || die + cp -p "${BROOT}"/usr/lib/pypy2.7/include/${PYPY_PV}/* 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 + + 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 = { +# "_ssl": "_ssl_build.py", +# "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=( ssl audioop syslog pwdgrp resource ) + use gdbm && cffi_targets+=( gdbm ) + use ncurses && cffi_targets+=( curses ) + 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 -x COLUMNS=80 + + 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 + ) + + ./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 ..." + dosym pypy-c-${PYPY_PV} "${dest}/pypy-c" + insinto "${dest}" + # preserve mtimes to avoid obsoleting caches + insopts -p + doins -r include lib_pypy lib-python + + # replace copied headers with symlinks + for x in "${BROOT}"/usr/lib/pypy2.7/include/${PYPY_PV}/*; do + dosym "${PYPY_PV}/${x##*/}" "${dest}/include/${x##*/}" + done + + 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 EPYTHON=pypy + local -x PYTHON=${ED}${dest}/pypy-c-${PYPY_PV} + # temporarily copy to build tree to facilitate module builds + cp -p "${BROOT}${dest}/pypy-c-${PYPY_PV}" "${PYTHON}" || die + + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_moduleinto /usr/lib/pypy2.7/site-packages + python_domodule epython.py + + einfo "Byte-compiling Python standard library..." + python_optimize "${ED}${dest}" + + # remove to avoid collisions + rm "${PYTHON}" || die +} |