public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/
Date: Sun, 21 Apr 2019 06:29:57 +0000 (UTC)	[thread overview]
Message-ID: <1555828192.3e54d40120e8b27a6bf94eadfa1b8395edb03c7f.mgorny@gentoo> (raw)

commit:     3e54d40120e8b27a6bf94eadfa1b8395edb03c7f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 19 11:39:59 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Apr 21 06:29:52 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e54d401

dev-python/pypy3: Bump to 7.1.1

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pypy3/Manifest           |   1 +
 dev-python/pypy3/pypy3-7.1.1.ebuild | 250 ++++++++++++++++++++++++++++++++++++
 2 files changed, 251 insertions(+)

diff --git a/dev-python/pypy3/Manifest b/dev-python/pypy3/Manifest
index d504fd7a9eb..40244f11480 100644
--- a/dev-python/pypy3/Manifest
+++ b/dev-python/pypy3/Manifest
@@ -1,3 +1,4 @@
 DIST pypy3-v6.0.0-src.tar.bz2 22648140 BLAKE2B b8678859b0c24494788ddf6f410a3ec1a56a04663452e1aba25d3f41c5073a95866d1623f00cb1a6c9d0256df728fa60d1edb5b58d26c0d88577769cc8a6205d SHA512 ea406c4dd1837a6ab13026de01330790f3c18f6e2bfb83e8553e52acf78b43dfb559ce75c2d91395055c771db359356c8183ed950da6f01a21bf09128935af5e
 DIST pypy3.5-v7.0.0-src.tar.bz2 22730690 BLAKE2B 312aea1f88303b225bbfa5e82a28d3c2893d9977b03a3fd12923db15c4a77f04ec3fbce947f0684c4e27073836583ef8a5eaf5be05612e564172170740c2a6e3 SHA512 3facac26e06e254cbf244841824b35ec211859123f6ba9f095dc980292c10d9cf1d11de62cc6372cf77e92ee1cd2358bbd794b3ff25cb7172e1b21c02c8ce6c2
 DIST pypy3.6-v7.1.0-src.tar.bz2 23167216 BLAKE2B 12a085c2d4820289643818d8bc1c17304e4cf4f4687054452d878c6f26fd36802bbbe5baee73f0ce2f0322e126dbccbcf7b48ca6569bb7eb8d59f473bd80d4b1 SHA512 1a0a9e9de31c63114c0537747c4a718504a28b780a2ef1f76bff6051a1ec68b496b574989f0b729c07611cd81e199135dd268834dfa6f9664e1e119db8ae20e4
+DIST pypy3.6-v7.1.1-src.tar.bz2 23171982 BLAKE2B be43528bc6f3e02d146016a4969bd8c7a9e880a3bd3b77f441aac6d22ef67700f71e0171ec000066bd2c0bd506db64af69d6b75b59a92222dd0353ee70e6629b SHA512 17e78f9c7080d597a6283d8e8247d1ca78f09a14ff221db8c3d90d255b5befc73102b317ca34a80979e544d5ee72f3e5e649f89d185a085f4cc15012da4d0473

diff --git a/dev-python/pypy3/pypy3-7.1.1.ebuild b/dev-python/pypy3/pypy3-7.1.1.ebuild
new file mode 100644
index 00000000000..f0f7cdf74a2
--- /dev/null
+++ b/dev-python/pypy3/pypy3-7.1.1.ebuild
@@ -0,0 +1,250 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# pypy3 needs to be built using python 2
+PYTHON_COMPAT=( python2_7 pypy )
+inherit check-reqs pax-utils python-any-r1 toolchain-funcs
+
+MY_P=pypy3.6-v${PV}
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (3.6) language"
+HOMEPAGE="http://pypy.org/"
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2"
+
+LICENSE="MIT"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+SLOT="0/71-py36"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite tk"
+
+RDEPEND=">=sys-libs/zlib-1.1.3:0=
+	virtual/libffi:0=
+	virtual/libintl:0=
+	dev-libs/expat:0=
+	!libressl? ( dev-libs/openssl:0=[-bindist] )
+	libressl? ( dev-libs/libressl:0= )
+	bzip2? ( app-arch/bzip2:0= )
+	gdbm? ( sys-libs/gdbm:0= )
+	ncurses? ( sys-libs/ncurses:0= )
+	sqlite? ( dev-db/sqlite:3= )
+	tk? (
+		dev-lang/tk:0=
+		dev-tcltk/tix:0=
+	)
+	!dev-python/pypy3-bin:0"
+DEPEND="${RDEPEND}
+	low-memory? ( virtual/pypy )
+	!low-memory? (
+		|| (
+			virtual/pypy
+			(
+				dev-lang/python:2.7
+				dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)]
+			)
+		)
+	)"
+
+S="${WORKDIR}/${MY_P}-src"
+
+check_env() {
+	if use low-memory; then
+		CHECKREQS_MEMORY="1750M"
+		use amd64 && CHECKREQS_MEMORY="3500M"
+	else
+		CHECKREQS_MEMORY="3G"
+		use amd64 && CHECKREQS_MEMORY="6G"
+	fi
+
+	check-reqs_pkg_pretend
+}
+
+pkg_pretend() {
+	[[ ${MERGE_TYPE} != binary ]] && check_env
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		check_env
+
+		# unset to allow forcing pypy below :)
+		use low-memory && local EPYTHON=
+		if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
+			einfo "Using PyPy to perform the translation."
+			local EPYTHON=pypy
+		else
+			einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
+			einfo "recommends using PyPy for that. If you wish to do so, please install"
+			einfo "virtual/pypy and ensure that EPYTHON variable is unset."
+		fi
+
+		python-any-r1_pkg_setup
+	fi
+}
+
+src_prepare() {
+	eapply "${FILESDIR}/7.0.0-gentoo-path.patch"
+	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
+	eapply "${FILESDIR}"/5.9.0-shared-lib.patch	# 517002
+	eapply "${FILESDIR}"/7.0.0_all_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
+
+	eapply_user
+}
+
+src_configure() {
+	tc-export CC
+
+	local args=(
+		--shared
+		$(usex jit -Ojit -O2)
+		$(usex sandbox --sandbox '')
+
+		--jit-backend=auto
+
+		pypy/goal/targetpypystandalone
+	)
+
+	# Avoid linking against libraries disabled by use flags
+	local opts=(
+		bzip2:bz2
+		ncurses:_minimal_curses
+	)
+
+	local opt
+	for opt in "${opts[@]}"; do
+		local flag=${opt%:*}
+		local mod=${opt#*:}
+
+		args+=(
+			$(usex ${flag} --withmod --withoutmod)-${mod}
+		)
+	done
+
+	local interp=( "${PYTHON}" )
+	if use low-memory; then
+		interp=( env PYPY_GC_MAX_DELTA=200MB
+			"${PYTHON}" --jit loop_longevity=300 )
+	fi
+
+	# translate into the C sources
+	# we're going to make them ourselves since otherwise pypy does not
+	# free up the unneeded memory before spawning the compiler
+	set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
+	echo -e "\033[1m${@}\033[0m"
+	"${@}" || die "translation failed"
+}
+
+src_compile() {
+	emake -C "${T}"/usession*-0/testing_1
+
+	# copy back to make sys.prefix happy
+	cp -p "${T}"/usession*-0/testing_1/{pypy3-c,libpypy3-c.so} . || die
+	pax-mark m pypy3-c libpypy3-c.so
+
+	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 = {
+#    "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",
+#    "_blake2": "_blake2/_blake2_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 )
+
+	einfo "Please disregard the import errors during CFFI cache generation."
+	einfo "They come from modules not built yet."
+
+	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=
+
+	# 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 -vv lib-python || die
+}
+
+src_install() {
+	local dest=/usr/lib/pypy3.6
+	einfo "Installing PyPy ..."
+	exeinto "${dest}"
+	doexe pypy3-c libpypy3-c.so
+	pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so"
+	insinto "${dest}"
+	# preserve mtimes to avoid obsoleting caches
+	insopts -p
+	doins -r include lib_pypy lib-python
+	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
+
+	einfo "Generating caches and byte-compiling ..."
+
+	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_domodule epython.py
+
+	einfo "Byte-compiling Python standard library..."
+
+	# compile the installed modules
+	python_optimize "${ED%/}${dest}"
+}


             reply	other threads:[~2019-04-21  6:30 UTC|newest]

Thread overview: 195+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-21  6:29 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-27  9:42 [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/ Michał Górny
2024-09-15 15:04 Michał Górny
2024-09-15 15:04 Michał Górny
2024-09-05  8:43 Michał Górny
2024-08-29 16:29 Michał Górny
2024-04-25  3:39 Michał Górny
2024-04-24 17:16 Sam James
2024-04-24 17:16 Sam James
2024-04-24 15:08 Michał Górny
2024-02-03 15:02 Michał Górny
2024-02-03 14:03 Arthur Zamarin
2024-02-03 13:52 Sam James
2024-01-21  6:21 Michał Górny
2024-01-21  4:29 Sam James
2024-01-21  2:44 Sam James
2024-01-15 21:24 Michał Górny
2024-01-09 16:03 Michał Górny
2024-01-03 19:49 Michał Górny
2023-12-25 20:26 Michał Górny
2023-11-02 12:58 Michał Górny
2023-09-30  8:27 Michał Górny
2023-09-26 12:31 Michał Górny
2023-07-15 18:02 Arthur Zamarin
2023-07-11  8:43 Jakov Smolić
2023-06-19  5:14 Michał Górny
2023-06-16 17:03 Michał Górny
2023-05-31 11:42 Michał Górny
2023-05-14 19:29 Michał Górny
2023-02-27  5:50 Michał Górny
2023-02-26 22:23 Sam James
2023-02-26 21:47 Sam James
2023-02-26 20:11 Michał Górny
2023-01-31 13:16 Michał Górny
2023-01-31 13:06 Arthur Zamarin
2023-01-31 13:06 Arthur Zamarin
2023-01-29  9:34 Michał Górny
2022-12-30 14:32 Michał Górny
2022-12-14 10:58 Michał Górny
2022-12-12  5:43 Michał Górny
2022-12-07 15:59 Michał Górny
2022-12-07 15:42 Sam James
2022-12-07 15:42 Sam James
2022-12-07 13:04 Michał Górny
2022-11-25 21:14 Michał Górny
2022-11-24 16:47 Michał Górny
2022-11-10 16:15 Michał Górny
2022-11-10  2:49 Sam James
2022-11-10  2:49 Sam James
2022-11-09 17:44 Michał Górny
2022-10-31 13:55 Michał Górny
2022-10-30 21:56 Sam James
2022-10-30 21:55 Sam James
2022-10-30 21:55 Sam James
2022-10-29 11:25 Michał Górny
2022-09-04 19:36 Michał Górny
2022-08-27  6:38 Michał Górny
2022-08-12 10:36 Michał Górny
2022-08-12 10:19 Agostino Sarubbo
2022-08-12 10:17 Agostino Sarubbo
2022-08-10  9:31 Michał Górny
2022-08-03  6:52 Michał Górny
2022-07-24 18:18 Michał Górny
2022-07-19 13:27 Michał Górny
2022-06-16 11:47 Michał Górny
2022-06-16  9:52 Jakov Smolić
2022-06-16  9:41 Jakov Smolić
2022-05-17  7:49 Michał Górny
2022-05-04 17:56 Michał Górny
2022-05-04 15:11 Jakov Smolić
2022-05-01 21:51 Jakov Smolić
2022-04-01 15:39 Michał Górny
2022-04-01 15:17 Jakov Smolić
2022-04-01  6:57 Agostino Sarubbo
2022-03-30 15:13 Michał Górny
2022-02-20 14:19 Michał Górny
2022-02-20 14:19 Michał Górny
2022-02-20 12:28 Michał Górny
2022-02-11 12:16 Michał Górny
2022-02-10 11:12 Michał Górny
2022-02-02 21:16 Michał Górny
2022-01-27 17:56 Michał Górny
2022-01-27 15:17 Michał Górny
2022-01-09  8:09 Michał Górny
2021-11-09 10:33 Michał Górny
2021-11-09  9:35 Agostino Sarubbo
2021-11-09  9:34 Agostino Sarubbo
2021-10-25 20:16 Michał Górny
2021-10-25 20:16 Michał Górny
2021-10-17 21:15 Michał Górny
2021-10-12 15:17 Michał Górny
2021-10-08  8:44 Michał Górny
2021-09-14 16:22 Michał Górny
2021-09-03  6:57 Michał Górny
2021-09-03  6:40 Agostino Sarubbo
2021-09-03  6:34 Agostino Sarubbo
2021-08-30 22:24 Michał Górny
2021-08-29 22:22 Michał Górny
2021-07-30 18:14 Michał Górny
2021-06-16 11:16 Michał Górny
2021-06-12  0:32 Sam James
2021-06-12  0:32 Sam James
2021-06-02  9:32 Michał Górny
2021-06-02  9:32 Michał Górny
2021-05-19 20:21 Michał Górny
2021-05-19 20:09 Agostino Sarubbo
2021-05-19 20:06 Agostino Sarubbo
2021-05-19 18:21 Michał Górny
2021-05-14 22:00 Michał Górny
2021-05-12  7:13 Michał Górny
2021-05-11 10:03 Agostino Sarubbo
2021-05-02  9:21 Mikle Kolyada
2021-05-01 18:19 Agostino Sarubbo
2021-04-12 13:49 Michał Górny
2021-04-10 19:36 Michał Górny
2021-04-09 11:46 Michał Górny
2021-03-15 10:37 Michał Górny
2021-03-05 20:49 Agostino Sarubbo
2021-03-05 20:48 Agostino Sarubbo
2021-03-04 15:04 Michał Górny
2021-03-04 14:56 Michał Górny
2021-03-03 18:22 Michał Górny
2021-01-09 21:59 Michał Górny
2021-01-09  2:30 Sam James
2020-12-31 23:08 Sam James
2020-11-22 11:51 Michał Górny
2020-11-22 11:51 Michał Górny
2020-11-13 12:39 Michał Górny
2020-11-13  9:02 Michał Górny
2020-09-30  2:31 Sam James
2020-09-30  2:25 Sam James
2020-09-25 12:13 Michał Górny
2020-09-25 12:13 Michał Górny
2020-09-25 12:13 Michał Górny
2020-09-17 16:56 Michał Górny
2020-09-16 22:30 Michał Górny
2020-09-16 22:30 Michał Górny
2020-09-16 22:30 Michał Górny
2020-09-11 21:05 Michał Górny
2020-09-11  9:31 Michał Górny
2020-08-30 20:31 Thomas Deutschmann
2020-08-27  5:44 Michał Górny
2020-07-02  9:52 David Seifert
2020-04-12 17:47 Michał Górny
2020-03-25 20:31 Michał Górny
2020-02-08 13:37 Mikle Kolyada
2020-01-27 15:44 Thomas Deutschmann
2020-01-17 18:35 Michał Górny
2020-01-01  9:23 Georgy Yakovlev
2019-12-30 11:59 Michał Górny
2019-12-30 11:59 Michał Górny
2019-12-25 18:38 Michał Górny
2019-12-14 13:31 Michał Górny
2019-11-20 12:27 Michał Górny
2019-08-15  8:10 Michał Górny
2019-05-24 14:21 Michał Górny
2019-03-28 14:22 Michał Górny
2019-02-14 22:07 Michał Górny
2019-01-05 13:39 Michał Górny
2018-08-01 12:24 Michał Górny
2018-04-29  6:33 Michał Górny
2018-04-27  6:34 Michał Górny
2018-01-14 14:38 Michał Górny
2018-01-08 19:41 Michał Górny
2017-12-27 18:20 Michał Górny
2017-11-16 12:33 Michał Górny
2017-11-12  9:27 Michał Górny
2017-11-11 15:07 Michał Górny
2017-11-05 16:23 Michał Górny
2017-11-05 16:23 Michał Górny
2017-10-15 10:09 Michał Górny
2017-10-15  7:30 Michał Górny
2017-10-15  7:14 Michał Górny
2017-06-10  9:37 Michał Górny
2017-06-09 23:10 Michał Górny
2017-06-09 23:10 Michał Górny
2017-05-30  7:34 Michał Górny
2017-05-25 18:40 Michał Górny
2017-05-25 18:40 Michał Górny
2017-04-25 21:49 Michał Górny
2017-04-25 21:49 Michał Górny
2017-04-25 21:49 Michał Górny
2017-04-25 21:49 Michał Górny
2017-04-25 21:49 Michał Górny
2017-04-25 21:49 Michał Górny
2017-04-08  5:42 Michał Górny
2017-03-08 11:32 Michał Górny
2017-03-08 11:32 Michał Górny
2016-10-12 20:59 Michał Górny
2016-07-29 15:09 Michał Górny
2016-06-09 19:46 Michał Górny
2016-05-14  9:07 Michał Górny
2016-05-14  9:07 Michał Górny
2016-03-03 10:47 Michał Górny
2016-02-06 22:45 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1555828192.3e54d40120e8b27a6bf94eadfa1b8395edb03c7f.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox