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/pypy-exe/
Date: Fri, 14 May 2021 22:00:17 +0000 (UTC)	[thread overview]
Message-ID: <1621029522.7d89537244f346afe01e587857dda925428a1708.mgorny@gentoo> (raw)

commit:     7d89537244f346afe01e587857dda925428a1708
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri May 14 18:13:28 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri May 14 21:58:42 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d895372

dev-python/pypy-exe: Bump to 7.3.5rc2

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

 dev-python/pypy-exe/Manifest                  |   2 +
 dev-python/pypy-exe/pypy-exe-7.3.5_rc2.ebuild | 178 ++++++++++++++++++++++++++
 2 files changed, 180 insertions(+)

diff --git a/dev-python/pypy-exe/Manifest b/dev-python/pypy-exe/Manifest
index 35edec23e66..a0b16773ffb 100644
--- a/dev-python/pypy-exe/Manifest
+++ b/dev-python/pypy-exe/Manifest
@@ -1,4 +1,6 @@
 DIST pypy2.7-gentoo-patches-7.3.3_p2.tar.xz 11184 BLAKE2B b2b9b94478609372d616c65a87cbb12a07e217928beef9fac26c428f81c662ef390db3fd85bf368ffcc8c6fa3802e506412b7bebd14bdc453009008bc3459d25 SHA512 9ab8ed99b42b36e9c212683ef93f7f1fb99caecf056293ab9a5734f8b52eedec192860702baa121630558530cb5c4652f8542300ecaaaa282377ea6456618b95
 DIST pypy2.7-gentoo-patches-7.3.4.tar.xz 7844 BLAKE2B d06694fa085667e40ef8805c29f7ccf95b49f9de4e99e3ebfa3d69c4202a0ddcebb54c524d7d9f9ec67573a8d2ebe38fb7023d4d3ecef67afc907ecef5c16c02 SHA512 aa8ffefb5d30070ae86c1c14c55c277e39d3da66aea3a0951319158fb65e716e7fa7864e8bf5d26314d4b2a8030c766b63cad6a3663822d2875cd8cc1f3f2de5
+DIST pypy2.7-gentoo-patches-7.3.5rc2.tar.xz 5792 BLAKE2B 2380dc09be7e8dccfcc151e5c3cc5cc0aeb6a5a284b3b3fa8d12bdc0c6352d0da4fc3cb52762c1b5a38b97b3736147cb10986e0e6fdb622ff277445ba7228252 SHA512 1e269a02fc70b67fe44a8d57303a1565acbdb4b7f8065ec489b6bdd9275281e4b516fd1e01223e9635e4759a71c73be941f02e6bc561ab728d6a67e22bda47e3
 DIST pypy2.7-v7.3.3-src.tar.bz2 20881821 BLAKE2B ce1ecdd1fffe40574c7662da6038b84d2bca47ab168939ef0c12be2c6348317f17a94a3026e7fa53c71601edc153aefd98f770bd148e7af07ca751c0a5fc1252 SHA512 c2b6c44fdcac5f9445fab01572f859228fc286891fd09a4ddb95d283683d805276c853ec8e61fcd04cb9ee811d0e959d19bb03fdd7442c044f28a773633122e7
 DIST pypy2.7-v7.3.4-src.tar.bz2 21571561 BLAKE2B d0ac56fadec63fe7e65728c36c2aaf96fc5f54919dddbca9571a24c42a9e3e21f672f84555a18a384c4715f0489bd7aef009c0a47b635de88c472a93e2ae8d71 SHA512 4c18c2dbfbf0cc1034bea773828204df77aec7ef82119fb94e5cb762ce1783e00ad70e99d1432b4948dc132e726bdc6015f4a5bf10a5b10415bcfe99da2ecd17
+DIST pypy2.7-v7.3.5rc2-src.tar.bz2 21561927 BLAKE2B 1fd8aeba0698c95015716109d6a3aec74f95d1a4faea130ffe872b43d0ef8e1e8f8b742aeae6048ab596c5b78634e83c83c95ce3ed047d068dae7bddc02e1281 SHA512 d1d4b45c29c5e4c1735744b4aac46c87787bda7db496c8865e099e669f666f223ed9c014f3637065bb7762eda39a0116bab54078cf10ce8fbd8505d1ab952575

diff --git a/dev-python/pypy-exe/pypy-exe-7.3.5_rc2.ebuild b/dev-python/pypy-exe/pypy-exe-7.3.5_rc2.ebuild
new file mode 100644
index 00000000000..8678327f131
--- /dev/null
+++ b/dev-python/pypy-exe/pypy-exe-7.3.5_rc2.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+inherit check-reqs pax-utils python-any-r1 toolchain-funcs
+
+PYPY_PV=${PV%_p*}
+MY_P=pypy2.7-v${PYPY_PV/_}
+PATCHSET="pypy2.7-gentoo-patches-${PV/_}"
+
+DESCRIPTION="PyPy executable (build from source)"
+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"
+SLOT="${PYPY_PV}"
+KEYWORDS=""
+IUSE="bzip2 +jit low-memory ncurses cpu_flags_x86_sse2"
+
+RDEPEND=">=sys-libs/zlib-1.1.3:0=
+	dev-libs/libffi:0=
+	virtual/libintl:0=
+	dev-libs/expat:0=
+	bzip2? ( app-arch/bzip2:0= )
+	ncurses? ( sys-libs/ncurses:0= )
+	!dev-python/pypy-exe-bin:${PYPY_PV}"
+# don't enforce the dep on pypy with USE=low-memory since it's going
+# to cause either collisions or circular dep on itself
+DEPEND="${RDEPEND}"
+BDEPEND="
+	!low-memory? (
+		|| (
+			dev-python/pypy
+			dev-lang/python:2.7
+		)
+	)"
+
+check_env() {
+	if use low-memory; then
+		if ! has_version -b dev-python/pypy &&
+				! has_version -b dev-python/pypy-bin
+		then
+			eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy"
+			eerror "being installed. Please install it using e.g.:"
+			eerror
+			eerror "  $ emerge -1v dev-python/pypy dev-python/pypy-exe-bin"
+			eerror
+			eerror "before attempting to build dev-python/pypy-exe[low-memory]."
+			die "dev-python/pypy needs to be installed for USE=low-memory"
+		fi
+
+		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
+
+		use low-memory && EPYTHON=
+		if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] &&
+				{ has_version -b dev-python/pypy ||
+				has_version -b dev-python/pypy-bin; }
+		then
+			einfo "Using already-installed PyPy to perform the translation."
+			EPYTHON=pypy
+		else
+			einfo "Using ${EPYTHON} to perform the translation. Please note that upstream"
+			einfo "recommends using PyPy for that. If you wish to do so, please unset"
+			einfo "the EPYTHON variable."
+			python-any-r1_pkg_setup
+		fi
+	fi
+}
+
+src_prepare() {
+	local PATCHES=(
+		"${WORKDIR}/${PATCHSET}"
+	)
+	default
+}
+
+src_configure() {
+	tc-export CC
+
+	local jit_backend
+	if use jit; then
+		jit_backend='--jit-backend='
+
+		# We only need the explicit sse2 switch for x86.
+		# On other arches we can rely on autodetection which uses
+		# compiler macros. Plus, --jit-backend= doesn't accept all
+		# the modern values...
+
+		if use x86; then
+			if use cpu_flags_x86_sse2; then
+				jit_backend+=x86
+			else
+				jit_backend+=x86-without-sse2
+			fi
+		else
+			jit_backend+=auto
+		fi
+	fi
+
+	local args=(
+		--no-shared
+		$(usex jit -Ojit -O2)
+
+		${jit_backend}
+
+		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=( "${EPYTHON}" )
+	if use low-memory; then
+		interp=( env PYPY_GC_MAX_DELTA=200MB
+			"${EPYTHON}" --jit loop_longevity=300 )
+	fi
+
+	if [[ ${EPYTHON} != pypy ]]; then
+		# reuse bundled pycparser to avoid external dep
+		mkdir -p "${T}"/pymod/cffi || die
+		: > "${T}"/pymod/cffi/__init__.py || die
+		cp -r lib_pypy/cffi/_pycparser "${T}"/pymod/cffi/ || die
+		local -x PYTHONPATH=${T}/pymod:${PYTHONPATH}
+	fi
+
+	# translate into the C sources
+	# we're going to build 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
+}
+
+src_install() {
+	local dest=/usr/lib/pypy2.7
+	exeinto "${dest}"
+	newexe "${T}"/usession*-0/testing_1/pypy-c pypy-c-${PYPY_PV}
+	insinto "${dest}"/include/${PYPY_PV}
+	doins include/pypy_*
+	pax-mark m "${ED}${dest}/pypy-c-${PYPY_PV}"
+}


             reply	other threads:[~2021-05-14 22:00 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14 22:00 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-23  8:53 [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy-exe/ Michał Górny
2024-10-21 15:12 Michał Górny
2024-10-12  9:47 Michał Górny
2024-09-15 15:04 Michał Górny
2024-09-15 15:04 Michał Górny
2024-08-29 16:29 Michał Górny
2024-04-25  3:39 Michał Górny
2024-04-24 17:59 Arthur Zamarin
2024-04-24 17:16 Sam James
2024-04-24 15:08 Michał Górny
2024-02-04  4:01 Michał Górny
2024-02-03 12:25 Arthur Zamarin
2024-02-03 11:32 Arthur Zamarin
2024-02-02 16:39 Michał Górny
2024-02-02 16:27 Arthur Zamarin
2024-02-02 14:17 Arthur Zamarin
2024-01-15 21:24 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-07-24 15:05 Michał Górny
2023-07-24  9:25 Jakov Smolić
2023-07-24  8:54 Jakov Smolić
2023-06-19  5:14 Michał Górny
2023-06-16 17:03 Michał Górny
2023-05-31  9:19 Michał Górny
2023-05-14 19:29 Michał Górny
2023-02-03 15:17 Michał Górny
2023-02-03 13:46 Arthur Zamarin
2023-02-03 13:46 Arthur Zamarin
2022-12-30 14:32 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-24 19:49 Michał Górny
2022-11-24 16:47 Michał Górny
2022-08-28 19:20 Michał Górny
2022-05-04 17:56 Michał Górny
2022-05-04 15:11 Jakov Smolić
2022-05-01 12:20 Jakov Smolić
2022-03-30 15:13 Michał Górny
2022-03-22 10:00 Michał Górny
2022-03-22  9:27 Jakov Smolić
2022-03-22  9:27 Jakov Smolić
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
2021-11-10  8:00 Michał Górny
2021-11-10  7:05 Agostino Sarubbo
2021-11-10  7:04 Agostino Sarubbo
2021-10-25 20:16 Michał Górny
2021-10-17 21:15 Michał Górny
2021-10-06 18:17 Michał Górny
2021-09-13 20:55 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-29 22:22 Michał Górny
2021-07-30 18:14 Michał Górny
2021-05-24 10:22 Michał Górny
2021-05-23 23:05 Agostino Sarubbo
2021-05-19 20:06 Agostino Sarubbo
2021-05-19 18:21 Michał Górny
2021-04-09 11:46 Michał Górny
2021-03-05 21:06 Michał Górny
2021-03-05 20:49 Agostino Sarubbo
2021-03-05 20:48 Agostino Sarubbo
2021-03-04 14:56 Michał Górny
2021-03-04 14:56 Michał Górny
2021-01-09  2:14 Sam James
2020-12-31 23:08 Sam James
2020-11-22 11:51 Michał Górny
2020-11-13  9:02 Michał Górny
2020-09-30  2:25 Sam James
2020-09-28  9:08 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-09  7:18 Michał Górny
2020-08-29 17:57 Thomas Deutschmann
2020-08-27  5:44 Michał Górny
2020-04-11  7:49 Michał Górny
2020-04-11  7:49 Michał Górny
2020-02-08 13:37 Mikle Kolyada
2020-01-27 15:44 Thomas Deutschmann
2020-01-19  4:34 Michał Górny
2020-01-04 23:53 Georgy Yakovlev
2020-01-04 15:01 Michał Górny
2020-01-01 16:04 Michał Górny
2020-01-01 16:04 Michał Górny
2019-12-30 12:59 Michał Górny
2019-12-25 18:38 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=1621029522.7d89537244f346afe01e587857dda925428a1708.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