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: Sun, 20 Feb 2022 12:28:03 +0000 (UTC)	[thread overview]
Message-ID: <1645360076.587dafdd6fe6e71bc239388d7e7033698e4f9ed6.mgorny@gentoo> (raw)

commit:     587dafdd6fe6e71bc239388d7e7033698e4f9ed6
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 20 11:19:22 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Feb 20 12:27:56 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=587dafdd

dev-python/pypy-exe: Bump to 7.3.8

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

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

diff --git a/dev-python/pypy-exe/Manifest b/dev-python/pypy-exe/Manifest
index 7c9c676fd5de..d02ba55f2a12 100644
--- a/dev-python/pypy-exe/Manifest
+++ b/dev-python/pypy-exe/Manifest
@@ -1,6 +1,8 @@
 DIST pypy2.7-gentoo-patches-7.3.6.tar.xz 7904 BLAKE2B 6a809f8f1fd59c18627abaf81b47fa5948d39d5ece86fa416944c1c6585ec5d43b56f4228479a6afdca9788a0ecfdc83fceb4eeea25f289c1dc0b2dbda79b882 SHA512 01fe42cdf94b559ed787e253325f7df0add62e30e77c6b6e4c0301c81ff624a31167d95b39d24d72f28441468d571112f424957de38e7f26ecdbfe0f33617296
+DIST pypy2.7-gentoo-patches-7.3.8.tar.xz 7428 BLAKE2B 5362c34929e2053fc9a806e9894f35cce02ba1ebfad66cc64acc200ade4317934ee50dbc072194d19e201dea2a678abd609001ffe7e39bd6890a3b26c9d6d00e SHA512 6a7bfadac8f638e69419a6a1536af595a63bb2b4e3028da6423bd164d3df5399901b217468b1b374a5162ca8d2e5a61c4a19996f9e63109ed414a1aedcaac5d6
 DIST pypy2.7-gentoo-patches-7.3.8rc1.tar.xz 7424 BLAKE2B 931fccd3415e0da7c0fa5a228fc1fec2006a9d12d3523222fc0618a901c161df9f149d09e354029b42ca2144bdeebbd228ec6025574d87d4b630fd0750bc4919 SHA512 c193610c46d4b02d1445073f12c3285ce053f5b860584b1c39bff48d5e800c609d40ff0eb91049cdf8f4bfdb4e7bb48d7059de98785e598349022602b97e5f2c
 DIST pypy2.7-gentoo-patches-7.3.8rc2.tar.xz 7424 BLAKE2B 1d0e7e86cbc08ac3dc6f10fdb887bc4b634a9ac0aeeb39962b5cca85e05122c7dd8548848933d88f62508d3d2032f5f4abe1feea6cf06976659d142d451d0ffb SHA512 62d33bd700c28cd93617d69ccbbb3651fa794378583fdf584b2030f330b3a9bf55fba7d03539baacd9faac02e5d812b481c64b9c3f25cf304d780d162e8c3840
 DIST pypy2.7-v7.3.6-src.tar.bz2 21621891 BLAKE2B a2d18ae9d455747484de491df228e7f26af46fc3bc1fd1c16ceba79eba5a3a3272d48312c9da112ae9310722b5af33098f28a7dc15d7ff4760886a8c974692a2 SHA512 df914f5e1a1f5ae5c1ea11cd8e29482309af4dce041cf2ae6d7b35a35717fec903be70f56e5f1ddbc9fd370cbe29f6896d25eb2cd10c493c352c80b279070ba3
+DIST pypy2.7-v7.3.8-src.tar.bz2 23279006 BLAKE2B 7b2f5bfaffb99d3444f355039f743a21016dea22cc78cd5feca05eb12ce0e5ed39dafd22a8726994d0aff789e68b506197680e7181087313d2c5cd17b674ae4d SHA512 6ff90fad998c25aec5823e61d65266c169e89cba2ee2e3b6d0864d34d69a6b9fe7ad4d591bc8b38a48c5c22ea3dd468d3188cd34e03746c258752eaa24ac3ae2
 DIST pypy2.7-v7.3.8rc1-src.tar.bz2 23267987 BLAKE2B 035aef49ff0e8b1caed24e87712364ca350fe9f51247eaf732a32458a756264a867ad1270d4edc500daba8dcf70ca8882eb7f381135961f7f48d784ffe8bc6ee SHA512 88184be129ca3698db4e04ae6d241b7c748626870400a100ee2b8bba6ae3c0508071e435adb204bd6b34642ff3c8b0b71643446a3b443cc4467d68591fd53ceb
 DIST pypy2.7-v7.3.8rc2-src.tar.bz2 23272804 BLAKE2B 5ff559f603f06a44a6149dd898df3351f2de4c42219dbcf6e811e1120079e8979a3edb3c76a01a30400684bb8088eb8e15c0408b6ea0d3762eff87eca41a0021 SHA512 ab85b219d43d556d84847af116d3012706264571d6ebdc0b1242195cdc906f9a9073ce5f42e9e5b4a9d1f974fe103b64190c7f3e5b53766443a4b9b938f55d1c

diff --git a/dev-python/pypy-exe/pypy-exe-7.3.8.ebuild b/dev-python/pypy-exe/pypy-exe-7.3.8.ebuild
new file mode 100644
index 000000000000..e35d87754072
--- /dev/null
+++ b/dev-python/pypy-exe/pypy-exe-7.3.8.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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:[~2022-02-20 12:28 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-20 12:28 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-15 15:04 [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy-exe/ 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-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-05-14 22:00 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=1645360076.587dafdd6fe6e71bc239388d7e7033698e4f9ed6.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