summaryrefslogtreecommitdiff
path: root/dev-python/pypy3
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
commit623ee73d661e5ed8475cb264511f683407d87365 (patch)
tree993eb27c93ec7a2d2d19550300d888fc1fed9e69 /dev-python/pypy3
parentceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff)
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'dev-python/pypy3')
-rw-r--r--dev-python/pypy3/Manifest5
-rw-r--r--dev-python/pypy3/files/7.3.1-gentoo-path.patch42
-rw-r--r--dev-python/pypy3/pypy3-7.3.0.ebuild8
-rw-r--r--dev-python/pypy3/pypy3-7.3.1.ebuild219
4 files changed, 267 insertions, 7 deletions
diff --git a/dev-python/pypy3/Manifest b/dev-python/pypy3/Manifest
index 1a6c6d5effe0..de02edd13298 100644
--- a/dev-python/pypy3/Manifest
+++ b/dev-python/pypy3/Manifest
@@ -1,7 +1,10 @@
AUX 1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch 551 BLAKE2B efeecabe4ff7c8b0d6c845cfaab5eacc56e92da7614a0a7cfa2260a0ae93ebcd87d79c33444d16e57382bba55bdaf49f04c844c125a0a57c67119374f47e0b9e SHA512 9b6b5ede218cea96a424376677d52cbd7c23cd7f569756403849523fc79f8db27190e0bd80501a9e428688fd393397d2fa4e59a59607212993f4ac6d93b18733
AUX 7.0.0-gentoo-path.patch 1880 BLAKE2B ff89983185c9249a91e32bf69903e139d75efeadcda3c1b4b11e3cc23091956bb08ebf9c9dea548cd5c895ef093455fd69b7273027bc9916658effae955c0490 SHA512 a332c6f8454186f774fd4a0b7f8b940facddb894a17df405d144b2707ece4393bd11695df5ad3bf1e274e59d9cd3bf81c02c4c55226480f0890e5d7318545e0a
AUX 7.2.0-distutils-cxx.patch 14432 BLAKE2B 7c2f5a22457781c4b7d21954a3ffe7b1dfb55f12f890205cfe294316be86e7b206c4ce732f15fbf021c0fc87ed05a20aa57918cda869226efadb01e5fb2823a7 SHA512 7ccb64419d4ad90d03958bf6ddbb700a253fec75bceca7f9355f5f8496e1aba9ac72b09d0616600ebf8169d5ec705d6b058556905b032db8fb5abd23cf9b30e8
+AUX 7.3.1-gentoo-path.patch 1548 BLAKE2B 2c25223aaec565f1dad20e135ab7b2649df1dc10ac2df2ca0f066d0602d9abb045db36bddd8890c753b680bacfe2399083bf073085a1cefc2ff5382f339f3a2e SHA512 69a91588b17ab3ab764e50592fb84b6ba9b5c51cfcc70cb4916e625542311d3b63aafde79a1bc39f1e5a3ec81acba1241c50111777247a018147a20228695bd3
AUX python-3.5-distutils-OO-build.patch 3627 BLAKE2B fe4fd23515f0d1cfc236ac3e773b6a70a9b0fbbaff4719c1f1621e21433cfdb1f53b6bf5f348069d7bf03d26bd039f793e4ef2ac4f6271062d83c088ccbab56d SHA512 5e8e4ab7d326386a244df9d0fca5b54e16b5943e35d12ecaf9ea986e79d2d8d8e85585f6286e0fc440dbb7a8c17e2bcf7a11498ff9cc5f523e97d8b353d9a511
DIST pypy3.6-v7.3.0-src.tar.bz2 21937786 BLAKE2B c53ac32a9cca1c4624160eae9f11b5705a59613f1e5100fbb0ee86118de5a7845b8fa5087165d7f5a077d20337dfca14a1c7eadbe768995e20e249ec271ac10d SHA512 313a4254262dd8d8b995a50bddbc360cfb67add0818e51a3e9ce25bda6a9b639e9fea8efe7da6adda76dff0a86a364544a13faa516e51b9ea6c25ec99223b435
-EBUILD pypy3-7.3.0.ebuild 7515 BLAKE2B 189f0e427b6d16a40ee37d0671c0c8a0a78f96499d961400ce6182ae977177f98758497123410ade0e675965e8fbc582bfdd3efe4af6d380b4c7795b86925e40 SHA512 d82dd3c61a93ae77d79ecb973bf5bc79b24dd18384ef9c94042aff38279e2848ee4bd7c4709b5fed228a41120264c29454a366e98f286a4d251ba479a0131ce0
+DIST pypy3.6-v7.3.1-src.tar.bz2 22712809 BLAKE2B 4250b3fe98c611b9635319c106b80e88ab469eab5f883babb738e175e7b7adc22c85f8ef3fdce1cdc127b521beef8d6c7862e188d8c8889c39f90136d6bbe374 SHA512 f8e32aae7f01225e0e4d6763eaac40fc02dffc3d0b6a30f22d422147f9be4f3290ea78160a912ffae311dea3d503eb31a7a4f3999d3b541fbccd93d1cef4ca56
+EBUILD pypy3-7.3.0.ebuild 7358 BLAKE2B bef55c6f65e06d4b49199c394edbd5485262294d9d634853fb6d216c4353d7dda427512905bf4838518f70b4b1949ad214f9fd04c942dc88e8512d657d2860d1 SHA512 18e43cd8a90a6046aa638bb3fa157342255b23e33dcb186de4f482dda9f328aad099ebe3be4967903170a58c28d7054906de1acd73a9a7581c78e5679cf0a11f
+EBUILD pypy3-7.3.1.ebuild 7360 BLAKE2B 605796832b1a0a1502e5971f71787fe5461df70d2fae21b62b51ab8c6cfefd78cabcf54d0baaa3b85b8ce29bbff4723def84886211214a000018ef7db5bb2ece SHA512 9b994d56e7d4c1dae592ca1b3a1dbbf43c9b7ada8406fb996d6b14cc5b0c65c1cfd9f8917511cfacfc31216a80bceb279333cc9ebdfd6e353d51e642e5e6121f
MISC metadata.xml 317 BLAKE2B d7be288f31d09754073e991e0f753e673e47fe1698408d13ce01dd58aa458e9ff9894973b27a293e426c074fbafaf5ca784fdbae0c784c1a5bf5d51bad1abd21 SHA512 65d1795605d0120c94911b2c295d8da13e01f9ac6b0750a7d536be64bf5244e20e2bb7286b33e75346e0dea333dc8970c4dcf0e98842e28f5a202ee2ddbba294
diff --git a/dev-python/pypy3/files/7.3.1-gentoo-path.patch b/dev-python/pypy3/files/7.3.1-gentoo-path.patch
new file mode 100644
index 000000000000..fb73aec41de9
--- /dev/null
+++ b/dev-python/pypy3/files/7.3.1-gentoo-path.patch
@@ -0,0 +1,42 @@
+From 6d439c6718625bb7dce32b0afdc6a3d5168a21e5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 11 Apr 2020 07:01:27 +0200
+Subject: [PATCH] Support Gentoo install scheme
+
+---
+ lib-python/3/distutils/command/install.py | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/lib-python/3/distutils/command/install.py b/lib-python/3/distutils/command/install.py
+index 6fe62be..a4e9f0d 100644
+--- a/lib-python/3/distutils/command/install.py
++++ b/lib-python/3/distutils/command/install.py
+@@ -97,6 +97,13 @@ INSTALL_SCHEMES = {
+ 'scripts': '$base/Scripts',
+ '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
+@@ -483,7 +490,10 @@ 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'))):
+- if os.name == 'nt':
++ if self.install_base == os.path.normpath('@EPREFIX@/usr/lib/pypy2.7'):
++ # override paths for system-wide install
++ name = 'gentoo'
++ elif os.name == 'nt':
+ name = 'pypy_nt'
+ else:
+ name = 'pypy'
+--
+2.26.0
+
diff --git a/dev-python/pypy3/pypy3-7.3.0.ebuild b/dev-python/pypy3/pypy3-7.3.0.ebuild
index 9ec506dc1868..1c5dfb210180 100644
--- a/dev-python/pypy3/pypy3-7.3.0.ebuild
+++ b/dev-python/pypy3/pypy3-7.3.0.ebuild
@@ -207,17 +207,13 @@ src_install() {
"${ED}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
fi
+ local -x EPYTHON=pypy3
local -x PYTHON=${ED}${dest}/pypy3-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/pypy3.6/site-packages
- python_export pypy3 EPYTHON
echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_moduleinto /usr/lib/pypy3.6/site-packages
python_domodule epython.py
einfo "Byte-compiling Python standard library..."
-
- # compile the installed modules
python_optimize "${ED}${dest}"
}
diff --git a/dev-python/pypy3/pypy3-7.3.1.ebuild b/dev-python/pypy3/pypy3-7.3.1.ebuild
new file mode 100644
index 000000000000..ef18fb89b9f4
--- /dev/null
+++ b/dev-python/pypy3/pypy3-7.3.1.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+inherit pax-utils python-any-r1
+
+MY_P=pypy3.6-v${PV/_/}
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (3.6) language"
+HOMEPAGE="https://pypy.org/"
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2"
+S="${WORKDIR}/${MY_P}-src"
+
+LICENSE="MIT"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+SLOT="0/pypy36-pp73"
+KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 gdbm +jit libressl ncurses sqlite test tk"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ || (
+ dev-python/pypy3-exe:${PV}[bzip2?,ncurses?]
+ dev-python/pypy3-exe-bin:${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/pypy3-bin-7.3.0:0"
+DEPEND="${RDEPEND}
+ test? (
+ ${PYTHON_DEPS}
+ !!dev-python/pytest-forked
+ )"
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/7.3.1-gentoo-path.patch"
+ eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
+ eapply "${FILESDIR}"/7.2.0-distutils-cxx.patch
+
+ sed -e "s^@EPREFIX@^${EPREFIX}^" \
+ -i lib-python/3/distutils/command/install.py || die
+
+ # apply CPython stdlib patches
+ pushd lib-python/3 > /dev/null || die
+ eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
+ popd > /dev/null || die
+
+ # tests are copied from cpython and apparently not adjusted to pypy3
+ # or marked XFAIL
+ sed -i -e 's:test_runeval_step:_&:' \
+ lib-python/3/test/test_bdb.py || die
+ sed -i -e 's:test_set_nomemory:_&:' \
+ -e '/class PyMemDebugTests/i@unittest.skip("Broken on pypy3")' \
+ lib-python/3/test/test_capi.py || die
+ sed -i -e 's:test_crashing_decode_handler:_&:' \
+ lib-python/3/test/test_codeccallbacks.py || die
+ sed -i -e 's:test_unicode:_&:' \
+ lib-python/3/test/test_dbm_gnu.py || die
+ sed -i -e 's:test_jumpy:_&:' \
+ lib-python/3/test/test_dis.py || die
+ sed -i -e 's:test_generator_doesnt_retain_old_exc:_&:' \
+ -e 's:test_generator_finalizing_and_exc_info:_&:' \
+ -e 's:test_generator_leaking:_&:' \
+ lib-python/3/test/test_exceptions.py || die
+ sed -i -e 's:test_locale:_&:' \
+ lib-python/3/test/test_format.py || die
+ sed -i -e 's:test_ast_line_numbers:_&:' \
+ -e 's:test_backslashes_in_string_part:_&:' \
+ lib-python/3/test/test_fstring.py || die
+ sed -i -e 's:test_decompressor_bug_28275:_&:' \
+ lib-python/3/test/test_lzma.py || die
+ sed -i -e 's:test_listdir_bytes_like:_&:' \
+ -e 's:test_putenv:_&:' \
+ lib-python/3/test/test_posix.py || die
+ sed -i -e 's:test_auto_history:_&:' \
+ -e 's:test_history_size:_&:' \
+ lib-python/3/test/test_readline.py || die
+ sed -i -e 's:CheckDMLDoesNotAutoCommitBefore:_&:' \
+ -e 's:CheckImmediateTransactionalDDL:_&:' \
+ -e 's:CheckTransactionalDDL:_&:' \
+ lib-python/3/sqlite3/test/transactions.py || die
+ sed -i -e 's:test_pha_optional:_&:' \
+ -e 's:test_pha_required:_&:' \
+ lib-python/3/test/test_ssl.py || die
+ sed -i -e 's:test_eval_bytes_invalid_escape:_&:' \
+ -e 's:test_eval_str_invalid_escape:_&:' \
+ lib-python/3/test/test_string_literals.py || die
+ # the first one's broken by sandbox, the second by our env
+ sed -i -e 's:test_empty_env:_&:' \
+ -e 's:test_executable:_&:' \
+ lib-python/3/test/test_subprocess.py || die
+ sed -i -e 's:test_jump_out_of_async_for_block:_&:' \
+ -e 's:test_jump_over_async_for_block_before_else:_&:' \
+ -e 's:test_no_jump_.*wards_into_async_for_block:_&:' \
+ -e 's:test_no_jump_into_async_for_block_before_else:_&:' \
+ -e 's:test_no_jump_from_yield:_&:' \
+ lib-python/3/test/test_sys_settrace.py || die
+ sed -i -e 's:test_circular_imports:_&:' \
+ lib-python/3/test/test_threaded_import.py || die
+
+ eapply_user
+}
+
+src_compile() {
+ # copy over to make sys.prefix happy
+ cp -p "${BROOT}"/usr/lib/pypy3.6/pypy3-c-${PV} pypy3-c || die
+ cp -p "${BROOT}"/usr/lib/pypy3.6/include/${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 pypy3-c
+
+ einfo "Generating caches and CFFI modules ..."
+
+ # Generate Grammar and PatternGrammar pickles.
+ ./pypy3-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 = {
+# "_blake2": "_blake2/_blake2_build.py",
+# "_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,
+# "lzma": "_lzma_build.py",
+# "_decimal": "_decimal_build.py",
+# "_sha3": "_sha3/_sha3_build.py",
+ cffi_targets=( blake2/_blake2 sha3/_sha3 ssl
+ audioop syslog pwdgrp resource lzma decimal )
+ 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
+ ../pypy3-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
+
+ # Test runner requires Python 2 too. However, it spawns PyPy3
+ # internally so that we end up testing the correct interpreter.
+ "${EPYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python || die
+}
+
+src_install() {
+ local dest=/usr/lib/pypy3.6
+ einfo "Installing PyPy ..."
+ dosym pypy3-c-${PV} "${dest}/pypy3-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/pypy3.6/include/${PV}/*; do
+ dosym "${PV}/${x##*/}" "${dest}/include/${x##*/}"
+ done
+
+ dosym ../lib/pypy3.6/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
+
+ local -x EPYTHON=pypy3
+ local -x PYTHON=${ED}${dest}/pypy3-c
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_moduleinto /usr/lib/pypy3.6/site-packages
+ python_domodule epython.py
+
+ einfo "Byte-compiling Python standard library..."
+ python_optimize "${ED}${dest}"
+}