public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2023-05-31 11:42 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2023-05-31 11:42 UTC (permalink / raw
  To: gentoo-commits

commit:     cab498ab207ad50ac27b4480553d532153dca217
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed May 31 06:29:53 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed May 31 11:39:24 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cab498ab

dev-python/pypy3_9: Split from dev-python/pypy3, 7.3.12_rc2

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

 dev-python/pypy3_9/Manifest                  |   2 +
 dev-python/pypy3_9/metadata.xml              |  18 +++
 dev-python/pypy3_9/pypy3_9-7.3.12_rc2.ebuild | 208 +++++++++++++++++++++++++++
 3 files changed, 228 insertions(+)

diff --git a/dev-python/pypy3_9/Manifest b/dev-python/pypy3_9/Manifest
new file mode 100644
index 000000000000..7982662b600c
--- /dev/null
+++ b/dev-python/pypy3_9/Manifest
@@ -0,0 +1,2 @@
+DIST pypy3.9-gentoo-patches-7.3.12rc2.tar.xz 7476 BLAKE2B d425ac68f555aeee07ca2b993341f5c7662d27f599200b1dbb3ad489a925b6934b6e95c39505c1dc899bde4b1e903822988ea98e6af883418d7b2b11ca8f42fb SHA512 c3fee32098544a13b7a14809357e7a8f060f0223eb50dd246981a304d1f273c8633b4dbca64ef2bb1a1f79fd1e7a48482d729f933c676768d11b7955f9f6c2d7
+DIST pypy3.9-v7.3.12rc2-src.tar.bz2 23585984 BLAKE2B 52fbdc403c7af9b2b96f50efe2256ad0f2b2fcf4622649f42606349994ac9bc4a9475b52dce58ee4cc36be06a845c009ac2097887e6d784f1712ed9ab0a0cf63 SHA512 5795081557e192b9b007eb0e324f2df5e520204d0c4fe9bb1118c99203584629b4c4da241d8b172e04654bc61c07d43d0b968232265f927bb425d76e7e9bc442

diff --git a/dev-python/pypy3_9/metadata.xml b/dev-python/pypy3_9/metadata.xml
new file mode 100644
index 000000000000..279dc3f87516
--- /dev/null
+++ b/dev-python/pypy3_9/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>python@gentoo.org</email>
+		<name>Python</name>
+	</maintainer>
+	<use>
+		<flag name="ensurepip">
+			Install the ensurepip module that uses bundled wheels
+			to bootstrap pip and setuptools (if disabled, it will
+			be only possible to use venv `--without-pip`)
+		</flag>
+	</use>
+	<upstream>
+		<remote-id type="heptapod">pypy/pypy</remote-id>
+	</upstream>
+</pkgmetadata>

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.12_rc2.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.12_rc2.ebuild
new file mode 100644
index 000000000000..90d3f4dc9027
--- /dev/null
+++ b/dev-python/pypy3_9/pypy3_9-7.3.12_rc2.ebuild
@@ -0,0 +1,208 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit pax-utils python-utils-r1 toolchain-funcs
+
+PYPY_PV=${PV%_p*}
+PYVER=3.9
+MY_P="pypy${PYVER}-v${PYPY_PV/_}"
+PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_rc/rc}"
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language"
+HOMEPAGE="
+	https://www.pypy.org/
+	https://foss.heptapod.net/pypy/pypy/
+"
+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"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+# also check pypy/interpreter/pycode.py -> pypy_incremental_magic
+SLOT="0/pypy39-pp73-336"
+KEYWORDS=""
+IUSE="+ensurepip gdbm +jit ncurses sqlite tk"
+# many tests are failing upstream
+# see https://buildbot.pypy.org/summary?branch=py${PYVER}
+RESTRICT="test"
+
+RDEPEND="
+	|| (
+		>=dev-python/${PN}-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?]
+		>=dev-python/${PN}-exe-bin-${PYPY_PV}:${PYPY_PV}
+	)
+	dev-lang/python-exec[python_targets_pypy3(-)]
+	dev-libs/openssl:0=
+	dev-python/gentoo-common
+	ensurepip? ( dev-python/ensurepip-wheels )
+	gdbm? ( sys-libs/gdbm:0= )
+	sqlite? ( dev-db/sqlite:3= )
+	tk? (
+		dev-lang/tk:0=
+		dev-tcltk/tix:0=
+	)
+	!<dev-python/pypy3-7.3.12_rc
+"
+DEPEND="
+	${RDEPEND}
+"
+
+src_prepare() {
+	local PATCHES=(
+		"${WORKDIR}/${PATCHSET}"
+	)
+	default
+
+	eapply_user
+}
+
+src_configure() {
+	tc-export CC
+}
+
+src_compile() {
+	mkdir bin || die
+	# switch to the layout expected for cffi module builds
+	mkdir include/pypy${PYVER} || die
+	# copy over to make sys.prefix happy
+	cp -p "${BROOT}"/usr/bin/pypy${PYVER}-c-${PYPY_PV} pypy${PYVER}-c || die
+	cp -p "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/* include/pypy${PYVER}/ || die
+	# (not installed by pypy-exe)
+	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
+	mv pypy/module/cpyext/include/* include/pypy${PYVER}/ || die
+	mv pypy/module/cpyext/parse/*.h include/pypy${PYVER}/ || die
+	pax-mark m pypy${PYVER}-c
+
+	# verify the subslot
+	local soabi=$(
+		./pypy${PYVER}-c - <<-EOF
+			import importlib.util
+			import sysconfig
+			soabi = sysconfig.get_config_var("SOABI")
+			magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff
+			print(f"{soabi}-{magic}")
+		EOF
+	)
+	[[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
+
+	# Add epython.py to the distribution
+	echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die
+
+	einfo "Generating caches and CFFI modules ..."
+
+	# Generate sysconfig data
+	local host_gnu_type=$(sh pypy/tool/release/config.guess)
+	local overrides=(
+		HOST_GNU_TYPE "${host_gnu_type:-unknown}"
+		INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}"
+		LIBDIR "${EPREFIX}/usr/$(get_libdir)"
+		TZPATH "${EPREFIX}/usr/share/zoneinfo"
+		WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip"
+	)
+	./pypy${PYVER}-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die
+	local outdir
+	outdir=$(<pybuilddir.txt) || die
+	cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die
+
+	# Generate Grammar and PatternGrammar pickles.
+	./pypy${PYVER}-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
+		import lib2to3.pygram
+		import lib2to3.patcomp
+		lib2to3.patcomp.PatternCompiler()
+	EOF
+
+	# Generate cffi modules
+	# Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py!
+	# (NB: we build CFFI modules first to avoid error log when importing
+	# build_cffi_imports).
+	cffi_targets=(
+		pypy_util blake2/_blake2 sha3/_sha3 ssl
+		audioop syslog pwdgrp resource lzma posixshmem
+	)
+	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${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
+	done
+
+	# Verify that CFFI module list is up-to-date
+	local expected_cksum=63d4659f
+	local local_cksum=$(
+		../pypy${PYVER}-c - <<-EOF
+			import binascii
+			import json
+			from pypy_tools.build_cffi_imports import cffi_build_scripts as x
+			print("%08x" % (binascii.crc32(json.dumps(x).encode()),))
+		EOF
+	)
+	if [[ ${local_cksum} != ${expected_cksum} ]]; then
+		die "Please verify cffi_targets and update checksum to ${local_cksum}"
+	fi
+
+	# Cleanup temporary objects
+	find -name "*_cffi.[co]" -delete || die
+	find -type d -empty -delete || die
+}
+
+src_install() {
+	einfo "Installing PyPy ..."
+	dodir /usr/bin
+	dosym pypy${PYVER}-c-${PYPY_PV} /usr/bin/pypy${PYVER}
+	insinto /usr/lib/pypy${PYVER}
+	# preserve mtimes to avoid obsoleting caches
+	insopts -p
+	doins -r lib-python/3/. lib_pypy/.
+	insinto /usr/include
+	doins -r include/pypy${PYVER}
+
+	# replace copied headers with symlinks
+	for x in "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/*; do
+		dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}"
+	done
+
+	dodoc README.rst
+
+	local dest=/usr/lib/pypy${PYVER}
+	rm -r "${ED}${dest}"/ensurepip/_bundled || die
+	if ! use ensurepip; then
+		rm -r "${ED}${dest}"/ensurepip || die
+	fi
+	if ! use gdbm; then
+		rm -r "${ED}${dest}"/_gdbm* || die
+	fi
+	if ! use sqlite; then
+		rm -r "${ED}${dest}"/sqlite3 \
+			"${ED}${dest}"/_sqlite3* \
+			"${ED}${dest}"/test/test_sqlite.py || die
+	fi
+	if ! use tk; then
+		rm -r "${ED}${dest}"/{idlelib,tkinter} \
+			"${ED}${dest}"/_tkinter \
+			"${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die
+	fi
+	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
+
+	local -x EPYTHON=pypy3
+	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
+	# temporarily copy to build tree to facilitate module builds
+	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
+
+	einfo "Byte-compiling Python standard library..."
+	python_optimize "${ED}${dest}"
+
+	# remove to avoid collisions
+	rm "${PYTHON}" || die
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2023-06-16 17:03 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2023-06-16 17:03 UTC (permalink / raw
  To: gentoo-commits

commit:     581c6ec527b1e4d7f054b10fc32a805e99a9ca7e
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 16 12:53:31 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jun 16 17:03:28 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=581c6ec5

dev-python/pypy3_9: Bump to 7.3.12

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

 dev-python/pypy3_9/Manifest              |   2 +
 dev-python/pypy3_9/pypy3_9-7.3.12.ebuild | 208 +++++++++++++++++++++++++++++++
 2 files changed, 210 insertions(+)

diff --git a/dev-python/pypy3_9/Manifest b/dev-python/pypy3_9/Manifest
index 7982662b600c..db0c20cda216 100644
--- a/dev-python/pypy3_9/Manifest
+++ b/dev-python/pypy3_9/Manifest
@@ -1,2 +1,4 @@
+DIST pypy3.9-gentoo-patches-7.3.12.tar.xz 7472 BLAKE2B 3948dc62af0b48c77e86cf25113363984ffcf118ca0ea797807a34d509223c6449edc66a835bd550cbdbb41c2c7386f2c56479b26e60effcf1c3a315ed113d0e SHA512 37f935d02a08c88aeab0337eb48a543c02cae37af5c0e692dda899f1b7acb811cf7d6c4d162829d6876d926d9cf376c522ec28ea7fb8957ca9a3ea7654262302
 DIST pypy3.9-gentoo-patches-7.3.12rc2.tar.xz 7476 BLAKE2B d425ac68f555aeee07ca2b993341f5c7662d27f599200b1dbb3ad489a925b6934b6e95c39505c1dc899bde4b1e903822988ea98e6af883418d7b2b11ca8f42fb SHA512 c3fee32098544a13b7a14809357e7a8f060f0223eb50dd246981a304d1f273c8633b4dbca64ef2bb1a1f79fd1e7a48482d729f933c676768d11b7955f9f6c2d7
+DIST pypy3.9-v7.3.12-src.tar.bz2 23528145 BLAKE2B 28cc42b10d6a84c441af673e1a0dc6d19e09daa1da9249a7fec39a9aaccbe5010a3586068ae0b10cd402b72e5acc58998469d5c99019caa41399951c2a221e26 SHA512 8e819a1ec3f3ce7fc5f901fb554660288a57e2a4834a3da35c1a57faf88ef4129240628a58334d2e0c2b1dda412da5d85ec943abe8046c0ce5d0cd0a0f7fc42a
 DIST pypy3.9-v7.3.12rc2-src.tar.bz2 23585984 BLAKE2B 52fbdc403c7af9b2b96f50efe2256ad0f2b2fcf4622649f42606349994ac9bc4a9475b52dce58ee4cc36be06a845c009ac2097887e6d784f1712ed9ab0a0cf63 SHA512 5795081557e192b9b007eb0e324f2df5e520204d0c4fe9bb1118c99203584629b4c4da241d8b172e04654bc61c07d43d0b968232265f927bb425d76e7e9bc442

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.12.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.12.ebuild
new file mode 100644
index 000000000000..6f73d957d6ea
--- /dev/null
+++ b/dev-python/pypy3_9/pypy3_9-7.3.12.ebuild
@@ -0,0 +1,208 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit pax-utils python-utils-r1 toolchain-funcs
+
+PYPY_PV=${PV%_p*}
+PYVER=3.9
+MY_P="pypy${PYVER}-v${PYPY_PV/_}"
+PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_rc/rc}"
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language"
+HOMEPAGE="
+	https://www.pypy.org/
+	https://foss.heptapod.net/pypy/pypy/
+"
+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"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+# also check pypy/interpreter/pycode.py -> pypy_incremental_magic
+SLOT="0/pypy39-pp73-336"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+ensurepip gdbm +jit ncurses sqlite tk"
+# many tests are failing upstream
+# see https://buildbot.pypy.org/summary?branch=py${PYVER}
+RESTRICT="test"
+
+RDEPEND="
+	|| (
+		>=dev-python/${PN}-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?]
+		>=dev-python/${PN}-exe-bin-${PYPY_PV}:${PYPY_PV}
+	)
+	dev-lang/python-exec[python_targets_pypy3(-)]
+	dev-libs/openssl:0=
+	dev-python/gentoo-common
+	ensurepip? ( dev-python/ensurepip-wheels )
+	gdbm? ( sys-libs/gdbm:0= )
+	sqlite? ( dev-db/sqlite:3= )
+	tk? (
+		dev-lang/tk:0=
+		dev-tcltk/tix:0=
+	)
+	!<dev-python/pypy3-7.3.12_rc
+"
+DEPEND="
+	${RDEPEND}
+"
+
+src_prepare() {
+	local PATCHES=(
+		"${WORKDIR}/${PATCHSET}"
+	)
+	default
+
+	eapply_user
+}
+
+src_configure() {
+	tc-export CC
+}
+
+src_compile() {
+	mkdir bin || die
+	# switch to the layout expected for cffi module builds
+	mkdir include/pypy${PYVER} || die
+	# copy over to make sys.prefix happy
+	cp -p "${BROOT}"/usr/bin/pypy${PYVER}-c-${PYPY_PV} pypy${PYVER}-c || die
+	cp -p "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/* include/pypy${PYVER}/ || die
+	# (not installed by pypy-exe)
+	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
+	mv pypy/module/cpyext/include/* include/pypy${PYVER}/ || die
+	mv pypy/module/cpyext/parse/*.h include/pypy${PYVER}/ || die
+	pax-mark m pypy${PYVER}-c
+
+	# verify the subslot
+	local soabi=$(
+		./pypy${PYVER}-c - <<-EOF
+			import importlib.util
+			import sysconfig
+			soabi = sysconfig.get_config_var("SOABI")
+			magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff
+			print(f"{soabi}-{magic}")
+		EOF
+	)
+	[[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
+
+	# Add epython.py to the distribution
+	echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die
+
+	einfo "Generating caches and CFFI modules ..."
+
+	# Generate sysconfig data
+	local host_gnu_type=$(sh pypy/tool/release/config.guess)
+	local overrides=(
+		HOST_GNU_TYPE "${host_gnu_type:-unknown}"
+		INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}"
+		LIBDIR "${EPREFIX}/usr/$(get_libdir)"
+		TZPATH "${EPREFIX}/usr/share/zoneinfo"
+		WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip"
+	)
+	./pypy${PYVER}-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die
+	local outdir
+	outdir=$(<pybuilddir.txt) || die
+	cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die
+
+	# Generate Grammar and PatternGrammar pickles.
+	./pypy${PYVER}-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
+		import lib2to3.pygram
+		import lib2to3.patcomp
+		lib2to3.patcomp.PatternCompiler()
+	EOF
+
+	# Generate cffi modules
+	# Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py!
+	# (NB: we build CFFI modules first to avoid error log when importing
+	# build_cffi_imports).
+	cffi_targets=(
+		pypy_util blake2/_blake2 sha3/_sha3 ssl
+		audioop syslog pwdgrp resource lzma posixshmem
+	)
+	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${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
+	done
+
+	# Verify that CFFI module list is up-to-date
+	local expected_cksum=63d4659f
+	local local_cksum=$(
+		../pypy${PYVER}-c - <<-EOF
+			import binascii
+			import json
+			from pypy_tools.build_cffi_imports import cffi_build_scripts as x
+			print("%08x" % (binascii.crc32(json.dumps(x).encode()),))
+		EOF
+	)
+	if [[ ${local_cksum} != ${expected_cksum} ]]; then
+		die "Please verify cffi_targets and update checksum to ${local_cksum}"
+	fi
+
+	# Cleanup temporary objects
+	find -name "*_cffi.[co]" -delete || die
+	find -type d -empty -delete || die
+}
+
+src_install() {
+	einfo "Installing PyPy ..."
+	dodir /usr/bin
+	dosym pypy${PYVER}-c-${PYPY_PV} /usr/bin/pypy${PYVER}
+	insinto /usr/lib/pypy${PYVER}
+	# preserve mtimes to avoid obsoleting caches
+	insopts -p
+	doins -r lib-python/3/. lib_pypy/.
+	insinto /usr/include
+	doins -r include/pypy${PYVER}
+
+	# replace copied headers with symlinks
+	for x in "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/*; do
+		dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}"
+	done
+
+	dodoc README.rst
+
+	local dest=/usr/lib/pypy${PYVER}
+	rm -r "${ED}${dest}"/ensurepip/_bundled || die
+	if ! use ensurepip; then
+		rm -r "${ED}${dest}"/ensurepip || die
+	fi
+	if ! use gdbm; then
+		rm -r "${ED}${dest}"/_gdbm* || die
+	fi
+	if ! use sqlite; then
+		rm -r "${ED}${dest}"/sqlite3 \
+			"${ED}${dest}"/_sqlite3* \
+			"${ED}${dest}"/test/test_sqlite.py || die
+	fi
+	if ! use tk; then
+		rm -r "${ED}${dest}"/{idlelib,tkinter} \
+			"${ED}${dest}"/_tkinter \
+			"${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die
+	fi
+	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
+
+	local -x EPYTHON=pypy3
+	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
+	# temporarily copy to build tree to facilitate module builds
+	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
+
+	einfo "Byte-compiling Python standard library..."
+	python_optimize "${ED}${dest}"
+
+	# remove to avoid collisions
+	rm "${PYTHON}" || die
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2023-06-19  5:14 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2023-06-19  5:14 UTC (permalink / raw
  To: gentoo-commits

commit:     c4ef95e9ad5745dd2bd31f4c96e7534fdd35aa51
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 19 05:10:07 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jun 19 05:10:07 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4ef95e9

dev-python/pypy3_9: Remove old

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

 dev-python/pypy3_9/Manifest                  |   2 -
 dev-python/pypy3_9/pypy3_9-7.3.12_rc2.ebuild | 208 ---------------------------
 2 files changed, 210 deletions(-)

diff --git a/dev-python/pypy3_9/Manifest b/dev-python/pypy3_9/Manifest
index db0c20cda216..d6ecf4eb15a9 100644
--- a/dev-python/pypy3_9/Manifest
+++ b/dev-python/pypy3_9/Manifest
@@ -1,4 +1,2 @@
 DIST pypy3.9-gentoo-patches-7.3.12.tar.xz 7472 BLAKE2B 3948dc62af0b48c77e86cf25113363984ffcf118ca0ea797807a34d509223c6449edc66a835bd550cbdbb41c2c7386f2c56479b26e60effcf1c3a315ed113d0e SHA512 37f935d02a08c88aeab0337eb48a543c02cae37af5c0e692dda899f1b7acb811cf7d6c4d162829d6876d926d9cf376c522ec28ea7fb8957ca9a3ea7654262302
-DIST pypy3.9-gentoo-patches-7.3.12rc2.tar.xz 7476 BLAKE2B d425ac68f555aeee07ca2b993341f5c7662d27f599200b1dbb3ad489a925b6934b6e95c39505c1dc899bde4b1e903822988ea98e6af883418d7b2b11ca8f42fb SHA512 c3fee32098544a13b7a14809357e7a8f060f0223eb50dd246981a304d1f273c8633b4dbca64ef2bb1a1f79fd1e7a48482d729f933c676768d11b7955f9f6c2d7
 DIST pypy3.9-v7.3.12-src.tar.bz2 23528145 BLAKE2B 28cc42b10d6a84c441af673e1a0dc6d19e09daa1da9249a7fec39a9aaccbe5010a3586068ae0b10cd402b72e5acc58998469d5c99019caa41399951c2a221e26 SHA512 8e819a1ec3f3ce7fc5f901fb554660288a57e2a4834a3da35c1a57faf88ef4129240628a58334d2e0c2b1dda412da5d85ec943abe8046c0ce5d0cd0a0f7fc42a
-DIST pypy3.9-v7.3.12rc2-src.tar.bz2 23585984 BLAKE2B 52fbdc403c7af9b2b96f50efe2256ad0f2b2fcf4622649f42606349994ac9bc4a9475b52dce58ee4cc36be06a845c009ac2097887e6d784f1712ed9ab0a0cf63 SHA512 5795081557e192b9b007eb0e324f2df5e520204d0c4fe9bb1118c99203584629b4c4da241d8b172e04654bc61c07d43d0b968232265f927bb425d76e7e9bc442

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.12_rc2.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.12_rc2.ebuild
deleted file mode 100644
index 90d3f4dc9027..000000000000
--- a/dev-python/pypy3_9/pypy3_9-7.3.12_rc2.ebuild
+++ /dev/null
@@ -1,208 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit pax-utils python-utils-r1 toolchain-funcs
-
-PYPY_PV=${PV%_p*}
-PYVER=3.9
-MY_P="pypy${PYVER}-v${PYPY_PV/_}"
-PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_rc/rc}"
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language"
-HOMEPAGE="
-	https://www.pypy.org/
-	https://foss.heptapod.net/pypy/pypy/
-"
-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"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-# also check pypy/interpreter/pycode.py -> pypy_incremental_magic
-SLOT="0/pypy39-pp73-336"
-KEYWORDS=""
-IUSE="+ensurepip gdbm +jit ncurses sqlite tk"
-# many tests are failing upstream
-# see https://buildbot.pypy.org/summary?branch=py${PYVER}
-RESTRICT="test"
-
-RDEPEND="
-	|| (
-		>=dev-python/${PN}-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?]
-		>=dev-python/${PN}-exe-bin-${PYPY_PV}:${PYPY_PV}
-	)
-	dev-lang/python-exec[python_targets_pypy3(-)]
-	dev-libs/openssl:0=
-	dev-python/gentoo-common
-	ensurepip? ( dev-python/ensurepip-wheels )
-	gdbm? ( sys-libs/gdbm:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!<dev-python/pypy3-7.3.12_rc
-"
-DEPEND="
-	${RDEPEND}
-"
-
-src_prepare() {
-	local PATCHES=(
-		"${WORKDIR}/${PATCHSET}"
-	)
-	default
-
-	eapply_user
-}
-
-src_configure() {
-	tc-export CC
-}
-
-src_compile() {
-	mkdir bin || die
-	# switch to the layout expected for cffi module builds
-	mkdir include/pypy${PYVER} || die
-	# copy over to make sys.prefix happy
-	cp -p "${BROOT}"/usr/bin/pypy${PYVER}-c-${PYPY_PV} pypy${PYVER}-c || die
-	cp -p "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/* include/pypy${PYVER}/ || die
-	# (not installed by pypy-exe)
-	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
-	mv pypy/module/cpyext/include/* include/pypy${PYVER}/ || die
-	mv pypy/module/cpyext/parse/*.h include/pypy${PYVER}/ || die
-	pax-mark m pypy${PYVER}-c
-
-	# verify the subslot
-	local soabi=$(
-		./pypy${PYVER}-c - <<-EOF
-			import importlib.util
-			import sysconfig
-			soabi = sysconfig.get_config_var("SOABI")
-			magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff
-			print(f"{soabi}-{magic}")
-		EOF
-	)
-	[[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
-
-	# Add epython.py to the distribution
-	echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate sysconfig data
-	local host_gnu_type=$(sh pypy/tool/release/config.guess)
-	local overrides=(
-		HOST_GNU_TYPE "${host_gnu_type:-unknown}"
-		INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}"
-		LIBDIR "${EPREFIX}/usr/$(get_libdir)"
-		TZPATH "${EPREFIX}/usr/share/zoneinfo"
-		WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip"
-	)
-	./pypy${PYVER}-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die
-	local outdir
-	outdir=$(<pybuilddir.txt) || die
-	cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy${PYVER}-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
-		import lib2to3.pygram
-		import lib2to3.patcomp
-		lib2to3.patcomp.PatternCompiler()
-	EOF
-
-	# Generate cffi modules
-	# Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py!
-	# (NB: we build CFFI modules first to avoid error log when importing
-	# build_cffi_imports).
-	cffi_targets=(
-		pypy_util blake2/_blake2 sha3/_sha3 ssl
-		audioop syslog pwdgrp resource lzma posixshmem
-	)
-	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${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
-	done
-
-	# Verify that CFFI module list is up-to-date
-	local expected_cksum=63d4659f
-	local local_cksum=$(
-		../pypy${PYVER}-c - <<-EOF
-			import binascii
-			import json
-			from pypy_tools.build_cffi_imports import cffi_build_scripts as x
-			print("%08x" % (binascii.crc32(json.dumps(x).encode()),))
-		EOF
-	)
-	if [[ ${local_cksum} != ${expected_cksum} ]]; then
-		die "Please verify cffi_targets and update checksum to ${local_cksum}"
-	fi
-
-	# Cleanup temporary objects
-	find -name "*_cffi.[co]" -delete || die
-	find -type d -empty -delete || die
-}
-
-src_install() {
-	einfo "Installing PyPy ..."
-	dodir /usr/bin
-	dosym pypy${PYVER}-c-${PYPY_PV} /usr/bin/pypy${PYVER}
-	insinto /usr/lib/pypy${PYVER}
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r lib-python/3/. lib_pypy/.
-	insinto /usr/include
-	doins -r include/pypy${PYVER}
-
-	# replace copied headers with symlinks
-	for x in "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/*; do
-		dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}"
-	done
-
-	dodoc README.rst
-
-	local dest=/usr/lib/pypy${PYVER}
-	rm -r "${ED}${dest}"/ensurepip/_bundled || die
-	if ! use ensurepip; then
-		rm -r "${ED}${dest}"/ensurepip || die
-	fi
-	if ! use gdbm; then
-		rm -r "${ED}${dest}"/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED}${dest}"/sqlite3 \
-			"${ED}${dest}"/_sqlite3* \
-			"${ED}${dest}"/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED}${dest}"/{idlelib,tkinter} \
-			"${ED}${dest}"/_tkinter \
-			"${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die
-	fi
-	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
-
-	local -x EPYTHON=pypy3
-	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
-	# temporarily copy to build tree to facilitate module builds
-	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
-
-	einfo "Byte-compiling Python standard library..."
-	python_optimize "${ED}${dest}"
-
-	# remove to avoid collisions
-	rm "${PYTHON}" || die
-}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2023-06-19  5:14 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2023-06-19  5:14 UTC (permalink / raw
  To: gentoo-commits

commit:     14639c02b58a0a960c9286a313a5258aedb5413a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 19 05:09:02 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jun 19 05:09:02 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14639c02

dev-python/pypy3_9: Fix missing _testmultiphase module

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

 dev-python/pypy3_9/{pypy3_9-7.3.12.ebuild => pypy3_9-7.3.12-r1.ebuild} | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.12.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.12-r1.ebuild
similarity index 99%
rename from dev-python/pypy3_9/pypy3_9-7.3.12.ebuild
rename to dev-python/pypy3_9/pypy3_9-7.3.12-r1.ebuild
index 6f73d957d6ea..1c6eec918ff3 100644
--- a/dev-python/pypy3_9/pypy3_9-7.3.12.ebuild
+++ b/dev-python/pypy3_9/pypy3_9-7.3.12-r1.ebuild
@@ -123,6 +123,7 @@ src_compile() {
 	cffi_targets=(
 		pypy_util blake2/_blake2 sha3/_sha3 ssl
 		audioop syslog pwdgrp resource lzma posixshmem
+		testmultiphase
 	)
 	use gdbm && cffi_targets+=( gdbm )
 	use ncurses && cffi_targets+=( curses )


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2023-07-19 11:00 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2023-07-19 11:00 UTC (permalink / raw
  To: gentoo-commits

commit:     ac0804f4c37e13a8eff29f302701569143f5a2b4
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 19 10:54:56 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jul 19 11:00:05 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac0804f4

dev-python/pypy3_9: Backport venv fixes as 7.3.12_p1

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

 dev-python/pypy3_9/Manifest                 |   1 +
 dev-python/pypy3_9/pypy3_9-7.3.12_p1.ebuild | 209 ++++++++++++++++++++++++++++
 2 files changed, 210 insertions(+)

diff --git a/dev-python/pypy3_9/Manifest b/dev-python/pypy3_9/Manifest
index d6ecf4eb15a9..dbe2bd81bae9 100644
--- a/dev-python/pypy3_9/Manifest
+++ b/dev-python/pypy3_9/Manifest
@@ -1,2 +1,3 @@
 DIST pypy3.9-gentoo-patches-7.3.12.tar.xz 7472 BLAKE2B 3948dc62af0b48c77e86cf25113363984ffcf118ca0ea797807a34d509223c6449edc66a835bd550cbdbb41c2c7386f2c56479b26e60effcf1c3a315ed113d0e SHA512 37f935d02a08c88aeab0337eb48a543c02cae37af5c0e692dda899f1b7acb811cf7d6c4d162829d6876d926d9cf376c522ec28ea7fb8957ca9a3ea7654262302
+DIST pypy3.9-gentoo-patches-7.3.12_p1.tar.xz 8552 BLAKE2B 99a7bcc52fcaaec1853162b4f65dc2688b2a90e6ede202a6e6a18ceb8ff16fd479781891305479a1c6a7f889cb9a3fb6f5f081d1318231f420cc98f10976b0aa SHA512 2047626612be66a617f073076f4d0b5821ba2d01e955c10df7c97caa53aae67f30fcf6088e3d532c97e805a0be223be2cab16a355970757557100080e5fc658d
 DIST pypy3.9-v7.3.12-src.tar.bz2 23528145 BLAKE2B 28cc42b10d6a84c441af673e1a0dc6d19e09daa1da9249a7fec39a9aaccbe5010a3586068ae0b10cd402b72e5acc58998469d5c99019caa41399951c2a221e26 SHA512 8e819a1ec3f3ce7fc5f901fb554660288a57e2a4834a3da35c1a57faf88ef4129240628a58334d2e0c2b1dda412da5d85ec943abe8046c0ce5d0cd0a0f7fc42a

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.12_p1.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.12_p1.ebuild
new file mode 100644
index 000000000000..1c6eec918ff3
--- /dev/null
+++ b/dev-python/pypy3_9/pypy3_9-7.3.12_p1.ebuild
@@ -0,0 +1,209 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit pax-utils python-utils-r1 toolchain-funcs
+
+PYPY_PV=${PV%_p*}
+PYVER=3.9
+MY_P="pypy${PYVER}-v${PYPY_PV/_}"
+PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_rc/rc}"
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language"
+HOMEPAGE="
+	https://www.pypy.org/
+	https://foss.heptapod.net/pypy/pypy/
+"
+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"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+# also check pypy/interpreter/pycode.py -> pypy_incremental_magic
+SLOT="0/pypy39-pp73-336"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+ensurepip gdbm +jit ncurses sqlite tk"
+# many tests are failing upstream
+# see https://buildbot.pypy.org/summary?branch=py${PYVER}
+RESTRICT="test"
+
+RDEPEND="
+	|| (
+		>=dev-python/${PN}-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?]
+		>=dev-python/${PN}-exe-bin-${PYPY_PV}:${PYPY_PV}
+	)
+	dev-lang/python-exec[python_targets_pypy3(-)]
+	dev-libs/openssl:0=
+	dev-python/gentoo-common
+	ensurepip? ( dev-python/ensurepip-wheels )
+	gdbm? ( sys-libs/gdbm:0= )
+	sqlite? ( dev-db/sqlite:3= )
+	tk? (
+		dev-lang/tk:0=
+		dev-tcltk/tix:0=
+	)
+	!<dev-python/pypy3-7.3.12_rc
+"
+DEPEND="
+	${RDEPEND}
+"
+
+src_prepare() {
+	local PATCHES=(
+		"${WORKDIR}/${PATCHSET}"
+	)
+	default
+
+	eapply_user
+}
+
+src_configure() {
+	tc-export CC
+}
+
+src_compile() {
+	mkdir bin || die
+	# switch to the layout expected for cffi module builds
+	mkdir include/pypy${PYVER} || die
+	# copy over to make sys.prefix happy
+	cp -p "${BROOT}"/usr/bin/pypy${PYVER}-c-${PYPY_PV} pypy${PYVER}-c || die
+	cp -p "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/* include/pypy${PYVER}/ || die
+	# (not installed by pypy-exe)
+	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
+	mv pypy/module/cpyext/include/* include/pypy${PYVER}/ || die
+	mv pypy/module/cpyext/parse/*.h include/pypy${PYVER}/ || die
+	pax-mark m pypy${PYVER}-c
+
+	# verify the subslot
+	local soabi=$(
+		./pypy${PYVER}-c - <<-EOF
+			import importlib.util
+			import sysconfig
+			soabi = sysconfig.get_config_var("SOABI")
+			magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff
+			print(f"{soabi}-{magic}")
+		EOF
+	)
+	[[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
+
+	# Add epython.py to the distribution
+	echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die
+
+	einfo "Generating caches and CFFI modules ..."
+
+	# Generate sysconfig data
+	local host_gnu_type=$(sh pypy/tool/release/config.guess)
+	local overrides=(
+		HOST_GNU_TYPE "${host_gnu_type:-unknown}"
+		INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}"
+		LIBDIR "${EPREFIX}/usr/$(get_libdir)"
+		TZPATH "${EPREFIX}/usr/share/zoneinfo"
+		WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip"
+	)
+	./pypy${PYVER}-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die
+	local outdir
+	outdir=$(<pybuilddir.txt) || die
+	cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die
+
+	# Generate Grammar and PatternGrammar pickles.
+	./pypy${PYVER}-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
+		import lib2to3.pygram
+		import lib2to3.patcomp
+		lib2to3.patcomp.PatternCompiler()
+	EOF
+
+	# Generate cffi modules
+	# Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py!
+	# (NB: we build CFFI modules first to avoid error log when importing
+	# build_cffi_imports).
+	cffi_targets=(
+		pypy_util blake2/_blake2 sha3/_sha3 ssl
+		audioop syslog pwdgrp resource lzma posixshmem
+		testmultiphase
+	)
+	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${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
+	done
+
+	# Verify that CFFI module list is up-to-date
+	local expected_cksum=63d4659f
+	local local_cksum=$(
+		../pypy${PYVER}-c - <<-EOF
+			import binascii
+			import json
+			from pypy_tools.build_cffi_imports import cffi_build_scripts as x
+			print("%08x" % (binascii.crc32(json.dumps(x).encode()),))
+		EOF
+	)
+	if [[ ${local_cksum} != ${expected_cksum} ]]; then
+		die "Please verify cffi_targets and update checksum to ${local_cksum}"
+	fi
+
+	# Cleanup temporary objects
+	find -name "*_cffi.[co]" -delete || die
+	find -type d -empty -delete || die
+}
+
+src_install() {
+	einfo "Installing PyPy ..."
+	dodir /usr/bin
+	dosym pypy${PYVER}-c-${PYPY_PV} /usr/bin/pypy${PYVER}
+	insinto /usr/lib/pypy${PYVER}
+	# preserve mtimes to avoid obsoleting caches
+	insopts -p
+	doins -r lib-python/3/. lib_pypy/.
+	insinto /usr/include
+	doins -r include/pypy${PYVER}
+
+	# replace copied headers with symlinks
+	for x in "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/*; do
+		dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}"
+	done
+
+	dodoc README.rst
+
+	local dest=/usr/lib/pypy${PYVER}
+	rm -r "${ED}${dest}"/ensurepip/_bundled || die
+	if ! use ensurepip; then
+		rm -r "${ED}${dest}"/ensurepip || die
+	fi
+	if ! use gdbm; then
+		rm -r "${ED}${dest}"/_gdbm* || die
+	fi
+	if ! use sqlite; then
+		rm -r "${ED}${dest}"/sqlite3 \
+			"${ED}${dest}"/_sqlite3* \
+			"${ED}${dest}"/test/test_sqlite.py || die
+	fi
+	if ! use tk; then
+		rm -r "${ED}${dest}"/{idlelib,tkinter} \
+			"${ED}${dest}"/_tkinter \
+			"${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die
+	fi
+	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
+
+	local -x EPYTHON=pypy3
+	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
+	# temporarily copy to build tree to facilitate module builds
+	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
+
+	einfo "Byte-compiling Python standard library..."
+	python_optimize "${ED}${dest}"
+
+	# remove to avoid collisions
+	rm "${PYTHON}" || die
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2023-07-24 11:33 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2023-07-24 11:33 UTC (permalink / raw
  To: gentoo-commits

commit:     b3d5dea057df57320159e6c260bb1eff7485ac93
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 24 11:19:36 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jul 24 11:33:14 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3d5dea0

dev-python/pypy3_9: Remove old

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

 dev-python/pypy3_9/Manifest                 |   1 -
 dev-python/pypy3_9/pypy3_9-7.3.12-r1.ebuild | 209 ----------------------------
 2 files changed, 210 deletions(-)

diff --git a/dev-python/pypy3_9/Manifest b/dev-python/pypy3_9/Manifest
index dbe2bd81bae9..15dc112067aa 100644
--- a/dev-python/pypy3_9/Manifest
+++ b/dev-python/pypy3_9/Manifest
@@ -1,3 +1,2 @@
-DIST pypy3.9-gentoo-patches-7.3.12.tar.xz 7472 BLAKE2B 3948dc62af0b48c77e86cf25113363984ffcf118ca0ea797807a34d509223c6449edc66a835bd550cbdbb41c2c7386f2c56479b26e60effcf1c3a315ed113d0e SHA512 37f935d02a08c88aeab0337eb48a543c02cae37af5c0e692dda899f1b7acb811cf7d6c4d162829d6876d926d9cf376c522ec28ea7fb8957ca9a3ea7654262302
 DIST pypy3.9-gentoo-patches-7.3.12_p1.tar.xz 8552 BLAKE2B 99a7bcc52fcaaec1853162b4f65dc2688b2a90e6ede202a6e6a18ceb8ff16fd479781891305479a1c6a7f889cb9a3fb6f5f081d1318231f420cc98f10976b0aa SHA512 2047626612be66a617f073076f4d0b5821ba2d01e955c10df7c97caa53aae67f30fcf6088e3d532c97e805a0be223be2cab16a355970757557100080e5fc658d
 DIST pypy3.9-v7.3.12-src.tar.bz2 23528145 BLAKE2B 28cc42b10d6a84c441af673e1a0dc6d19e09daa1da9249a7fec39a9aaccbe5010a3586068ae0b10cd402b72e5acc58998469d5c99019caa41399951c2a221e26 SHA512 8e819a1ec3f3ce7fc5f901fb554660288a57e2a4834a3da35c1a57faf88ef4129240628a58334d2e0c2b1dda412da5d85ec943abe8046c0ce5d0cd0a0f7fc42a

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.12-r1.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.12-r1.ebuild
deleted file mode 100644
index 1c6eec918ff3..000000000000
--- a/dev-python/pypy3_9/pypy3_9-7.3.12-r1.ebuild
+++ /dev/null
@@ -1,209 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit pax-utils python-utils-r1 toolchain-funcs
-
-PYPY_PV=${PV%_p*}
-PYVER=3.9
-MY_P="pypy${PYVER}-v${PYPY_PV/_}"
-PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_rc/rc}"
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language"
-HOMEPAGE="
-	https://www.pypy.org/
-	https://foss.heptapod.net/pypy/pypy/
-"
-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"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-# also check pypy/interpreter/pycode.py -> pypy_incremental_magic
-SLOT="0/pypy39-pp73-336"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="+ensurepip gdbm +jit ncurses sqlite tk"
-# many tests are failing upstream
-# see https://buildbot.pypy.org/summary?branch=py${PYVER}
-RESTRICT="test"
-
-RDEPEND="
-	|| (
-		>=dev-python/${PN}-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?]
-		>=dev-python/${PN}-exe-bin-${PYPY_PV}:${PYPY_PV}
-	)
-	dev-lang/python-exec[python_targets_pypy3(-)]
-	dev-libs/openssl:0=
-	dev-python/gentoo-common
-	ensurepip? ( dev-python/ensurepip-wheels )
-	gdbm? ( sys-libs/gdbm:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!<dev-python/pypy3-7.3.12_rc
-"
-DEPEND="
-	${RDEPEND}
-"
-
-src_prepare() {
-	local PATCHES=(
-		"${WORKDIR}/${PATCHSET}"
-	)
-	default
-
-	eapply_user
-}
-
-src_configure() {
-	tc-export CC
-}
-
-src_compile() {
-	mkdir bin || die
-	# switch to the layout expected for cffi module builds
-	mkdir include/pypy${PYVER} || die
-	# copy over to make sys.prefix happy
-	cp -p "${BROOT}"/usr/bin/pypy${PYVER}-c-${PYPY_PV} pypy${PYVER}-c || die
-	cp -p "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/* include/pypy${PYVER}/ || die
-	# (not installed by pypy-exe)
-	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
-	mv pypy/module/cpyext/include/* include/pypy${PYVER}/ || die
-	mv pypy/module/cpyext/parse/*.h include/pypy${PYVER}/ || die
-	pax-mark m pypy${PYVER}-c
-
-	# verify the subslot
-	local soabi=$(
-		./pypy${PYVER}-c - <<-EOF
-			import importlib.util
-			import sysconfig
-			soabi = sysconfig.get_config_var("SOABI")
-			magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff
-			print(f"{soabi}-{magic}")
-		EOF
-	)
-	[[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
-
-	# Add epython.py to the distribution
-	echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate sysconfig data
-	local host_gnu_type=$(sh pypy/tool/release/config.guess)
-	local overrides=(
-		HOST_GNU_TYPE "${host_gnu_type:-unknown}"
-		INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}"
-		LIBDIR "${EPREFIX}/usr/$(get_libdir)"
-		TZPATH "${EPREFIX}/usr/share/zoneinfo"
-		WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip"
-	)
-	./pypy${PYVER}-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die
-	local outdir
-	outdir=$(<pybuilddir.txt) || die
-	cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy${PYVER}-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
-		import lib2to3.pygram
-		import lib2to3.patcomp
-		lib2to3.patcomp.PatternCompiler()
-	EOF
-
-	# Generate cffi modules
-	# Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py!
-	# (NB: we build CFFI modules first to avoid error log when importing
-	# build_cffi_imports).
-	cffi_targets=(
-		pypy_util blake2/_blake2 sha3/_sha3 ssl
-		audioop syslog pwdgrp resource lzma posixshmem
-		testmultiphase
-	)
-	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${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
-	done
-
-	# Verify that CFFI module list is up-to-date
-	local expected_cksum=63d4659f
-	local local_cksum=$(
-		../pypy${PYVER}-c - <<-EOF
-			import binascii
-			import json
-			from pypy_tools.build_cffi_imports import cffi_build_scripts as x
-			print("%08x" % (binascii.crc32(json.dumps(x).encode()),))
-		EOF
-	)
-	if [[ ${local_cksum} != ${expected_cksum} ]]; then
-		die "Please verify cffi_targets and update checksum to ${local_cksum}"
-	fi
-
-	# Cleanup temporary objects
-	find -name "*_cffi.[co]" -delete || die
-	find -type d -empty -delete || die
-}
-
-src_install() {
-	einfo "Installing PyPy ..."
-	dodir /usr/bin
-	dosym pypy${PYVER}-c-${PYPY_PV} /usr/bin/pypy${PYVER}
-	insinto /usr/lib/pypy${PYVER}
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r lib-python/3/. lib_pypy/.
-	insinto /usr/include
-	doins -r include/pypy${PYVER}
-
-	# replace copied headers with symlinks
-	for x in "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/*; do
-		dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}"
-	done
-
-	dodoc README.rst
-
-	local dest=/usr/lib/pypy${PYVER}
-	rm -r "${ED}${dest}"/ensurepip/_bundled || die
-	if ! use ensurepip; then
-		rm -r "${ED}${dest}"/ensurepip || die
-	fi
-	if ! use gdbm; then
-		rm -r "${ED}${dest}"/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED}${dest}"/sqlite3 \
-			"${ED}${dest}"/_sqlite3* \
-			"${ED}${dest}"/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED}${dest}"/{idlelib,tkinter} \
-			"${ED}${dest}"/_tkinter \
-			"${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die
-	fi
-	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
-
-	local -x EPYTHON=pypy3
-	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
-	# temporarily copy to build tree to facilitate module builds
-	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
-
-	einfo "Byte-compiling Python standard library..."
-	python_optimize "${ED}${dest}"
-
-	# remove to avoid collisions
-	rm "${PYTHON}" || die
-}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2023-08-25  9:14 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2023-08-25  9:14 UTC (permalink / raw
  To: gentoo-commits

commit:     f1396259b5cd885cbc466fce94d7f5905b8f4653
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 25 09:10:37 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Aug 25 09:13:58 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1396259

dev-python/pypy3_9: Backports from CPython 3.9.18 to 7.3.12_p2

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

 dev-python/pypy3_9/Manifest                 |   1 +
 dev-python/pypy3_9/pypy3_9-7.3.12_p2.ebuild | 209 ++++++++++++++++++++++++++++
 2 files changed, 210 insertions(+)

diff --git a/dev-python/pypy3_9/Manifest b/dev-python/pypy3_9/Manifest
index 15dc112067aa..b957f98d668c 100644
--- a/dev-python/pypy3_9/Manifest
+++ b/dev-python/pypy3_9/Manifest
@@ -1,2 +1,3 @@
 DIST pypy3.9-gentoo-patches-7.3.12_p1.tar.xz 8552 BLAKE2B 99a7bcc52fcaaec1853162b4f65dc2688b2a90e6ede202a6e6a18ceb8ff16fd479781891305479a1c6a7f889cb9a3fb6f5f081d1318231f420cc98f10976b0aa SHA512 2047626612be66a617f073076f4d0b5821ba2d01e955c10df7c97caa53aae67f30fcf6088e3d532c97e805a0be223be2cab16a355970757557100080e5fc658d
+DIST pypy3.9-gentoo-patches-7.3.12_p2.tar.xz 14832 BLAKE2B e142221967f501dea771c8e02b7e57f704945b9c2a4fa7f84d2a702f911cc798ffafafc88bbe04ef89a71d218d28ad98b4cbee9fe822e81199d55c9891292967 SHA512 2e3a1a972775a89e9cf42d8177f607fe4aa4f245261dd9e3e8256697ddaf5271a2aa3d73bdb62e93de9c62fa4e6969d517e812507e865947fd1b649ec0f1d426
 DIST pypy3.9-v7.3.12-src.tar.bz2 23528145 BLAKE2B 28cc42b10d6a84c441af673e1a0dc6d19e09daa1da9249a7fec39a9aaccbe5010a3586068ae0b10cd402b72e5acc58998469d5c99019caa41399951c2a221e26 SHA512 8e819a1ec3f3ce7fc5f901fb554660288a57e2a4834a3da35c1a57faf88ef4129240628a58334d2e0c2b1dda412da5d85ec943abe8046c0ce5d0cd0a0f7fc42a

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.12_p2.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.12_p2.ebuild
new file mode 100644
index 000000000000..1c6eec918ff3
--- /dev/null
+++ b/dev-python/pypy3_9/pypy3_9-7.3.12_p2.ebuild
@@ -0,0 +1,209 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit pax-utils python-utils-r1 toolchain-funcs
+
+PYPY_PV=${PV%_p*}
+PYVER=3.9
+MY_P="pypy${PYVER}-v${PYPY_PV/_}"
+PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_rc/rc}"
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language"
+HOMEPAGE="
+	https://www.pypy.org/
+	https://foss.heptapod.net/pypy/pypy/
+"
+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"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+# also check pypy/interpreter/pycode.py -> pypy_incremental_magic
+SLOT="0/pypy39-pp73-336"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+ensurepip gdbm +jit ncurses sqlite tk"
+# many tests are failing upstream
+# see https://buildbot.pypy.org/summary?branch=py${PYVER}
+RESTRICT="test"
+
+RDEPEND="
+	|| (
+		>=dev-python/${PN}-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?]
+		>=dev-python/${PN}-exe-bin-${PYPY_PV}:${PYPY_PV}
+	)
+	dev-lang/python-exec[python_targets_pypy3(-)]
+	dev-libs/openssl:0=
+	dev-python/gentoo-common
+	ensurepip? ( dev-python/ensurepip-wheels )
+	gdbm? ( sys-libs/gdbm:0= )
+	sqlite? ( dev-db/sqlite:3= )
+	tk? (
+		dev-lang/tk:0=
+		dev-tcltk/tix:0=
+	)
+	!<dev-python/pypy3-7.3.12_rc
+"
+DEPEND="
+	${RDEPEND}
+"
+
+src_prepare() {
+	local PATCHES=(
+		"${WORKDIR}/${PATCHSET}"
+	)
+	default
+
+	eapply_user
+}
+
+src_configure() {
+	tc-export CC
+}
+
+src_compile() {
+	mkdir bin || die
+	# switch to the layout expected for cffi module builds
+	mkdir include/pypy${PYVER} || die
+	# copy over to make sys.prefix happy
+	cp -p "${BROOT}"/usr/bin/pypy${PYVER}-c-${PYPY_PV} pypy${PYVER}-c || die
+	cp -p "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/* include/pypy${PYVER}/ || die
+	# (not installed by pypy-exe)
+	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
+	mv pypy/module/cpyext/include/* include/pypy${PYVER}/ || die
+	mv pypy/module/cpyext/parse/*.h include/pypy${PYVER}/ || die
+	pax-mark m pypy${PYVER}-c
+
+	# verify the subslot
+	local soabi=$(
+		./pypy${PYVER}-c - <<-EOF
+			import importlib.util
+			import sysconfig
+			soabi = sysconfig.get_config_var("SOABI")
+			magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff
+			print(f"{soabi}-{magic}")
+		EOF
+	)
+	[[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
+
+	# Add epython.py to the distribution
+	echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die
+
+	einfo "Generating caches and CFFI modules ..."
+
+	# Generate sysconfig data
+	local host_gnu_type=$(sh pypy/tool/release/config.guess)
+	local overrides=(
+		HOST_GNU_TYPE "${host_gnu_type:-unknown}"
+		INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}"
+		LIBDIR "${EPREFIX}/usr/$(get_libdir)"
+		TZPATH "${EPREFIX}/usr/share/zoneinfo"
+		WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip"
+	)
+	./pypy${PYVER}-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die
+	local outdir
+	outdir=$(<pybuilddir.txt) || die
+	cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die
+
+	# Generate Grammar and PatternGrammar pickles.
+	./pypy${PYVER}-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
+		import lib2to3.pygram
+		import lib2to3.patcomp
+		lib2to3.patcomp.PatternCompiler()
+	EOF
+
+	# Generate cffi modules
+	# Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py!
+	# (NB: we build CFFI modules first to avoid error log when importing
+	# build_cffi_imports).
+	cffi_targets=(
+		pypy_util blake2/_blake2 sha3/_sha3 ssl
+		audioop syslog pwdgrp resource lzma posixshmem
+		testmultiphase
+	)
+	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${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
+	done
+
+	# Verify that CFFI module list is up-to-date
+	local expected_cksum=63d4659f
+	local local_cksum=$(
+		../pypy${PYVER}-c - <<-EOF
+			import binascii
+			import json
+			from pypy_tools.build_cffi_imports import cffi_build_scripts as x
+			print("%08x" % (binascii.crc32(json.dumps(x).encode()),))
+		EOF
+	)
+	if [[ ${local_cksum} != ${expected_cksum} ]]; then
+		die "Please verify cffi_targets and update checksum to ${local_cksum}"
+	fi
+
+	# Cleanup temporary objects
+	find -name "*_cffi.[co]" -delete || die
+	find -type d -empty -delete || die
+}
+
+src_install() {
+	einfo "Installing PyPy ..."
+	dodir /usr/bin
+	dosym pypy${PYVER}-c-${PYPY_PV} /usr/bin/pypy${PYVER}
+	insinto /usr/lib/pypy${PYVER}
+	# preserve mtimes to avoid obsoleting caches
+	insopts -p
+	doins -r lib-python/3/. lib_pypy/.
+	insinto /usr/include
+	doins -r include/pypy${PYVER}
+
+	# replace copied headers with symlinks
+	for x in "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/*; do
+		dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}"
+	done
+
+	dodoc README.rst
+
+	local dest=/usr/lib/pypy${PYVER}
+	rm -r "${ED}${dest}"/ensurepip/_bundled || die
+	if ! use ensurepip; then
+		rm -r "${ED}${dest}"/ensurepip || die
+	fi
+	if ! use gdbm; then
+		rm -r "${ED}${dest}"/_gdbm* || die
+	fi
+	if ! use sqlite; then
+		rm -r "${ED}${dest}"/sqlite3 \
+			"${ED}${dest}"/_sqlite3* \
+			"${ED}${dest}"/test/test_sqlite.py || die
+	fi
+	if ! use tk; then
+		rm -r "${ED}${dest}"/{idlelib,tkinter} \
+			"${ED}${dest}"/_tkinter \
+			"${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die
+	fi
+	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
+
+	local -x EPYTHON=pypy3
+	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
+	# temporarily copy to build tree to facilitate module builds
+	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
+
+	einfo "Byte-compiling Python standard library..."
+	python_optimize "${ED}${dest}"
+
+	# remove to avoid collisions
+	rm "${PYTHON}" || die
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2023-08-26 13:32 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2023-08-26 13:32 UTC (permalink / raw
  To: gentoo-commits

commit:     0c93009bb0c39e1d8299d3b36793d71c774c9663
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 26 13:27:41 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Aug 26 13:32:23 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c93009b

dev-python/pypy3_9: Remove old

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

 dev-python/pypy3_9/Manifest                 |   1 -
 dev-python/pypy3_9/pypy3_9-7.3.12_p1.ebuild | 209 ----------------------------
 2 files changed, 210 deletions(-)

diff --git a/dev-python/pypy3_9/Manifest b/dev-python/pypy3_9/Manifest
index b957f98d668c..7d957b38afeb 100644
--- a/dev-python/pypy3_9/Manifest
+++ b/dev-python/pypy3_9/Manifest
@@ -1,3 +1,2 @@
-DIST pypy3.9-gentoo-patches-7.3.12_p1.tar.xz 8552 BLAKE2B 99a7bcc52fcaaec1853162b4f65dc2688b2a90e6ede202a6e6a18ceb8ff16fd479781891305479a1c6a7f889cb9a3fb6f5f081d1318231f420cc98f10976b0aa SHA512 2047626612be66a617f073076f4d0b5821ba2d01e955c10df7c97caa53aae67f30fcf6088e3d532c97e805a0be223be2cab16a355970757557100080e5fc658d
 DIST pypy3.9-gentoo-patches-7.3.12_p2.tar.xz 14832 BLAKE2B e142221967f501dea771c8e02b7e57f704945b9c2a4fa7f84d2a702f911cc798ffafafc88bbe04ef89a71d218d28ad98b4cbee9fe822e81199d55c9891292967 SHA512 2e3a1a972775a89e9cf42d8177f607fe4aa4f245261dd9e3e8256697ddaf5271a2aa3d73bdb62e93de9c62fa4e6969d517e812507e865947fd1b649ec0f1d426
 DIST pypy3.9-v7.3.12-src.tar.bz2 23528145 BLAKE2B 28cc42b10d6a84c441af673e1a0dc6d19e09daa1da9249a7fec39a9aaccbe5010a3586068ae0b10cd402b72e5acc58998469d5c99019caa41399951c2a221e26 SHA512 8e819a1ec3f3ce7fc5f901fb554660288a57e2a4834a3da35c1a57faf88ef4129240628a58334d2e0c2b1dda412da5d85ec943abe8046c0ce5d0cd0a0f7fc42a

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.12_p1.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.12_p1.ebuild
deleted file mode 100644
index 1c6eec918ff3..000000000000
--- a/dev-python/pypy3_9/pypy3_9-7.3.12_p1.ebuild
+++ /dev/null
@@ -1,209 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit pax-utils python-utils-r1 toolchain-funcs
-
-PYPY_PV=${PV%_p*}
-PYVER=3.9
-MY_P="pypy${PYVER}-v${PYPY_PV/_}"
-PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_rc/rc}"
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language"
-HOMEPAGE="
-	https://www.pypy.org/
-	https://foss.heptapod.net/pypy/pypy/
-"
-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"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-# also check pypy/interpreter/pycode.py -> pypy_incremental_magic
-SLOT="0/pypy39-pp73-336"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="+ensurepip gdbm +jit ncurses sqlite tk"
-# many tests are failing upstream
-# see https://buildbot.pypy.org/summary?branch=py${PYVER}
-RESTRICT="test"
-
-RDEPEND="
-	|| (
-		>=dev-python/${PN}-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?]
-		>=dev-python/${PN}-exe-bin-${PYPY_PV}:${PYPY_PV}
-	)
-	dev-lang/python-exec[python_targets_pypy3(-)]
-	dev-libs/openssl:0=
-	dev-python/gentoo-common
-	ensurepip? ( dev-python/ensurepip-wheels )
-	gdbm? ( sys-libs/gdbm:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!<dev-python/pypy3-7.3.12_rc
-"
-DEPEND="
-	${RDEPEND}
-"
-
-src_prepare() {
-	local PATCHES=(
-		"${WORKDIR}/${PATCHSET}"
-	)
-	default
-
-	eapply_user
-}
-
-src_configure() {
-	tc-export CC
-}
-
-src_compile() {
-	mkdir bin || die
-	# switch to the layout expected for cffi module builds
-	mkdir include/pypy${PYVER} || die
-	# copy over to make sys.prefix happy
-	cp -p "${BROOT}"/usr/bin/pypy${PYVER}-c-${PYPY_PV} pypy${PYVER}-c || die
-	cp -p "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/* include/pypy${PYVER}/ || die
-	# (not installed by pypy-exe)
-	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
-	mv pypy/module/cpyext/include/* include/pypy${PYVER}/ || die
-	mv pypy/module/cpyext/parse/*.h include/pypy${PYVER}/ || die
-	pax-mark m pypy${PYVER}-c
-
-	# verify the subslot
-	local soabi=$(
-		./pypy${PYVER}-c - <<-EOF
-			import importlib.util
-			import sysconfig
-			soabi = sysconfig.get_config_var("SOABI")
-			magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff
-			print(f"{soabi}-{magic}")
-		EOF
-	)
-	[[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
-
-	# Add epython.py to the distribution
-	echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate sysconfig data
-	local host_gnu_type=$(sh pypy/tool/release/config.guess)
-	local overrides=(
-		HOST_GNU_TYPE "${host_gnu_type:-unknown}"
-		INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}"
-		LIBDIR "${EPREFIX}/usr/$(get_libdir)"
-		TZPATH "${EPREFIX}/usr/share/zoneinfo"
-		WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip"
-	)
-	./pypy${PYVER}-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die
-	local outdir
-	outdir=$(<pybuilddir.txt) || die
-	cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy${PYVER}-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
-		import lib2to3.pygram
-		import lib2to3.patcomp
-		lib2to3.patcomp.PatternCompiler()
-	EOF
-
-	# Generate cffi modules
-	# Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py!
-	# (NB: we build CFFI modules first to avoid error log when importing
-	# build_cffi_imports).
-	cffi_targets=(
-		pypy_util blake2/_blake2 sha3/_sha3 ssl
-		audioop syslog pwdgrp resource lzma posixshmem
-		testmultiphase
-	)
-	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${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
-	done
-
-	# Verify that CFFI module list is up-to-date
-	local expected_cksum=63d4659f
-	local local_cksum=$(
-		../pypy${PYVER}-c - <<-EOF
-			import binascii
-			import json
-			from pypy_tools.build_cffi_imports import cffi_build_scripts as x
-			print("%08x" % (binascii.crc32(json.dumps(x).encode()),))
-		EOF
-	)
-	if [[ ${local_cksum} != ${expected_cksum} ]]; then
-		die "Please verify cffi_targets and update checksum to ${local_cksum}"
-	fi
-
-	# Cleanup temporary objects
-	find -name "*_cffi.[co]" -delete || die
-	find -type d -empty -delete || die
-}
-
-src_install() {
-	einfo "Installing PyPy ..."
-	dodir /usr/bin
-	dosym pypy${PYVER}-c-${PYPY_PV} /usr/bin/pypy${PYVER}
-	insinto /usr/lib/pypy${PYVER}
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r lib-python/3/. lib_pypy/.
-	insinto /usr/include
-	doins -r include/pypy${PYVER}
-
-	# replace copied headers with symlinks
-	for x in "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/*; do
-		dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}"
-	done
-
-	dodoc README.rst
-
-	local dest=/usr/lib/pypy${PYVER}
-	rm -r "${ED}${dest}"/ensurepip/_bundled || die
-	if ! use ensurepip; then
-		rm -r "${ED}${dest}"/ensurepip || die
-	fi
-	if ! use gdbm; then
-		rm -r "${ED}${dest}"/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED}${dest}"/sqlite3 \
-			"${ED}${dest}"/_sqlite3* \
-			"${ED}${dest}"/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED}${dest}"/{idlelib,tkinter} \
-			"${ED}${dest}"/_tkinter \
-			"${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die
-	fi
-	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
-
-	local -x EPYTHON=pypy3
-	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
-	# temporarily copy to build tree to facilitate module builds
-	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
-
-	einfo "Byte-compiling Python standard library..."
-	python_optimize "${ED}${dest}"
-
-	# remove to avoid collisions
-	rm "${PYTHON}" || die
-}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2023-09-30  8:27 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2023-09-30  8:27 UTC (permalink / raw
  To: gentoo-commits

commit:     0246c0f5d2890a7675d9e50254a2503aae9336af
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 30 03:53:42 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Sep 30 08:27:38 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0246c0f5

dev-python/pypy3_9: Bump to 7.3.13

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

 dev-python/pypy3_9/Manifest              |   2 +
 dev-python/pypy3_9/pypy3_9-7.3.13.ebuild | 209 +++++++++++++++++++++++++++++++
 2 files changed, 211 insertions(+)

diff --git a/dev-python/pypy3_9/Manifest b/dev-python/pypy3_9/Manifest
index 7d957b38afeb..2703fd7cce07 100644
--- a/dev-python/pypy3_9/Manifest
+++ b/dev-python/pypy3_9/Manifest
@@ -1,2 +1,4 @@
 DIST pypy3.9-gentoo-patches-7.3.12_p2.tar.xz 14832 BLAKE2B e142221967f501dea771c8e02b7e57f704945b9c2a4fa7f84d2a702f911cc798ffafafc88bbe04ef89a71d218d28ad98b4cbee9fe822e81199d55c9891292967 SHA512 2e3a1a972775a89e9cf42d8177f607fe4aa4f245261dd9e3e8256697ddaf5271a2aa3d73bdb62e93de9c62fa4e6969d517e812507e865947fd1b649ec0f1d426
+DIST pypy3.9-gentoo-patches-7.3.13.tar.xz 7476 BLAKE2B 70f80c489686e92e933a200d2e92a095a80e2300814ec4e1f3cb31ec5f5500a45667f7bfe9570ea5eef3933fdda33a9930bdf2cf683c28e3ddb610bebeeca6dd SHA512 5170f5141beb93b3b37cc94f85324c88182967eaff2f8ca26b81d63d5b0d20414a139ca44c250c07b46c747e27c97fd0fe5a2365f6636aba2dd28df3bc55cdca
 DIST pypy3.9-v7.3.12-src.tar.bz2 23528145 BLAKE2B 28cc42b10d6a84c441af673e1a0dc6d19e09daa1da9249a7fec39a9aaccbe5010a3586068ae0b10cd402b72e5acc58998469d5c99019caa41399951c2a221e26 SHA512 8e819a1ec3f3ce7fc5f901fb554660288a57e2a4834a3da35c1a57faf88ef4129240628a58334d2e0c2b1dda412da5d85ec943abe8046c0ce5d0cd0a0f7fc42a
+DIST pypy3.9-v7.3.13-src.tar.bz2 23452374 BLAKE2B b5ce8dd78e4851b5c7fa6aa0c6f2f5c198a3b2d1e4691ccb20d1b229397d60ac41eaecef37f7c76e4de837876bdd6c1e4276302afc292080e0a38f1a58869580 SHA512 04b184050625f06d2acaa836a786db788c4f658f3384ebde176d0acc95044ee83dbf7193ebab1e4fd6275bed7a590d3945482294be32d8f94e8c541e053dce59

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.13.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.13.ebuild
new file mode 100644
index 000000000000..1c6eec918ff3
--- /dev/null
+++ b/dev-python/pypy3_9/pypy3_9-7.3.13.ebuild
@@ -0,0 +1,209 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit pax-utils python-utils-r1 toolchain-funcs
+
+PYPY_PV=${PV%_p*}
+PYVER=3.9
+MY_P="pypy${PYVER}-v${PYPY_PV/_}"
+PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_rc/rc}"
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language"
+HOMEPAGE="
+	https://www.pypy.org/
+	https://foss.heptapod.net/pypy/pypy/
+"
+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"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+# also check pypy/interpreter/pycode.py -> pypy_incremental_magic
+SLOT="0/pypy39-pp73-336"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+ensurepip gdbm +jit ncurses sqlite tk"
+# many tests are failing upstream
+# see https://buildbot.pypy.org/summary?branch=py${PYVER}
+RESTRICT="test"
+
+RDEPEND="
+	|| (
+		>=dev-python/${PN}-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?]
+		>=dev-python/${PN}-exe-bin-${PYPY_PV}:${PYPY_PV}
+	)
+	dev-lang/python-exec[python_targets_pypy3(-)]
+	dev-libs/openssl:0=
+	dev-python/gentoo-common
+	ensurepip? ( dev-python/ensurepip-wheels )
+	gdbm? ( sys-libs/gdbm:0= )
+	sqlite? ( dev-db/sqlite:3= )
+	tk? (
+		dev-lang/tk:0=
+		dev-tcltk/tix:0=
+	)
+	!<dev-python/pypy3-7.3.12_rc
+"
+DEPEND="
+	${RDEPEND}
+"
+
+src_prepare() {
+	local PATCHES=(
+		"${WORKDIR}/${PATCHSET}"
+	)
+	default
+
+	eapply_user
+}
+
+src_configure() {
+	tc-export CC
+}
+
+src_compile() {
+	mkdir bin || die
+	# switch to the layout expected for cffi module builds
+	mkdir include/pypy${PYVER} || die
+	# copy over to make sys.prefix happy
+	cp -p "${BROOT}"/usr/bin/pypy${PYVER}-c-${PYPY_PV} pypy${PYVER}-c || die
+	cp -p "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/* include/pypy${PYVER}/ || die
+	# (not installed by pypy-exe)
+	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
+	mv pypy/module/cpyext/include/* include/pypy${PYVER}/ || die
+	mv pypy/module/cpyext/parse/*.h include/pypy${PYVER}/ || die
+	pax-mark m pypy${PYVER}-c
+
+	# verify the subslot
+	local soabi=$(
+		./pypy${PYVER}-c - <<-EOF
+			import importlib.util
+			import sysconfig
+			soabi = sysconfig.get_config_var("SOABI")
+			magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff
+			print(f"{soabi}-{magic}")
+		EOF
+	)
+	[[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
+
+	# Add epython.py to the distribution
+	echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die
+
+	einfo "Generating caches and CFFI modules ..."
+
+	# Generate sysconfig data
+	local host_gnu_type=$(sh pypy/tool/release/config.guess)
+	local overrides=(
+		HOST_GNU_TYPE "${host_gnu_type:-unknown}"
+		INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}"
+		LIBDIR "${EPREFIX}/usr/$(get_libdir)"
+		TZPATH "${EPREFIX}/usr/share/zoneinfo"
+		WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip"
+	)
+	./pypy${PYVER}-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die
+	local outdir
+	outdir=$(<pybuilddir.txt) || die
+	cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die
+
+	# Generate Grammar and PatternGrammar pickles.
+	./pypy${PYVER}-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
+		import lib2to3.pygram
+		import lib2to3.patcomp
+		lib2to3.patcomp.PatternCompiler()
+	EOF
+
+	# Generate cffi modules
+	# Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py!
+	# (NB: we build CFFI modules first to avoid error log when importing
+	# build_cffi_imports).
+	cffi_targets=(
+		pypy_util blake2/_blake2 sha3/_sha3 ssl
+		audioop syslog pwdgrp resource lzma posixshmem
+		testmultiphase
+	)
+	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${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
+	done
+
+	# Verify that CFFI module list is up-to-date
+	local expected_cksum=63d4659f
+	local local_cksum=$(
+		../pypy${PYVER}-c - <<-EOF
+			import binascii
+			import json
+			from pypy_tools.build_cffi_imports import cffi_build_scripts as x
+			print("%08x" % (binascii.crc32(json.dumps(x).encode()),))
+		EOF
+	)
+	if [[ ${local_cksum} != ${expected_cksum} ]]; then
+		die "Please verify cffi_targets and update checksum to ${local_cksum}"
+	fi
+
+	# Cleanup temporary objects
+	find -name "*_cffi.[co]" -delete || die
+	find -type d -empty -delete || die
+}
+
+src_install() {
+	einfo "Installing PyPy ..."
+	dodir /usr/bin
+	dosym pypy${PYVER}-c-${PYPY_PV} /usr/bin/pypy${PYVER}
+	insinto /usr/lib/pypy${PYVER}
+	# preserve mtimes to avoid obsoleting caches
+	insopts -p
+	doins -r lib-python/3/. lib_pypy/.
+	insinto /usr/include
+	doins -r include/pypy${PYVER}
+
+	# replace copied headers with symlinks
+	for x in "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/*; do
+		dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}"
+	done
+
+	dodoc README.rst
+
+	local dest=/usr/lib/pypy${PYVER}
+	rm -r "${ED}${dest}"/ensurepip/_bundled || die
+	if ! use ensurepip; then
+		rm -r "${ED}${dest}"/ensurepip || die
+	fi
+	if ! use gdbm; then
+		rm -r "${ED}${dest}"/_gdbm* || die
+	fi
+	if ! use sqlite; then
+		rm -r "${ED}${dest}"/sqlite3 \
+			"${ED}${dest}"/_sqlite3* \
+			"${ED}${dest}"/test/test_sqlite.py || die
+	fi
+	if ! use tk; then
+		rm -r "${ED}${dest}"/{idlelib,tkinter} \
+			"${ED}${dest}"/_tkinter \
+			"${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die
+	fi
+	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
+
+	local -x EPYTHON=pypy3
+	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
+	# temporarily copy to build tree to facilitate module builds
+	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
+
+	einfo "Byte-compiling Python standard library..."
+	python_optimize "${ED}${dest}"
+
+	# remove to avoid collisions
+	rm "${PYTHON}" || die
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2023-10-06 15:08 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2023-10-06 15:08 UTC (permalink / raw
  To: gentoo-commits

commit:     8a7fc78888fa6f5069e844b6c52753d7f55fbfd1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Oct  6 14:50:42 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Oct  6 15:07:30 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a7fc788

dev-python/pypy3_9: Fix missing test extensions

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

 .../pypy3_9/{pypy3_9-7.3.13.ebuild => pypy3_9-7.3.13-r1.ebuild}     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.13.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild
similarity index 97%
rename from dev-python/pypy3_9/pypy3_9-7.3.13.ebuild
rename to dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild
index 1c6eec918ff3..b75fb0c938f5 100644
--- a/dev-python/pypy3_9/pypy3_9-7.3.13.ebuild
+++ b/dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild
@@ -123,7 +123,7 @@ src_compile() {
 	cffi_targets=(
 		pypy_util blake2/_blake2 sha3/_sha3 ssl
 		audioop syslog pwdgrp resource lzma posixshmem
-		testmultiphase
+		ctypes_test testmultiphase
 	)
 	use gdbm && cffi_targets+=( gdbm )
 	use ncurses && cffi_targets+=( curses )
@@ -138,6 +138,8 @@ src_compile() {
 		# tkinter doesn't work via -m
 		../pypy${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
 	done
+	# testcapi does not have a "build" script
+	../pypy${PYVER}-c -c "import _testcapi" || die
 
 	# Verify that CFFI module list is up-to-date
 	local expected_cksum=63d4659f
@@ -154,7 +156,7 @@ src_compile() {
 	fi
 
 	# Cleanup temporary objects
-	find -name "*_cffi.[co]" -delete || die
+	find \( -name "*_cffi.c" -o -name '*.o' \) -delete || die
 	find -type d -empty -delete || die
 }
 


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2023-11-02 12:58 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2023-11-02 12:58 UTC (permalink / raw
  To: gentoo-commits

commit:     82d89b4972db3531ea4fe1df8812bcd7cec5d7e8
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Nov  2 12:53:10 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Nov  2 12:58:11 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82d89b49

dev-python/pypy3_9: Remove old

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

 dev-python/pypy3_9/Manifest                 |   2 -
 dev-python/pypy3_9/pypy3_9-7.3.12_p2.ebuild | 209 ----------------------------
 2 files changed, 211 deletions(-)

diff --git a/dev-python/pypy3_9/Manifest b/dev-python/pypy3_9/Manifest
index 2703fd7cce07..ef3b3502ebdf 100644
--- a/dev-python/pypy3_9/Manifest
+++ b/dev-python/pypy3_9/Manifest
@@ -1,4 +1,2 @@
-DIST pypy3.9-gentoo-patches-7.3.12_p2.tar.xz 14832 BLAKE2B e142221967f501dea771c8e02b7e57f704945b9c2a4fa7f84d2a702f911cc798ffafafc88bbe04ef89a71d218d28ad98b4cbee9fe822e81199d55c9891292967 SHA512 2e3a1a972775a89e9cf42d8177f607fe4aa4f245261dd9e3e8256697ddaf5271a2aa3d73bdb62e93de9c62fa4e6969d517e812507e865947fd1b649ec0f1d426
 DIST pypy3.9-gentoo-patches-7.3.13.tar.xz 7476 BLAKE2B 70f80c489686e92e933a200d2e92a095a80e2300814ec4e1f3cb31ec5f5500a45667f7bfe9570ea5eef3933fdda33a9930bdf2cf683c28e3ddb610bebeeca6dd SHA512 5170f5141beb93b3b37cc94f85324c88182967eaff2f8ca26b81d63d5b0d20414a139ca44c250c07b46c747e27c97fd0fe5a2365f6636aba2dd28df3bc55cdca
-DIST pypy3.9-v7.3.12-src.tar.bz2 23528145 BLAKE2B 28cc42b10d6a84c441af673e1a0dc6d19e09daa1da9249a7fec39a9aaccbe5010a3586068ae0b10cd402b72e5acc58998469d5c99019caa41399951c2a221e26 SHA512 8e819a1ec3f3ce7fc5f901fb554660288a57e2a4834a3da35c1a57faf88ef4129240628a58334d2e0c2b1dda412da5d85ec943abe8046c0ce5d0cd0a0f7fc42a
 DIST pypy3.9-v7.3.13-src.tar.bz2 23452374 BLAKE2B b5ce8dd78e4851b5c7fa6aa0c6f2f5c198a3b2d1e4691ccb20d1b229397d60ac41eaecef37f7c76e4de837876bdd6c1e4276302afc292080e0a38f1a58869580 SHA512 04b184050625f06d2acaa836a786db788c4f658f3384ebde176d0acc95044ee83dbf7193ebab1e4fd6275bed7a590d3945482294be32d8f94e8c541e053dce59

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.12_p2.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.12_p2.ebuild
deleted file mode 100644
index 1c6eec918ff3..000000000000
--- a/dev-python/pypy3_9/pypy3_9-7.3.12_p2.ebuild
+++ /dev/null
@@ -1,209 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit pax-utils python-utils-r1 toolchain-funcs
-
-PYPY_PV=${PV%_p*}
-PYVER=3.9
-MY_P="pypy${PYVER}-v${PYPY_PV/_}"
-PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_rc/rc}"
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language"
-HOMEPAGE="
-	https://www.pypy.org/
-	https://foss.heptapod.net/pypy/pypy/
-"
-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"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-# also check pypy/interpreter/pycode.py -> pypy_incremental_magic
-SLOT="0/pypy39-pp73-336"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="+ensurepip gdbm +jit ncurses sqlite tk"
-# many tests are failing upstream
-# see https://buildbot.pypy.org/summary?branch=py${PYVER}
-RESTRICT="test"
-
-RDEPEND="
-	|| (
-		>=dev-python/${PN}-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?]
-		>=dev-python/${PN}-exe-bin-${PYPY_PV}:${PYPY_PV}
-	)
-	dev-lang/python-exec[python_targets_pypy3(-)]
-	dev-libs/openssl:0=
-	dev-python/gentoo-common
-	ensurepip? ( dev-python/ensurepip-wheels )
-	gdbm? ( sys-libs/gdbm:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!<dev-python/pypy3-7.3.12_rc
-"
-DEPEND="
-	${RDEPEND}
-"
-
-src_prepare() {
-	local PATCHES=(
-		"${WORKDIR}/${PATCHSET}"
-	)
-	default
-
-	eapply_user
-}
-
-src_configure() {
-	tc-export CC
-}
-
-src_compile() {
-	mkdir bin || die
-	# switch to the layout expected for cffi module builds
-	mkdir include/pypy${PYVER} || die
-	# copy over to make sys.prefix happy
-	cp -p "${BROOT}"/usr/bin/pypy${PYVER}-c-${PYPY_PV} pypy${PYVER}-c || die
-	cp -p "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/* include/pypy${PYVER}/ || die
-	# (not installed by pypy-exe)
-	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
-	mv pypy/module/cpyext/include/* include/pypy${PYVER}/ || die
-	mv pypy/module/cpyext/parse/*.h include/pypy${PYVER}/ || die
-	pax-mark m pypy${PYVER}-c
-
-	# verify the subslot
-	local soabi=$(
-		./pypy${PYVER}-c - <<-EOF
-			import importlib.util
-			import sysconfig
-			soabi = sysconfig.get_config_var("SOABI")
-			magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff
-			print(f"{soabi}-{magic}")
-		EOF
-	)
-	[[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
-
-	# Add epython.py to the distribution
-	echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate sysconfig data
-	local host_gnu_type=$(sh pypy/tool/release/config.guess)
-	local overrides=(
-		HOST_GNU_TYPE "${host_gnu_type:-unknown}"
-		INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}"
-		LIBDIR "${EPREFIX}/usr/$(get_libdir)"
-		TZPATH "${EPREFIX}/usr/share/zoneinfo"
-		WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip"
-	)
-	./pypy${PYVER}-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die
-	local outdir
-	outdir=$(<pybuilddir.txt) || die
-	cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy${PYVER}-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
-		import lib2to3.pygram
-		import lib2to3.patcomp
-		lib2to3.patcomp.PatternCompiler()
-	EOF
-
-	# Generate cffi modules
-	# Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py!
-	# (NB: we build CFFI modules first to avoid error log when importing
-	# build_cffi_imports).
-	cffi_targets=(
-		pypy_util blake2/_blake2 sha3/_sha3 ssl
-		audioop syslog pwdgrp resource lzma posixshmem
-		testmultiphase
-	)
-	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${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
-	done
-
-	# Verify that CFFI module list is up-to-date
-	local expected_cksum=63d4659f
-	local local_cksum=$(
-		../pypy${PYVER}-c - <<-EOF
-			import binascii
-			import json
-			from pypy_tools.build_cffi_imports import cffi_build_scripts as x
-			print("%08x" % (binascii.crc32(json.dumps(x).encode()),))
-		EOF
-	)
-	if [[ ${local_cksum} != ${expected_cksum} ]]; then
-		die "Please verify cffi_targets and update checksum to ${local_cksum}"
-	fi
-
-	# Cleanup temporary objects
-	find -name "*_cffi.[co]" -delete || die
-	find -type d -empty -delete || die
-}
-
-src_install() {
-	einfo "Installing PyPy ..."
-	dodir /usr/bin
-	dosym pypy${PYVER}-c-${PYPY_PV} /usr/bin/pypy${PYVER}
-	insinto /usr/lib/pypy${PYVER}
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r lib-python/3/. lib_pypy/.
-	insinto /usr/include
-	doins -r include/pypy${PYVER}
-
-	# replace copied headers with symlinks
-	for x in "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/*; do
-		dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}"
-	done
-
-	dodoc README.rst
-
-	local dest=/usr/lib/pypy${PYVER}
-	rm -r "${ED}${dest}"/ensurepip/_bundled || die
-	if ! use ensurepip; then
-		rm -r "${ED}${dest}"/ensurepip || die
-	fi
-	if ! use gdbm; then
-		rm -r "${ED}${dest}"/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED}${dest}"/sqlite3 \
-			"${ED}${dest}"/_sqlite3* \
-			"${ED}${dest}"/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED}${dest}"/{idlelib,tkinter} \
-			"${ED}${dest}"/_tkinter \
-			"${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die
-	fi
-	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
-
-	local -x EPYTHON=pypy3
-	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
-	# temporarily copy to build tree to facilitate module builds
-	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
-
-	einfo "Byte-compiling Python standard library..."
-	python_optimize "${ED}${dest}"
-
-	# remove to avoid collisions
-	rm "${PYTHON}" || die
-}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2023-12-18 15:59 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2023-12-18 15:59 UTC (permalink / raw
  To: gentoo-commits

commit:     022c8c77160c70887b66c76a835b356111202ce0
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 18 15:55:25 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Dec 18 15:59:10 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=022c8c77

dev-python/pypy3_9: Inline compileall call, add excludes

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

 dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild
index b75fb0c938f5..661ab0988ec8 100644
--- a/dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild
+++ b/dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit pax-utils python-utils-r1 toolchain-funcs
+inherit multiprocessing pax-utils toolchain-funcs
 
 PYPY_PV=${PV%_p*}
 PYVER=3.9
@@ -198,13 +198,15 @@ src_install() {
 	fi
 	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
 
-	local -x EPYTHON=pypy3
 	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
 	# temporarily copy to build tree to facilitate module builds
 	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
 
 	einfo "Byte-compiling Python standard library..."
-	python_optimize "${ED}${dest}"
+	# exclude list from CPython Makefile.pre.in
+	"${PYTHON}" -m compileall -j "$(makeopts_jobs)" -o 0 -o 1 -o 2 \
+		--hardlink-dupes -q -f -d "${dest}" "${ED}${dest}" \
+		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' || die
 
 	# remove to avoid collisions
 	rm "${PYTHON}" || die


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2023-12-20 16:55 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2023-12-20 16:55 UTC (permalink / raw
  To: gentoo-commits

commit:     3ab1e36629fe2d62c47f5b6bf5933767cffdfdb6
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 20 16:51:46 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Dec 20 16:55:42 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ab1e366

dev-python/pypy3_9: Remove duplicate eapply_user

Thanks to arkamar for noticing.

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

 dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild | 2 --
 1 file changed, 2 deletions(-)

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild
index 661ab0988ec8..4cf1093bca1d 100644
--- a/dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild
+++ b/dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild
@@ -57,8 +57,6 @@ src_prepare() {
 		"${WORKDIR}/${PATCHSET}"
 	)
 	default
-
-	eapply_user
 }
 
 src_configure() {


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2023-12-21  4:16 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2023-12-21  4:16 UTC (permalink / raw
  To: gentoo-commits

commit:     6c1904c6b07950e29ad308eb6bbe4175368440e8
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Mon Dec 18 19:32:07 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Dec 21 03:27:23 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c1904c6

dev-python/pypy3_9: fixup compileall call excludes

There's a bunch of testdata that isn't supposed to be compiled. The
CPython build system automatically excludes it, but PyPy doesn't have a
build system so we must do it manually.

The original implementation passes the excludes args after the operand,
which is unreliable across PyPy versions. For consistency, specify them
before.

Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild
index 4cf1093bca1d..0c66221371e4 100644
--- a/dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild
+++ b/dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild
@@ -203,8 +203,8 @@ src_install() {
 	einfo "Byte-compiling Python standard library..."
 	# exclude list from CPython Makefile.pre.in
 	"${PYTHON}" -m compileall -j "$(makeopts_jobs)" -o 0 -o 1 -o 2 \
-		--hardlink-dupes -q -f -d "${dest}" "${ED}${dest}" \
-		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' || die
+		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+		--hardlink-dupes -q -f -d "${dest}" "${ED}${dest}" || die
 
 	# remove to avoid collisions
 	rm "${PYTHON}" || die


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2023-12-25 20:26 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2023-12-25 20:26 UTC (permalink / raw
  To: gentoo-commits

commit:     4e45232f88d04785e237282aae20304c504c4d59
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 25 16:00:46 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Dec 25 20:26:30 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e45232f

dev-python/pypy3_9: Bump to 7.3.14

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

 dev-python/pypy3_9/Manifest              |   2 +
 dev-python/pypy3_9/pypy3_9-7.3.14.ebuild | 211 +++++++++++++++++++++++++++++++
 2 files changed, 213 insertions(+)

diff --git a/dev-python/pypy3_9/Manifest b/dev-python/pypy3_9/Manifest
index ef3b3502ebdf..398f5084298e 100644
--- a/dev-python/pypy3_9/Manifest
+++ b/dev-python/pypy3_9/Manifest
@@ -1,2 +1,4 @@
 DIST pypy3.9-gentoo-patches-7.3.13.tar.xz 7476 BLAKE2B 70f80c489686e92e933a200d2e92a095a80e2300814ec4e1f3cb31ec5f5500a45667f7bfe9570ea5eef3933fdda33a9930bdf2cf683c28e3ddb610bebeeca6dd SHA512 5170f5141beb93b3b37cc94f85324c88182967eaff2f8ca26b81d63d5b0d20414a139ca44c250c07b46c747e27c97fd0fe5a2365f6636aba2dd28df3bc55cdca
+DIST pypy3.9-gentoo-patches-7.3.14.tar.xz 5808 BLAKE2B 92ab7e9129838ff22cc13a64fe1ffe9ffd3af45ec777bde531ce2e15b87681e17fca2f1dc037ee4798bca5a9312ca4c961ec97b0a53bf5e6dc36fd12241151c9 SHA512 dffd17558d5ec2625682e5476ea53a9fe273f553b94d2589628e23ac3b45c50b5bf3ba9c7d92935e477374d9220af6ed310abae1270175f091a8c5a267a4bacd
 DIST pypy3.9-v7.3.13-src.tar.bz2 23452374 BLAKE2B b5ce8dd78e4851b5c7fa6aa0c6f2f5c198a3b2d1e4691ccb20d1b229397d60ac41eaecef37f7c76e4de837876bdd6c1e4276302afc292080e0a38f1a58869580 SHA512 04b184050625f06d2acaa836a786db788c4f658f3384ebde176d0acc95044ee83dbf7193ebab1e4fd6275bed7a590d3945482294be32d8f94e8c541e053dce59
+DIST pypy3.9-v7.3.14-src.tar.bz2 24683302 BLAKE2B 318fe17b423ce9c5b374cbceacf480ddbad7862bd6507d74289bbc0bd8ba8cf350ad21297b1e2dab7dfe6e7f542d929259be8d57867420b8a9a59284532aa9e2 SHA512 77db85092ca8ce419e30b274ec001566bbd275d88e74e5a3a3d0d557b18beb5a1e98428487f338e46f64893e54bf426464d372056c37a87a2b42b36c7d0fb536

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.14.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.14.ebuild
new file mode 100644
index 000000000000..6a263ec2fbb4
--- /dev/null
+++ b/dev-python/pypy3_9/pypy3_9-7.3.14.ebuild
@@ -0,0 +1,211 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multiprocessing pax-utils toolchain-funcs
+
+PYPY_PV=${PV%_p*}
+PYVER=3.9
+MY_P="pypy${PYVER}-v${PYPY_PV/_}"
+PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_rc/rc}"
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language"
+HOMEPAGE="
+	https://www.pypy.org/
+	https://foss.heptapod.net/pypy/pypy/
+"
+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"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+# also check pypy/interpreter/pycode.py -> pypy_incremental_magic
+SLOT="0/pypy39-pp73-336"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+ensurepip gdbm +jit ncurses sqlite tk"
+# many tests are failing upstream
+# see https://buildbot.pypy.org/summary?branch=py${PYVER}
+RESTRICT="test"
+
+RDEPEND="
+	|| (
+		>=dev-python/${PN}-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?]
+		>=dev-python/${PN}-exe-bin-${PYPY_PV}:${PYPY_PV}
+	)
+	dev-lang/python-exec[python_targets_pypy3(-)]
+	dev-libs/openssl:0=
+	dev-python/gentoo-common
+	ensurepip? ( dev-python/ensurepip-wheels )
+	gdbm? ( sys-libs/gdbm:0= )
+	sqlite? ( dev-db/sqlite:3= )
+	tk? (
+		dev-lang/tk:0=
+		dev-tcltk/tix:0=
+	)
+	!<dev-python/pypy3-7.3.12_rc
+"
+DEPEND="
+	${RDEPEND}
+"
+
+src_prepare() {
+	local PATCHES=(
+		"${WORKDIR}/${PATCHSET}"
+	)
+	default
+}
+
+src_configure() {
+	tc-export CC
+}
+
+src_compile() {
+	mkdir bin || die
+	# switch to the layout expected for cffi module builds
+	mkdir include/pypy${PYVER} || die
+	# copy over to make sys.prefix happy
+	cp -p "${BROOT}"/usr/bin/pypy${PYVER}-c-${PYPY_PV} pypy${PYVER}-c || die
+	cp -p "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/* include/pypy${PYVER}/ || die
+	# (not installed by pypy-exe)
+	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
+	mv pypy/module/cpyext/include/* include/pypy${PYVER}/ || die
+	mv pypy/module/cpyext/parse/*.h include/pypy${PYVER}/ || die
+	pax-mark m pypy${PYVER}-c
+
+	# verify the subslot
+	local soabi=$(
+		./pypy${PYVER}-c - <<-EOF
+			import importlib.util
+			import sysconfig
+			soabi = sysconfig.get_config_var("SOABI")
+			magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff
+			print(f"{soabi}-{magic}")
+		EOF
+	)
+	[[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
+
+	# Add epython.py to the distribution
+	echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die
+
+	einfo "Generating caches and CFFI modules ..."
+
+	# Generate sysconfig data
+	local host_gnu_type=$(sh pypy/tool/release/config.guess)
+	local overrides=(
+		HOST_GNU_TYPE "${host_gnu_type:-unknown}"
+		INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}"
+		LIBDIR "${EPREFIX}/usr/$(get_libdir)"
+		TZPATH "${EPREFIX}/usr/share/zoneinfo"
+		WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip"
+	)
+	./pypy${PYVER}-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die
+	local outdir
+	outdir=$(<pybuilddir.txt) || die
+	cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die
+
+	# Generate Grammar and PatternGrammar pickles.
+	./pypy${PYVER}-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
+		import lib2to3.pygram
+		import lib2to3.patcomp
+		lib2to3.patcomp.PatternCompiler()
+	EOF
+
+	# Generate cffi modules
+	# Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py!
+	# (NB: we build CFFI modules first to avoid error log when importing
+	# build_cffi_imports).
+	cffi_targets=(
+		pypy_util blake2/_blake2 sha3/_sha3 ssl
+		audioop syslog pwdgrp resource lzma posixshmem
+		ctypes_test testmultiphase
+	)
+	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${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
+	done
+	# testcapi does not have a "build" script
+	../pypy${PYVER}-c -c "import _testcapi" || die
+
+	# Verify that CFFI module list is up-to-date
+	local expected_cksum=a4138e48
+	local local_cksum=$(
+		../pypy${PYVER}-c - <<-EOF
+			import binascii
+			import json
+			from pypy_tools.build_cffi_imports import cffi_build_scripts as x
+			print("%08x" % (binascii.crc32(json.dumps(x).encode()),))
+		EOF
+	)
+	if [[ ${local_cksum} != ${expected_cksum} ]]; then
+		die "Please verify cffi_targets and update checksum to ${local_cksum}"
+	fi
+
+	# Cleanup temporary objects
+	find \( -name "*_cffi.c" -o -name '*.o' \) -delete || die
+	find -type d -empty -delete || die
+}
+
+src_install() {
+	einfo "Installing PyPy ..."
+	dodir /usr/bin
+	dosym pypy${PYVER}-c-${PYPY_PV} /usr/bin/pypy${PYVER}
+	insinto /usr/lib/pypy${PYVER}
+	# preserve mtimes to avoid obsoleting caches
+	insopts -p
+	doins -r lib-python/3/. lib_pypy/.
+	insinto /usr/include
+	doins -r include/pypy${PYVER}
+
+	# replace copied headers with symlinks
+	for x in "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/*; do
+		dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}"
+	done
+
+	dodoc README.rst
+
+	local dest=/usr/lib/pypy${PYVER}
+	rm -r "${ED}${dest}"/ensurepip/_bundled || die
+	if ! use ensurepip; then
+		rm -r "${ED}${dest}"/ensurepip || die
+	fi
+	if ! use gdbm; then
+		rm -r "${ED}${dest}"/_gdbm* || die
+	fi
+	if ! use sqlite; then
+		rm -r "${ED}${dest}"/sqlite3 \
+			"${ED}${dest}"/_sqlite3* \
+			"${ED}${dest}"/test/test_sqlite.py || die
+	fi
+	if ! use tk; then
+		rm -r "${ED}${dest}"/{idlelib,tkinter} \
+			"${ED}${dest}"/_tkinter \
+			"${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die
+	fi
+	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
+
+	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
+	# temporarily copy to build tree to facilitate module builds
+	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
+
+	einfo "Byte-compiling Python standard library..."
+	# exclude list from CPython Makefile.pre.in
+	"${PYTHON}" -m compileall -j "$(makeopts_jobs)" -o 0 -o 1 -o 2 \
+		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+		--hardlink-dupes -q -f -d "${dest}" "${ED}${dest}" || die
+
+	# remove to avoid collisions
+	rm "${PYTHON}" || die
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2023-12-30 18:32 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2023-12-30 18:32 UTC (permalink / raw
  To: gentoo-commits

commit:     678e575ba1df623bafba6a0e8d0e89f6244c0b4f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 30 18:31:06 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Dec 30 18:31:06 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=678e575b

dev-python/pypy3_9: Remove old

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

 dev-python/pypy3_9/Manifest                 |   2 -
 dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild | 211 ----------------------------
 2 files changed, 213 deletions(-)

diff --git a/dev-python/pypy3_9/Manifest b/dev-python/pypy3_9/Manifest
index 398f5084298e..dde316b9d375 100644
--- a/dev-python/pypy3_9/Manifest
+++ b/dev-python/pypy3_9/Manifest
@@ -1,4 +1,2 @@
-DIST pypy3.9-gentoo-patches-7.3.13.tar.xz 7476 BLAKE2B 70f80c489686e92e933a200d2e92a095a80e2300814ec4e1f3cb31ec5f5500a45667f7bfe9570ea5eef3933fdda33a9930bdf2cf683c28e3ddb610bebeeca6dd SHA512 5170f5141beb93b3b37cc94f85324c88182967eaff2f8ca26b81d63d5b0d20414a139ca44c250c07b46c747e27c97fd0fe5a2365f6636aba2dd28df3bc55cdca
 DIST pypy3.9-gentoo-patches-7.3.14.tar.xz 5808 BLAKE2B 92ab7e9129838ff22cc13a64fe1ffe9ffd3af45ec777bde531ce2e15b87681e17fca2f1dc037ee4798bca5a9312ca4c961ec97b0a53bf5e6dc36fd12241151c9 SHA512 dffd17558d5ec2625682e5476ea53a9fe273f553b94d2589628e23ac3b45c50b5bf3ba9c7d92935e477374d9220af6ed310abae1270175f091a8c5a267a4bacd
-DIST pypy3.9-v7.3.13-src.tar.bz2 23452374 BLAKE2B b5ce8dd78e4851b5c7fa6aa0c6f2f5c198a3b2d1e4691ccb20d1b229397d60ac41eaecef37f7c76e4de837876bdd6c1e4276302afc292080e0a38f1a58869580 SHA512 04b184050625f06d2acaa836a786db788c4f658f3384ebde176d0acc95044ee83dbf7193ebab1e4fd6275bed7a590d3945482294be32d8f94e8c541e053dce59
 DIST pypy3.9-v7.3.14-src.tar.bz2 24683302 BLAKE2B 318fe17b423ce9c5b374cbceacf480ddbad7862bd6507d74289bbc0bd8ba8cf350ad21297b1e2dab7dfe6e7f542d929259be8d57867420b8a9a59284532aa9e2 SHA512 77db85092ca8ce419e30b274ec001566bbd275d88e74e5a3a3d0d557b18beb5a1e98428487f338e46f64893e54bf426464d372056c37a87a2b42b36c7d0fb536

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild
deleted file mode 100644
index 0c66221371e4..000000000000
--- a/dev-python/pypy3_9/pypy3_9-7.3.13-r1.ebuild
+++ /dev/null
@@ -1,211 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit multiprocessing pax-utils toolchain-funcs
-
-PYPY_PV=${PV%_p*}
-PYVER=3.9
-MY_P="pypy${PYVER}-v${PYPY_PV/_}"
-PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_rc/rc}"
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language"
-HOMEPAGE="
-	https://www.pypy.org/
-	https://foss.heptapod.net/pypy/pypy/
-"
-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"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-# also check pypy/interpreter/pycode.py -> pypy_incremental_magic
-SLOT="0/pypy39-pp73-336"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="+ensurepip gdbm +jit ncurses sqlite tk"
-# many tests are failing upstream
-# see https://buildbot.pypy.org/summary?branch=py${PYVER}
-RESTRICT="test"
-
-RDEPEND="
-	|| (
-		>=dev-python/${PN}-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?]
-		>=dev-python/${PN}-exe-bin-${PYPY_PV}:${PYPY_PV}
-	)
-	dev-lang/python-exec[python_targets_pypy3(-)]
-	dev-libs/openssl:0=
-	dev-python/gentoo-common
-	ensurepip? ( dev-python/ensurepip-wheels )
-	gdbm? ( sys-libs/gdbm:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!<dev-python/pypy3-7.3.12_rc
-"
-DEPEND="
-	${RDEPEND}
-"
-
-src_prepare() {
-	local PATCHES=(
-		"${WORKDIR}/${PATCHSET}"
-	)
-	default
-}
-
-src_configure() {
-	tc-export CC
-}
-
-src_compile() {
-	mkdir bin || die
-	# switch to the layout expected for cffi module builds
-	mkdir include/pypy${PYVER} || die
-	# copy over to make sys.prefix happy
-	cp -p "${BROOT}"/usr/bin/pypy${PYVER}-c-${PYPY_PV} pypy${PYVER}-c || die
-	cp -p "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/* include/pypy${PYVER}/ || die
-	# (not installed by pypy-exe)
-	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
-	mv pypy/module/cpyext/include/* include/pypy${PYVER}/ || die
-	mv pypy/module/cpyext/parse/*.h include/pypy${PYVER}/ || die
-	pax-mark m pypy${PYVER}-c
-
-	# verify the subslot
-	local soabi=$(
-		./pypy${PYVER}-c - <<-EOF
-			import importlib.util
-			import sysconfig
-			soabi = sysconfig.get_config_var("SOABI")
-			magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff
-			print(f"{soabi}-{magic}")
-		EOF
-	)
-	[[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
-
-	# Add epython.py to the distribution
-	echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate sysconfig data
-	local host_gnu_type=$(sh pypy/tool/release/config.guess)
-	local overrides=(
-		HOST_GNU_TYPE "${host_gnu_type:-unknown}"
-		INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}"
-		LIBDIR "${EPREFIX}/usr/$(get_libdir)"
-		TZPATH "${EPREFIX}/usr/share/zoneinfo"
-		WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip"
-	)
-	./pypy${PYVER}-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die
-	local outdir
-	outdir=$(<pybuilddir.txt) || die
-	cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy${PYVER}-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
-		import lib2to3.pygram
-		import lib2to3.patcomp
-		lib2to3.patcomp.PatternCompiler()
-	EOF
-
-	# Generate cffi modules
-	# Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py!
-	# (NB: we build CFFI modules first to avoid error log when importing
-	# build_cffi_imports).
-	cffi_targets=(
-		pypy_util blake2/_blake2 sha3/_sha3 ssl
-		audioop syslog pwdgrp resource lzma posixshmem
-		ctypes_test testmultiphase
-	)
-	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${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
-	done
-	# testcapi does not have a "build" script
-	../pypy${PYVER}-c -c "import _testcapi" || die
-
-	# Verify that CFFI module list is up-to-date
-	local expected_cksum=63d4659f
-	local local_cksum=$(
-		../pypy${PYVER}-c - <<-EOF
-			import binascii
-			import json
-			from pypy_tools.build_cffi_imports import cffi_build_scripts as x
-			print("%08x" % (binascii.crc32(json.dumps(x).encode()),))
-		EOF
-	)
-	if [[ ${local_cksum} != ${expected_cksum} ]]; then
-		die "Please verify cffi_targets and update checksum to ${local_cksum}"
-	fi
-
-	# Cleanup temporary objects
-	find \( -name "*_cffi.c" -o -name '*.o' \) -delete || die
-	find -type d -empty -delete || die
-}
-
-src_install() {
-	einfo "Installing PyPy ..."
-	dodir /usr/bin
-	dosym pypy${PYVER}-c-${PYPY_PV} /usr/bin/pypy${PYVER}
-	insinto /usr/lib/pypy${PYVER}
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r lib-python/3/. lib_pypy/.
-	insinto /usr/include
-	doins -r include/pypy${PYVER}
-
-	# replace copied headers with symlinks
-	for x in "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/*; do
-		dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}"
-	done
-
-	dodoc README.rst
-
-	local dest=/usr/lib/pypy${PYVER}
-	rm -r "${ED}${dest}"/ensurepip/_bundled || die
-	if ! use ensurepip; then
-		rm -r "${ED}${dest}"/ensurepip || die
-	fi
-	if ! use gdbm; then
-		rm -r "${ED}${dest}"/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED}${dest}"/sqlite3 \
-			"${ED}${dest}"/_sqlite3* \
-			"${ED}${dest}"/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED}${dest}"/{idlelib,tkinter} \
-			"${ED}${dest}"/_tkinter \
-			"${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die
-	fi
-	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
-
-	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
-	# temporarily copy to build tree to facilitate module builds
-	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
-
-	einfo "Byte-compiling Python standard library..."
-	# exclude list from CPython Makefile.pre.in
-	"${PYTHON}" -m compileall -j "$(makeopts_jobs)" -o 0 -o 1 -o 2 \
-		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
-		--hardlink-dupes -q -f -d "${dest}" "${ED}${dest}" || die
-
-	# remove to avoid collisions
-	rm "${PYTHON}" || die
-}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2024-01-15 21:24 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2024-01-15 21:24 UTC (permalink / raw
  To: gentoo-commits

commit:     f0f52f15d47497c65557d741b9d708b6f904078c
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 15 16:55:29 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jan 15 21:23:56 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0f52f15

dev-python/pypy3_9: Bump to 7.3.15

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

 dev-python/pypy3_9/Manifest              |   2 +
 dev-python/pypy3_9/metadata.xml          |   6 +-
 dev-python/pypy3_9/pypy3_9-7.3.15.ebuild | 211 +++++++++++++++++++++++++++++++
 3 files changed, 216 insertions(+), 3 deletions(-)

diff --git a/dev-python/pypy3_9/Manifest b/dev-python/pypy3_9/Manifest
index dde316b9d375..755616050e96 100644
--- a/dev-python/pypy3_9/Manifest
+++ b/dev-python/pypy3_9/Manifest
@@ -1,2 +1,4 @@
 DIST pypy3.9-gentoo-patches-7.3.14.tar.xz 5808 BLAKE2B 92ab7e9129838ff22cc13a64fe1ffe9ffd3af45ec777bde531ce2e15b87681e17fca2f1dc037ee4798bca5a9312ca4c961ec97b0a53bf5e6dc36fd12241151c9 SHA512 dffd17558d5ec2625682e5476ea53a9fe273f553b94d2589628e23ac3b45c50b5bf3ba9c7d92935e477374d9220af6ed310abae1270175f091a8c5a267a4bacd
+DIST pypy3.9-gentoo-patches-7.3.15.tar.xz 5800 BLAKE2B e3466eb528c7cfaa8a189552041852d29bbacb45e08dc967deec1d8486107725ab2b2b1e65c98307983ff1f3ad038d3e54bf84eaadc32060185661c8023dea06 SHA512 c834433bfaaa1cd081fb71f9e122810b66fbd0a52f8473b6ec02a8615f0b0328da51ca1e3f0f209d325d9884876b634dbd1ec202f428620044fe5e60b4ce910a
 DIST pypy3.9-v7.3.14-src.tar.bz2 24683302 BLAKE2B 318fe17b423ce9c5b374cbceacf480ddbad7862bd6507d74289bbc0bd8ba8cf350ad21297b1e2dab7dfe6e7f542d929259be8d57867420b8a9a59284532aa9e2 SHA512 77db85092ca8ce419e30b274ec001566bbd275d88e74e5a3a3d0d557b18beb5a1e98428487f338e46f64893e54bf426464d372056c37a87a2b42b36c7d0fb536
+DIST pypy3.9-v7.3.15-src.tar.bz2 24694333 BLAKE2B 151c3c8b828c7a35cfd63dd73b8683c3fe5529c5f6df7cc628d2967e5c61e16490b8663efe838fc6efd9f0b4a08fde8c9315e2f0a471bb62a2395055f2f130c6 SHA512 64faca74c507ef3e8dd2df34ad81874c24bc336e79ecf53bbbb43c21adebdea60efafe6ad38bdbf15bc2a677980d7db2c2c0affa04beb7e7e1b739d85e17f333

diff --git a/dev-python/pypy3_9/metadata.xml b/dev-python/pypy3_9/metadata.xml
index 279dc3f87516..2a6a5bdac475 100644
--- a/dev-python/pypy3_9/metadata.xml
+++ b/dev-python/pypy3_9/metadata.xml
@@ -5,6 +5,9 @@
 		<email>python@gentoo.org</email>
 		<name>Python</name>
 	</maintainer>
+	<upstream>
+		<remote-id type="github">pypy/pypy</remote-id>
+	</upstream>
 	<use>
 		<flag name="ensurepip">
 			Install the ensurepip module that uses bundled wheels
@@ -12,7 +15,4 @@
 			be only possible to use venv `--without-pip`)
 		</flag>
 	</use>
-	<upstream>
-		<remote-id type="heptapod">pypy/pypy</remote-id>
-	</upstream>
 </pkgmetadata>

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.15.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.15.ebuild
new file mode 100644
index 000000000000..cd6b3d3e3ed8
--- /dev/null
+++ b/dev-python/pypy3_9/pypy3_9-7.3.15.ebuild
@@ -0,0 +1,211 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multiprocessing pax-utils toolchain-funcs
+
+PYPY_PV=${PV%_p*}
+PYVER=3.9
+MY_P="pypy${PYVER}-v${PYPY_PV/_}"
+PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_rc/rc}"
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language"
+HOMEPAGE="
+	https://www.pypy.org/
+	https://github.com/pypy/pypy/
+"
+SRC_URI="
+	https://downloads.python.org/pypy/${MY_P}-src.tar.bz2
+	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"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+# also check pypy/interpreter/pycode.py -> pypy_incremental_magic
+SLOT="0/pypy39-pp73-336"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+ensurepip gdbm +jit ncurses sqlite tk"
+# many tests are failing upstream
+# see https://buildbot.pypy.org/summary?branch=py${PYVER}
+RESTRICT="test"
+
+RDEPEND="
+	|| (
+		>=dev-python/${PN}-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?]
+		>=dev-python/${PN}-exe-bin-${PYPY_PV}:${PYPY_PV}
+	)
+	dev-lang/python-exec[python_targets_pypy3(-)]
+	dev-libs/openssl:0=
+	dev-python/gentoo-common
+	ensurepip? ( dev-python/ensurepip-wheels )
+	gdbm? ( sys-libs/gdbm:0= )
+	sqlite? ( dev-db/sqlite:3= )
+	tk? (
+		dev-lang/tk:0=
+		dev-tcltk/tix:0=
+	)
+"
+DEPEND="
+	${RDEPEND}
+"
+
+src_prepare() {
+	local PATCHES=(
+		"${WORKDIR}/${PATCHSET}"
+	)
+	default
+}
+
+src_configure() {
+	tc-export CC
+}
+
+src_compile() {
+	mkdir bin || die
+	# switch to the layout expected for cffi module builds
+	mkdir include/pypy${PYVER} || die
+	# copy over to make sys.prefix happy
+	cp -p "${BROOT}"/usr/bin/pypy${PYVER}-c-${PYPY_PV} pypy${PYVER}-c || die
+	cp -p "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/* include/pypy${PYVER}/ || die
+	# (not installed by pypy-exe)
+	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
+	mv pypy/module/cpyext/include/* include/pypy${PYVER}/ || die
+	mv pypy/module/cpyext/parse/*.h include/pypy${PYVER}/ || die
+	pax-mark m pypy${PYVER}-c
+
+	# verify the subslot
+	local soabi=$(
+		./pypy${PYVER}-c - <<-EOF
+			import importlib.util
+			import sysconfig
+			soabi = sysconfig.get_config_var("SOABI")
+			magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff
+			print(f"{soabi}-{magic}")
+		EOF
+	)
+	[[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
+
+	# Add epython.py to the distribution
+	echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die
+
+	einfo "Generating caches and CFFI modules ..."
+
+	# Generate sysconfig data
+	local host_gnu_type=$(sh pypy/tool/release/config.guess)
+	local overrides=(
+		HOST_GNU_TYPE "${host_gnu_type:-unknown}"
+		INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}"
+		LIBDIR "${EPREFIX}/usr/$(get_libdir)"
+		TZPATH "${EPREFIX}/usr/share/zoneinfo"
+		WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip"
+	)
+	./pypy${PYVER}-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die
+	local outdir
+	outdir=$(<pybuilddir.txt) || die
+	cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die
+
+	# Generate Grammar and PatternGrammar pickles.
+	./pypy${PYVER}-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
+		import lib2to3.pygram
+		import lib2to3.patcomp
+		lib2to3.patcomp.PatternCompiler()
+	EOF
+
+	# Generate cffi modules
+	# Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py!
+	# (NB: we build CFFI modules first to avoid error log when importing
+	# build_cffi_imports).
+	cffi_targets=(
+		pypy_util blake2/_blake2 sha3/_sha3 ssl
+		audioop syslog pwdgrp resource lzma posixshmem
+		ctypes_test testmultiphase
+	)
+	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${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
+	done
+	# testcapi does not have a "build" script
+	../pypy${PYVER}-c -c "import _testcapi" || die
+
+	# Verify that CFFI module list is up-to-date
+	local expected_cksum=a4138e48
+	local local_cksum=$(
+		../pypy${PYVER}-c - <<-EOF
+			import binascii
+			import json
+			from pypy_tools.build_cffi_imports import cffi_build_scripts as x
+			print("%08x" % (binascii.crc32(json.dumps(x).encode()),))
+		EOF
+	)
+	if [[ ${local_cksum} != ${expected_cksum} ]]; then
+		die "Please verify cffi_targets and update checksum to ${local_cksum}"
+	fi
+
+	# Cleanup temporary objects
+	find \( -name "*_cffi.c" -o -name '*.o' \) -delete || die
+	find -type d -empty -delete || die
+}
+
+src_install() {
+	einfo "Installing PyPy ..."
+	dodir /usr/bin
+	dosym pypy${PYVER}-c-${PYPY_PV} /usr/bin/pypy${PYVER}
+	insinto /usr/lib/pypy${PYVER}
+	# preserve mtimes to avoid obsoleting caches
+	insopts -p
+	doins -r lib-python/3/. lib_pypy/.
+	insinto /usr/include
+	doins -r include/pypy${PYVER}
+
+	# replace copied headers with symlinks
+	for x in "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/*; do
+		dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}"
+	done
+
+	dodoc README.rst
+
+	local dest=/usr/lib/pypy${PYVER}
+	rm -r "${ED}${dest}"/ensurepip/_bundled || die
+	if ! use ensurepip; then
+		rm -r "${ED}${dest}"/ensurepip || die
+	fi
+	if ! use gdbm; then
+		rm -r "${ED}${dest}"/_gdbm* || die
+	fi
+	if ! use sqlite; then
+		rm -r "${ED}${dest}"/sqlite3 \
+			"${ED}${dest}"/_sqlite3* \
+			"${ED}${dest}"/test/test_sqlite.py || die
+	fi
+	if ! use tk; then
+		rm -r "${ED}${dest}"/{idlelib,tkinter} \
+			"${ED}${dest}"/_tkinter \
+			"${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die
+	fi
+	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
+
+	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
+	# temporarily copy to build tree to facilitate module builds
+	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
+
+	einfo "Byte-compiling Python standard library..."
+	# exclude list from CPython Makefile.pre.in
+	"${PYTHON}" -m compileall -j "$(makeopts_jobs)" -o 0 -o 1 -o 2 \
+		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+		--hardlink-dupes -q -f -d "${dest}" "${ED}${dest}" || die
+
+	# remove to avoid collisions
+	rm "${PYTHON}" || die
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2024-02-03 15:02 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2024-02-03 15:02 UTC (permalink / raw
  To: gentoo-commits

commit:     9a07f030cb533a41ffb46a7ca682e94f9d5e2937
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  3 14:52:54 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Feb  3 15:01:44 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a07f030

dev-python/pypy3_9: Remove old

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

 dev-python/pypy3_9/Manifest              |   2 -
 dev-python/pypy3_9/pypy3_9-7.3.14.ebuild | 211 -------------------------------
 2 files changed, 213 deletions(-)

diff --git a/dev-python/pypy3_9/Manifest b/dev-python/pypy3_9/Manifest
index 755616050e96..3e201830e36d 100644
--- a/dev-python/pypy3_9/Manifest
+++ b/dev-python/pypy3_9/Manifest
@@ -1,4 +1,2 @@
-DIST pypy3.9-gentoo-patches-7.3.14.tar.xz 5808 BLAKE2B 92ab7e9129838ff22cc13a64fe1ffe9ffd3af45ec777bde531ce2e15b87681e17fca2f1dc037ee4798bca5a9312ca4c961ec97b0a53bf5e6dc36fd12241151c9 SHA512 dffd17558d5ec2625682e5476ea53a9fe273f553b94d2589628e23ac3b45c50b5bf3ba9c7d92935e477374d9220af6ed310abae1270175f091a8c5a267a4bacd
 DIST pypy3.9-gentoo-patches-7.3.15.tar.xz 5800 BLAKE2B e3466eb528c7cfaa8a189552041852d29bbacb45e08dc967deec1d8486107725ab2b2b1e65c98307983ff1f3ad038d3e54bf84eaadc32060185661c8023dea06 SHA512 c834433bfaaa1cd081fb71f9e122810b66fbd0a52f8473b6ec02a8615f0b0328da51ca1e3f0f209d325d9884876b634dbd1ec202f428620044fe5e60b4ce910a
-DIST pypy3.9-v7.3.14-src.tar.bz2 24683302 BLAKE2B 318fe17b423ce9c5b374cbceacf480ddbad7862bd6507d74289bbc0bd8ba8cf350ad21297b1e2dab7dfe6e7f542d929259be8d57867420b8a9a59284532aa9e2 SHA512 77db85092ca8ce419e30b274ec001566bbd275d88e74e5a3a3d0d557b18beb5a1e98428487f338e46f64893e54bf426464d372056c37a87a2b42b36c7d0fb536
 DIST pypy3.9-v7.3.15-src.tar.bz2 24694333 BLAKE2B 151c3c8b828c7a35cfd63dd73b8683c3fe5529c5f6df7cc628d2967e5c61e16490b8663efe838fc6efd9f0b4a08fde8c9315e2f0a471bb62a2395055f2f130c6 SHA512 64faca74c507ef3e8dd2df34ad81874c24bc336e79ecf53bbbb43c21adebdea60efafe6ad38bdbf15bc2a677980d7db2c2c0affa04beb7e7e1b739d85e17f333

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.14.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.14.ebuild
deleted file mode 100644
index 6a263ec2fbb4..000000000000
--- a/dev-python/pypy3_9/pypy3_9-7.3.14.ebuild
+++ /dev/null
@@ -1,211 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit multiprocessing pax-utils toolchain-funcs
-
-PYPY_PV=${PV%_p*}
-PYVER=3.9
-MY_P="pypy${PYVER}-v${PYPY_PV/_}"
-PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_rc/rc}"
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language"
-HOMEPAGE="
-	https://www.pypy.org/
-	https://foss.heptapod.net/pypy/pypy/
-"
-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"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-# also check pypy/interpreter/pycode.py -> pypy_incremental_magic
-SLOT="0/pypy39-pp73-336"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="+ensurepip gdbm +jit ncurses sqlite tk"
-# many tests are failing upstream
-# see https://buildbot.pypy.org/summary?branch=py${PYVER}
-RESTRICT="test"
-
-RDEPEND="
-	|| (
-		>=dev-python/${PN}-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?]
-		>=dev-python/${PN}-exe-bin-${PYPY_PV}:${PYPY_PV}
-	)
-	dev-lang/python-exec[python_targets_pypy3(-)]
-	dev-libs/openssl:0=
-	dev-python/gentoo-common
-	ensurepip? ( dev-python/ensurepip-wheels )
-	gdbm? ( sys-libs/gdbm:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!<dev-python/pypy3-7.3.12_rc
-"
-DEPEND="
-	${RDEPEND}
-"
-
-src_prepare() {
-	local PATCHES=(
-		"${WORKDIR}/${PATCHSET}"
-	)
-	default
-}
-
-src_configure() {
-	tc-export CC
-}
-
-src_compile() {
-	mkdir bin || die
-	# switch to the layout expected for cffi module builds
-	mkdir include/pypy${PYVER} || die
-	# copy over to make sys.prefix happy
-	cp -p "${BROOT}"/usr/bin/pypy${PYVER}-c-${PYPY_PV} pypy${PYVER}-c || die
-	cp -p "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/* include/pypy${PYVER}/ || die
-	# (not installed by pypy-exe)
-	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
-	mv pypy/module/cpyext/include/* include/pypy${PYVER}/ || die
-	mv pypy/module/cpyext/parse/*.h include/pypy${PYVER}/ || die
-	pax-mark m pypy${PYVER}-c
-
-	# verify the subslot
-	local soabi=$(
-		./pypy${PYVER}-c - <<-EOF
-			import importlib.util
-			import sysconfig
-			soabi = sysconfig.get_config_var("SOABI")
-			magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff
-			print(f"{soabi}-{magic}")
-		EOF
-	)
-	[[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
-
-	# Add epython.py to the distribution
-	echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate sysconfig data
-	local host_gnu_type=$(sh pypy/tool/release/config.guess)
-	local overrides=(
-		HOST_GNU_TYPE "${host_gnu_type:-unknown}"
-		INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}"
-		LIBDIR "${EPREFIX}/usr/$(get_libdir)"
-		TZPATH "${EPREFIX}/usr/share/zoneinfo"
-		WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip"
-	)
-	./pypy${PYVER}-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die
-	local outdir
-	outdir=$(<pybuilddir.txt) || die
-	cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy${PYVER}-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
-		import lib2to3.pygram
-		import lib2to3.patcomp
-		lib2to3.patcomp.PatternCompiler()
-	EOF
-
-	# Generate cffi modules
-	# Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py!
-	# (NB: we build CFFI modules first to avoid error log when importing
-	# build_cffi_imports).
-	cffi_targets=(
-		pypy_util blake2/_blake2 sha3/_sha3 ssl
-		audioop syslog pwdgrp resource lzma posixshmem
-		ctypes_test testmultiphase
-	)
-	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${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
-	done
-	# testcapi does not have a "build" script
-	../pypy${PYVER}-c -c "import _testcapi" || die
-
-	# Verify that CFFI module list is up-to-date
-	local expected_cksum=a4138e48
-	local local_cksum=$(
-		../pypy${PYVER}-c - <<-EOF
-			import binascii
-			import json
-			from pypy_tools.build_cffi_imports import cffi_build_scripts as x
-			print("%08x" % (binascii.crc32(json.dumps(x).encode()),))
-		EOF
-	)
-	if [[ ${local_cksum} != ${expected_cksum} ]]; then
-		die "Please verify cffi_targets and update checksum to ${local_cksum}"
-	fi
-
-	# Cleanup temporary objects
-	find \( -name "*_cffi.c" -o -name '*.o' \) -delete || die
-	find -type d -empty -delete || die
-}
-
-src_install() {
-	einfo "Installing PyPy ..."
-	dodir /usr/bin
-	dosym pypy${PYVER}-c-${PYPY_PV} /usr/bin/pypy${PYVER}
-	insinto /usr/lib/pypy${PYVER}
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r lib-python/3/. lib_pypy/.
-	insinto /usr/include
-	doins -r include/pypy${PYVER}
-
-	# replace copied headers with symlinks
-	for x in "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/*; do
-		dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}"
-	done
-
-	dodoc README.rst
-
-	local dest=/usr/lib/pypy${PYVER}
-	rm -r "${ED}${dest}"/ensurepip/_bundled || die
-	if ! use ensurepip; then
-		rm -r "${ED}${dest}"/ensurepip || die
-	fi
-	if ! use gdbm; then
-		rm -r "${ED}${dest}"/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED}${dest}"/sqlite3 \
-			"${ED}${dest}"/_sqlite3* \
-			"${ED}${dest}"/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED}${dest}"/{idlelib,tkinter} \
-			"${ED}${dest}"/_tkinter \
-			"${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die
-	fi
-	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
-
-	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
-	# temporarily copy to build tree to facilitate module builds
-	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
-
-	einfo "Byte-compiling Python standard library..."
-	# exclude list from CPython Makefile.pre.in
-	"${PYTHON}" -m compileall -j "$(makeopts_jobs)" -o 0 -o 1 -o 2 \
-		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
-		--hardlink-dupes -q -f -d "${dest}" "${ED}${dest}" || die
-
-	# remove to avoid collisions
-	rm "${PYTHON}" || die
-}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2024-04-24 15:08 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2024-04-24 15:08 UTC (permalink / raw
  To: gentoo-commits

commit:     e0ebee16da8a2ce090c447a8b0369504c05d9f73
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 24 11:14:42 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Apr 24 15:08:23 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0ebee16

dev-python/pypy3_9: Bump to 7.3.16

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

 dev-python/pypy3_9/Manifest              |   2 +
 dev-python/pypy3_9/pypy3_9-7.3.16.ebuild | 211 +++++++++++++++++++++++++++++++
 2 files changed, 213 insertions(+)

diff --git a/dev-python/pypy3_9/Manifest b/dev-python/pypy3_9/Manifest
index 3e201830e36d..9901e21f155e 100644
--- a/dev-python/pypy3_9/Manifest
+++ b/dev-python/pypy3_9/Manifest
@@ -1,2 +1,4 @@
 DIST pypy3.9-gentoo-patches-7.3.15.tar.xz 5800 BLAKE2B e3466eb528c7cfaa8a189552041852d29bbacb45e08dc967deec1d8486107725ab2b2b1e65c98307983ff1f3ad038d3e54bf84eaadc32060185661c8023dea06 SHA512 c834433bfaaa1cd081fb71f9e122810b66fbd0a52f8473b6ec02a8615f0b0328da51ca1e3f0f209d325d9884876b634dbd1ec202f428620044fe5e60b4ce910a
+DIST pypy3.9-gentoo-patches-7.3.16.tar.xz 5764 BLAKE2B 094740bc594bc63648bba997e2a8a8eddd857e6f63594fc3d5f3bca9e74bce101ab56ddf59afd75d62e91c17d89271d7f8b52da6b19adf480dd9fab9f0c6dc2c SHA512 efbe3ac941be19b270336e7b31999114d4334cfd3cc0ab5f2499e41825a51bc7c005e10302114813741772ae0412466c000ab33b64f01d639d5689460f8befcb
 DIST pypy3.9-v7.3.15-src.tar.bz2 24694333 BLAKE2B 151c3c8b828c7a35cfd63dd73b8683c3fe5529c5f6df7cc628d2967e5c61e16490b8663efe838fc6efd9f0b4a08fde8c9315e2f0a471bb62a2395055f2f130c6 SHA512 64faca74c507ef3e8dd2df34ad81874c24bc336e79ecf53bbbb43c21adebdea60efafe6ad38bdbf15bc2a677980d7db2c2c0affa04beb7e7e1b739d85e17f333
+DIST pypy3.9-v7.3.16-src.tar.bz2 23686849 BLAKE2B 736b173d8bd6b19785e64827d289feb39e30e93caaef3071a5185cc5cbaab4aed23b9da89e34a464dad0c0d5142db9dc238a1dd221aea299f95bea2e47299a81 SHA512 bd13cddb0b4cab4e200d2eafd8239c76209a49f8e847193c5ed0fe446ca46271446fc762cafd2aa8f410d022bc65abcd48ba7148502b70b901565e187058310d

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.16.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.16.ebuild
new file mode 100644
index 000000000000..cd6b3d3e3ed8
--- /dev/null
+++ b/dev-python/pypy3_9/pypy3_9-7.3.16.ebuild
@@ -0,0 +1,211 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multiprocessing pax-utils toolchain-funcs
+
+PYPY_PV=${PV%_p*}
+PYVER=3.9
+MY_P="pypy${PYVER}-v${PYPY_PV/_}"
+PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_rc/rc}"
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language"
+HOMEPAGE="
+	https://www.pypy.org/
+	https://github.com/pypy/pypy/
+"
+SRC_URI="
+	https://downloads.python.org/pypy/${MY_P}-src.tar.bz2
+	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"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+# also check pypy/interpreter/pycode.py -> pypy_incremental_magic
+SLOT="0/pypy39-pp73-336"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+ensurepip gdbm +jit ncurses sqlite tk"
+# many tests are failing upstream
+# see https://buildbot.pypy.org/summary?branch=py${PYVER}
+RESTRICT="test"
+
+RDEPEND="
+	|| (
+		>=dev-python/${PN}-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?]
+		>=dev-python/${PN}-exe-bin-${PYPY_PV}:${PYPY_PV}
+	)
+	dev-lang/python-exec[python_targets_pypy3(-)]
+	dev-libs/openssl:0=
+	dev-python/gentoo-common
+	ensurepip? ( dev-python/ensurepip-wheels )
+	gdbm? ( sys-libs/gdbm:0= )
+	sqlite? ( dev-db/sqlite:3= )
+	tk? (
+		dev-lang/tk:0=
+		dev-tcltk/tix:0=
+	)
+"
+DEPEND="
+	${RDEPEND}
+"
+
+src_prepare() {
+	local PATCHES=(
+		"${WORKDIR}/${PATCHSET}"
+	)
+	default
+}
+
+src_configure() {
+	tc-export CC
+}
+
+src_compile() {
+	mkdir bin || die
+	# switch to the layout expected for cffi module builds
+	mkdir include/pypy${PYVER} || die
+	# copy over to make sys.prefix happy
+	cp -p "${BROOT}"/usr/bin/pypy${PYVER}-c-${PYPY_PV} pypy${PYVER}-c || die
+	cp -p "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/* include/pypy${PYVER}/ || die
+	# (not installed by pypy-exe)
+	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
+	mv pypy/module/cpyext/include/* include/pypy${PYVER}/ || die
+	mv pypy/module/cpyext/parse/*.h include/pypy${PYVER}/ || die
+	pax-mark m pypy${PYVER}-c
+
+	# verify the subslot
+	local soabi=$(
+		./pypy${PYVER}-c - <<-EOF
+			import importlib.util
+			import sysconfig
+			soabi = sysconfig.get_config_var("SOABI")
+			magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff
+			print(f"{soabi}-{magic}")
+		EOF
+	)
+	[[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
+
+	# Add epython.py to the distribution
+	echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die
+
+	einfo "Generating caches and CFFI modules ..."
+
+	# Generate sysconfig data
+	local host_gnu_type=$(sh pypy/tool/release/config.guess)
+	local overrides=(
+		HOST_GNU_TYPE "${host_gnu_type:-unknown}"
+		INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}"
+		LIBDIR "${EPREFIX}/usr/$(get_libdir)"
+		TZPATH "${EPREFIX}/usr/share/zoneinfo"
+		WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip"
+	)
+	./pypy${PYVER}-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die
+	local outdir
+	outdir=$(<pybuilddir.txt) || die
+	cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die
+
+	# Generate Grammar and PatternGrammar pickles.
+	./pypy${PYVER}-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
+		import lib2to3.pygram
+		import lib2to3.patcomp
+		lib2to3.patcomp.PatternCompiler()
+	EOF
+
+	# Generate cffi modules
+	# Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py!
+	# (NB: we build CFFI modules first to avoid error log when importing
+	# build_cffi_imports).
+	cffi_targets=(
+		pypy_util blake2/_blake2 sha3/_sha3 ssl
+		audioop syslog pwdgrp resource lzma posixshmem
+		ctypes_test testmultiphase
+	)
+	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${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
+	done
+	# testcapi does not have a "build" script
+	../pypy${PYVER}-c -c "import _testcapi" || die
+
+	# Verify that CFFI module list is up-to-date
+	local expected_cksum=a4138e48
+	local local_cksum=$(
+		../pypy${PYVER}-c - <<-EOF
+			import binascii
+			import json
+			from pypy_tools.build_cffi_imports import cffi_build_scripts as x
+			print("%08x" % (binascii.crc32(json.dumps(x).encode()),))
+		EOF
+	)
+	if [[ ${local_cksum} != ${expected_cksum} ]]; then
+		die "Please verify cffi_targets and update checksum to ${local_cksum}"
+	fi
+
+	# Cleanup temporary objects
+	find \( -name "*_cffi.c" -o -name '*.o' \) -delete || die
+	find -type d -empty -delete || die
+}
+
+src_install() {
+	einfo "Installing PyPy ..."
+	dodir /usr/bin
+	dosym pypy${PYVER}-c-${PYPY_PV} /usr/bin/pypy${PYVER}
+	insinto /usr/lib/pypy${PYVER}
+	# preserve mtimes to avoid obsoleting caches
+	insopts -p
+	doins -r lib-python/3/. lib_pypy/.
+	insinto /usr/include
+	doins -r include/pypy${PYVER}
+
+	# replace copied headers with symlinks
+	for x in "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/*; do
+		dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}"
+	done
+
+	dodoc README.rst
+
+	local dest=/usr/lib/pypy${PYVER}
+	rm -r "${ED}${dest}"/ensurepip/_bundled || die
+	if ! use ensurepip; then
+		rm -r "${ED}${dest}"/ensurepip || die
+	fi
+	if ! use gdbm; then
+		rm -r "${ED}${dest}"/_gdbm* || die
+	fi
+	if ! use sqlite; then
+		rm -r "${ED}${dest}"/sqlite3 \
+			"${ED}${dest}"/_sqlite3* \
+			"${ED}${dest}"/test/test_sqlite.py || die
+	fi
+	if ! use tk; then
+		rm -r "${ED}${dest}"/{idlelib,tkinter} \
+			"${ED}${dest}"/_tkinter \
+			"${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die
+	fi
+	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
+
+	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
+	# temporarily copy to build tree to facilitate module builds
+	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
+
+	einfo "Byte-compiling Python standard library..."
+	# exclude list from CPython Makefile.pre.in
+	"${PYTHON}" -m compileall -j "$(makeopts_jobs)" -o 0 -o 1 -o 2 \
+		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+		--hardlink-dupes -q -f -d "${dest}" "${ED}${dest}" || die
+
+	# remove to avoid collisions
+	rm "${PYTHON}" || die
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2024-04-25  3:39 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2024-04-25  3:39 UTC (permalink / raw
  To: gentoo-commits

commit:     bc9c495bb9673ac61bafdf3e2140c8a989cfb5c6
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 25 03:36:54 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Apr 25 03:36:54 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc9c495b

dev-python/pypy3_9: Remove old

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

 dev-python/pypy3_9/Manifest              |   2 -
 dev-python/pypy3_9/pypy3_9-7.3.15.ebuild | 211 -------------------------------
 2 files changed, 213 deletions(-)

diff --git a/dev-python/pypy3_9/Manifest b/dev-python/pypy3_9/Manifest
index 9901e21f155e..615238c4ba6a 100644
--- a/dev-python/pypy3_9/Manifest
+++ b/dev-python/pypy3_9/Manifest
@@ -1,4 +1,2 @@
-DIST pypy3.9-gentoo-patches-7.3.15.tar.xz 5800 BLAKE2B e3466eb528c7cfaa8a189552041852d29bbacb45e08dc967deec1d8486107725ab2b2b1e65c98307983ff1f3ad038d3e54bf84eaadc32060185661c8023dea06 SHA512 c834433bfaaa1cd081fb71f9e122810b66fbd0a52f8473b6ec02a8615f0b0328da51ca1e3f0f209d325d9884876b634dbd1ec202f428620044fe5e60b4ce910a
 DIST pypy3.9-gentoo-patches-7.3.16.tar.xz 5764 BLAKE2B 094740bc594bc63648bba997e2a8a8eddd857e6f63594fc3d5f3bca9e74bce101ab56ddf59afd75d62e91c17d89271d7f8b52da6b19adf480dd9fab9f0c6dc2c SHA512 efbe3ac941be19b270336e7b31999114d4334cfd3cc0ab5f2499e41825a51bc7c005e10302114813741772ae0412466c000ab33b64f01d639d5689460f8befcb
-DIST pypy3.9-v7.3.15-src.tar.bz2 24694333 BLAKE2B 151c3c8b828c7a35cfd63dd73b8683c3fe5529c5f6df7cc628d2967e5c61e16490b8663efe838fc6efd9f0b4a08fde8c9315e2f0a471bb62a2395055f2f130c6 SHA512 64faca74c507ef3e8dd2df34ad81874c24bc336e79ecf53bbbb43c21adebdea60efafe6ad38bdbf15bc2a677980d7db2c2c0affa04beb7e7e1b739d85e17f333
 DIST pypy3.9-v7.3.16-src.tar.bz2 23686849 BLAKE2B 736b173d8bd6b19785e64827d289feb39e30e93caaef3071a5185cc5cbaab4aed23b9da89e34a464dad0c0d5142db9dc238a1dd221aea299f95bea2e47299a81 SHA512 bd13cddb0b4cab4e200d2eafd8239c76209a49f8e847193c5ed0fe446ca46271446fc762cafd2aa8f410d022bc65abcd48ba7148502b70b901565e187058310d

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.15.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.15.ebuild
deleted file mode 100644
index cd6b3d3e3ed8..000000000000
--- a/dev-python/pypy3_9/pypy3_9-7.3.15.ebuild
+++ /dev/null
@@ -1,211 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit multiprocessing pax-utils toolchain-funcs
-
-PYPY_PV=${PV%_p*}
-PYVER=3.9
-MY_P="pypy${PYVER}-v${PYPY_PV/_}"
-PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_rc/rc}"
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language"
-HOMEPAGE="
-	https://www.pypy.org/
-	https://github.com/pypy/pypy/
-"
-SRC_URI="
-	https://downloads.python.org/pypy/${MY_P}-src.tar.bz2
-	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"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-# also check pypy/interpreter/pycode.py -> pypy_incremental_magic
-SLOT="0/pypy39-pp73-336"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="+ensurepip gdbm +jit ncurses sqlite tk"
-# many tests are failing upstream
-# see https://buildbot.pypy.org/summary?branch=py${PYVER}
-RESTRICT="test"
-
-RDEPEND="
-	|| (
-		>=dev-python/${PN}-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?]
-		>=dev-python/${PN}-exe-bin-${PYPY_PV}:${PYPY_PV}
-	)
-	dev-lang/python-exec[python_targets_pypy3(-)]
-	dev-libs/openssl:0=
-	dev-python/gentoo-common
-	ensurepip? ( dev-python/ensurepip-wheels )
-	gdbm? ( sys-libs/gdbm:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-"
-DEPEND="
-	${RDEPEND}
-"
-
-src_prepare() {
-	local PATCHES=(
-		"${WORKDIR}/${PATCHSET}"
-	)
-	default
-}
-
-src_configure() {
-	tc-export CC
-}
-
-src_compile() {
-	mkdir bin || die
-	# switch to the layout expected for cffi module builds
-	mkdir include/pypy${PYVER} || die
-	# copy over to make sys.prefix happy
-	cp -p "${BROOT}"/usr/bin/pypy${PYVER}-c-${PYPY_PV} pypy${PYVER}-c || die
-	cp -p "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/* include/pypy${PYVER}/ || die
-	# (not installed by pypy-exe)
-	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
-	mv pypy/module/cpyext/include/* include/pypy${PYVER}/ || die
-	mv pypy/module/cpyext/parse/*.h include/pypy${PYVER}/ || die
-	pax-mark m pypy${PYVER}-c
-
-	# verify the subslot
-	local soabi=$(
-		./pypy${PYVER}-c - <<-EOF
-			import importlib.util
-			import sysconfig
-			soabi = sysconfig.get_config_var("SOABI")
-			magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff
-			print(f"{soabi}-{magic}")
-		EOF
-	)
-	[[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
-
-	# Add epython.py to the distribution
-	echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate sysconfig data
-	local host_gnu_type=$(sh pypy/tool/release/config.guess)
-	local overrides=(
-		HOST_GNU_TYPE "${host_gnu_type:-unknown}"
-		INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}"
-		LIBDIR "${EPREFIX}/usr/$(get_libdir)"
-		TZPATH "${EPREFIX}/usr/share/zoneinfo"
-		WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip"
-	)
-	./pypy${PYVER}-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die
-	local outdir
-	outdir=$(<pybuilddir.txt) || die
-	cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy${PYVER}-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
-		import lib2to3.pygram
-		import lib2to3.patcomp
-		lib2to3.patcomp.PatternCompiler()
-	EOF
-
-	# Generate cffi modules
-	# Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py!
-	# (NB: we build CFFI modules first to avoid error log when importing
-	# build_cffi_imports).
-	cffi_targets=(
-		pypy_util blake2/_blake2 sha3/_sha3 ssl
-		audioop syslog pwdgrp resource lzma posixshmem
-		ctypes_test testmultiphase
-	)
-	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${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
-	done
-	# testcapi does not have a "build" script
-	../pypy${PYVER}-c -c "import _testcapi" || die
-
-	# Verify that CFFI module list is up-to-date
-	local expected_cksum=a4138e48
-	local local_cksum=$(
-		../pypy${PYVER}-c - <<-EOF
-			import binascii
-			import json
-			from pypy_tools.build_cffi_imports import cffi_build_scripts as x
-			print("%08x" % (binascii.crc32(json.dumps(x).encode()),))
-		EOF
-	)
-	if [[ ${local_cksum} != ${expected_cksum} ]]; then
-		die "Please verify cffi_targets and update checksum to ${local_cksum}"
-	fi
-
-	# Cleanup temporary objects
-	find \( -name "*_cffi.c" -o -name '*.o' \) -delete || die
-	find -type d -empty -delete || die
-}
-
-src_install() {
-	einfo "Installing PyPy ..."
-	dodir /usr/bin
-	dosym pypy${PYVER}-c-${PYPY_PV} /usr/bin/pypy${PYVER}
-	insinto /usr/lib/pypy${PYVER}
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r lib-python/3/. lib_pypy/.
-	insinto /usr/include
-	doins -r include/pypy${PYVER}
-
-	# replace copied headers with symlinks
-	for x in "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/*; do
-		dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}"
-	done
-
-	dodoc README.rst
-
-	local dest=/usr/lib/pypy${PYVER}
-	rm -r "${ED}${dest}"/ensurepip/_bundled || die
-	if ! use ensurepip; then
-		rm -r "${ED}${dest}"/ensurepip || die
-	fi
-	if ! use gdbm; then
-		rm -r "${ED}${dest}"/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED}${dest}"/sqlite3 \
-			"${ED}${dest}"/_sqlite3* \
-			"${ED}${dest}"/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED}${dest}"/{idlelib,tkinter} \
-			"${ED}${dest}"/_tkinter \
-			"${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die
-	fi
-	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
-
-	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
-	# temporarily copy to build tree to facilitate module builds
-	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
-
-	einfo "Byte-compiling Python standard library..."
-	# exclude list from CPython Makefile.pre.in
-	"${PYTHON}" -m compileall -j "$(makeopts_jobs)" -o 0 -o 1 -o 2 \
-		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
-		--hardlink-dupes -q -f -d "${dest}" "${ED}${dest}" || die
-
-	# remove to avoid collisions
-	rm "${PYTHON}" || die
-}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2024-08-02 18:41 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2024-08-02 18:41 UTC (permalink / raw
  To: gentoo-commits

commit:     f985a68064750ddcd78192fab4a19b5e682f446e
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  2 16:00:46 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Aug  2 18:41:17 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f985a680

dev-python/pypy3_9: Bump to 7.3.16_p1

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

 dev-python/pypy3_9/Manifest                 |   1 +
 dev-python/pypy3_9/pypy3_9-7.3.16_p1.ebuild | 211 ++++++++++++++++++++++++++++
 2 files changed, 212 insertions(+)

diff --git a/dev-python/pypy3_9/Manifest b/dev-python/pypy3_9/Manifest
index 615238c4ba6a..6ede3b808949 100644
--- a/dev-python/pypy3_9/Manifest
+++ b/dev-python/pypy3_9/Manifest
@@ -1,2 +1,3 @@
 DIST pypy3.9-gentoo-patches-7.3.16.tar.xz 5764 BLAKE2B 094740bc594bc63648bba997e2a8a8eddd857e6f63594fc3d5f3bca9e74bce101ab56ddf59afd75d62e91c17d89271d7f8b52da6b19adf480dd9fab9f0c6dc2c SHA512 efbe3ac941be19b270336e7b31999114d4334cfd3cc0ab5f2499e41825a51bc7c005e10302114813741772ae0412466c000ab33b64f01d639d5689460f8befcb
+DIST pypy3.9-gentoo-patches-7.3.16_p1.tar.xz 8688 BLAKE2B 8ce6eb88aaf4c6bb53046d819e641836441ba6a5d33aeaabc0cb9081f4de4be9a65997bf31ec1f4cf6fc139eb1d2deae9521d4023f0a166b1755096ef3518c7f SHA512 e6e7d3a95a8acd262f9ecd0741a2ed05efca1e4896ca3607dc63c1f74ce8179b64d0a8134dc378009ac47e1d560431ba60e944af631029262ce4300c90f5b1c1
 DIST pypy3.9-v7.3.16-src.tar.bz2 23686849 BLAKE2B 736b173d8bd6b19785e64827d289feb39e30e93caaef3071a5185cc5cbaab4aed23b9da89e34a464dad0c0d5142db9dc238a1dd221aea299f95bea2e47299a81 SHA512 bd13cddb0b4cab4e200d2eafd8239c76209a49f8e847193c5ed0fe446ca46271446fc762cafd2aa8f410d022bc65abcd48ba7148502b70b901565e187058310d

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.16_p1.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.16_p1.ebuild
new file mode 100644
index 000000000000..cd6b3d3e3ed8
--- /dev/null
+++ b/dev-python/pypy3_9/pypy3_9-7.3.16_p1.ebuild
@@ -0,0 +1,211 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multiprocessing pax-utils toolchain-funcs
+
+PYPY_PV=${PV%_p*}
+PYVER=3.9
+MY_P="pypy${PYVER}-v${PYPY_PV/_}"
+PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_rc/rc}"
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language"
+HOMEPAGE="
+	https://www.pypy.org/
+	https://github.com/pypy/pypy/
+"
+SRC_URI="
+	https://downloads.python.org/pypy/${MY_P}-src.tar.bz2
+	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"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+# also check pypy/interpreter/pycode.py -> pypy_incremental_magic
+SLOT="0/pypy39-pp73-336"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+ensurepip gdbm +jit ncurses sqlite tk"
+# many tests are failing upstream
+# see https://buildbot.pypy.org/summary?branch=py${PYVER}
+RESTRICT="test"
+
+RDEPEND="
+	|| (
+		>=dev-python/${PN}-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?]
+		>=dev-python/${PN}-exe-bin-${PYPY_PV}:${PYPY_PV}
+	)
+	dev-lang/python-exec[python_targets_pypy3(-)]
+	dev-libs/openssl:0=
+	dev-python/gentoo-common
+	ensurepip? ( dev-python/ensurepip-wheels )
+	gdbm? ( sys-libs/gdbm:0= )
+	sqlite? ( dev-db/sqlite:3= )
+	tk? (
+		dev-lang/tk:0=
+		dev-tcltk/tix:0=
+	)
+"
+DEPEND="
+	${RDEPEND}
+"
+
+src_prepare() {
+	local PATCHES=(
+		"${WORKDIR}/${PATCHSET}"
+	)
+	default
+}
+
+src_configure() {
+	tc-export CC
+}
+
+src_compile() {
+	mkdir bin || die
+	# switch to the layout expected for cffi module builds
+	mkdir include/pypy${PYVER} || die
+	# copy over to make sys.prefix happy
+	cp -p "${BROOT}"/usr/bin/pypy${PYVER}-c-${PYPY_PV} pypy${PYVER}-c || die
+	cp -p "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/* include/pypy${PYVER}/ || die
+	# (not installed by pypy-exe)
+	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
+	mv pypy/module/cpyext/include/* include/pypy${PYVER}/ || die
+	mv pypy/module/cpyext/parse/*.h include/pypy${PYVER}/ || die
+	pax-mark m pypy${PYVER}-c
+
+	# verify the subslot
+	local soabi=$(
+		./pypy${PYVER}-c - <<-EOF
+			import importlib.util
+			import sysconfig
+			soabi = sysconfig.get_config_var("SOABI")
+			magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff
+			print(f"{soabi}-{magic}")
+		EOF
+	)
+	[[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
+
+	# Add epython.py to the distribution
+	echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die
+
+	einfo "Generating caches and CFFI modules ..."
+
+	# Generate sysconfig data
+	local host_gnu_type=$(sh pypy/tool/release/config.guess)
+	local overrides=(
+		HOST_GNU_TYPE "${host_gnu_type:-unknown}"
+		INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}"
+		LIBDIR "${EPREFIX}/usr/$(get_libdir)"
+		TZPATH "${EPREFIX}/usr/share/zoneinfo"
+		WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip"
+	)
+	./pypy${PYVER}-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die
+	local outdir
+	outdir=$(<pybuilddir.txt) || die
+	cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die
+
+	# Generate Grammar and PatternGrammar pickles.
+	./pypy${PYVER}-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
+		import lib2to3.pygram
+		import lib2to3.patcomp
+		lib2to3.patcomp.PatternCompiler()
+	EOF
+
+	# Generate cffi modules
+	# Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py!
+	# (NB: we build CFFI modules first to avoid error log when importing
+	# build_cffi_imports).
+	cffi_targets=(
+		pypy_util blake2/_blake2 sha3/_sha3 ssl
+		audioop syslog pwdgrp resource lzma posixshmem
+		ctypes_test testmultiphase
+	)
+	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${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
+	done
+	# testcapi does not have a "build" script
+	../pypy${PYVER}-c -c "import _testcapi" || die
+
+	# Verify that CFFI module list is up-to-date
+	local expected_cksum=a4138e48
+	local local_cksum=$(
+		../pypy${PYVER}-c - <<-EOF
+			import binascii
+			import json
+			from pypy_tools.build_cffi_imports import cffi_build_scripts as x
+			print("%08x" % (binascii.crc32(json.dumps(x).encode()),))
+		EOF
+	)
+	if [[ ${local_cksum} != ${expected_cksum} ]]; then
+		die "Please verify cffi_targets and update checksum to ${local_cksum}"
+	fi
+
+	# Cleanup temporary objects
+	find \( -name "*_cffi.c" -o -name '*.o' \) -delete || die
+	find -type d -empty -delete || die
+}
+
+src_install() {
+	einfo "Installing PyPy ..."
+	dodir /usr/bin
+	dosym pypy${PYVER}-c-${PYPY_PV} /usr/bin/pypy${PYVER}
+	insinto /usr/lib/pypy${PYVER}
+	# preserve mtimes to avoid obsoleting caches
+	insopts -p
+	doins -r lib-python/3/. lib_pypy/.
+	insinto /usr/include
+	doins -r include/pypy${PYVER}
+
+	# replace copied headers with symlinks
+	for x in "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/*; do
+		dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}"
+	done
+
+	dodoc README.rst
+
+	local dest=/usr/lib/pypy${PYVER}
+	rm -r "${ED}${dest}"/ensurepip/_bundled || die
+	if ! use ensurepip; then
+		rm -r "${ED}${dest}"/ensurepip || die
+	fi
+	if ! use gdbm; then
+		rm -r "${ED}${dest}"/_gdbm* || die
+	fi
+	if ! use sqlite; then
+		rm -r "${ED}${dest}"/sqlite3 \
+			"${ED}${dest}"/_sqlite3* \
+			"${ED}${dest}"/test/test_sqlite.py || die
+	fi
+	if ! use tk; then
+		rm -r "${ED}${dest}"/{idlelib,tkinter} \
+			"${ED}${dest}"/_tkinter \
+			"${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die
+	fi
+	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
+
+	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
+	# temporarily copy to build tree to facilitate module builds
+	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
+
+	einfo "Byte-compiling Python standard library..."
+	# exclude list from CPython Makefile.pre.in
+	"${PYTHON}" -m compileall -j "$(makeopts_jobs)" -o 0 -o 1 -o 2 \
+		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+		--hardlink-dupes -q -f -d "${dest}" "${ED}${dest}" || die
+
+	# remove to avoid collisions
+	rm "${PYTHON}" || die
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/
@ 2024-08-24  6:41 Michał Górny
  0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2024-08-24  6:41 UTC (permalink / raw
  To: gentoo-commits

commit:     57bb0260496173401ea33ad6a9aa54286cc60ea1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 24 06:37:40 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Aug 24 06:41:25 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57bb0260

dev-python/pypy3_9: Bump to 7.3.16_p2

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

 dev-python/pypy3_9/Manifest                 |   1 +
 dev-python/pypy3_9/pypy3_9-7.3.16_p2.ebuild | 211 ++++++++++++++++++++++++++++
 2 files changed, 212 insertions(+)

diff --git a/dev-python/pypy3_9/Manifest b/dev-python/pypy3_9/Manifest
index 6ede3b808949..007ae09b8f73 100644
--- a/dev-python/pypy3_9/Manifest
+++ b/dev-python/pypy3_9/Manifest
@@ -1,3 +1,4 @@
 DIST pypy3.9-gentoo-patches-7.3.16.tar.xz 5764 BLAKE2B 094740bc594bc63648bba997e2a8a8eddd857e6f63594fc3d5f3bca9e74bce101ab56ddf59afd75d62e91c17d89271d7f8b52da6b19adf480dd9fab9f0c6dc2c SHA512 efbe3ac941be19b270336e7b31999114d4334cfd3cc0ab5f2499e41825a51bc7c005e10302114813741772ae0412466c000ab33b64f01d639d5689460f8befcb
 DIST pypy3.9-gentoo-patches-7.3.16_p1.tar.xz 8688 BLAKE2B 8ce6eb88aaf4c6bb53046d819e641836441ba6a5d33aeaabc0cb9081f4de4be9a65997bf31ec1f4cf6fc139eb1d2deae9521d4023f0a166b1755096ef3518c7f SHA512 e6e7d3a95a8acd262f9ecd0741a2ed05efca1e4896ca3607dc63c1f74ce8179b64d0a8134dc378009ac47e1d560431ba60e944af631029262ce4300c90f5b1c1
+DIST pypy3.9-gentoo-patches-7.3.16_p2.tar.xz 11304 BLAKE2B 50c7eaf3263a66e1a9dbad9187fc83959a47a846c69ced71530ddcf853b1bc2227defb8324ee849836af701292c7742c68834f77dbe017a6c9d0c3d9e955f5f2 SHA512 cb0f911cdaf0ef1230e8bf08f9beecd64d25a383b6b0fe47217e3c1eeb0c74dc4a3080cdc4ac7fce38457620d575c408151f46258ac377dfcc38ca0fa4e60791
 DIST pypy3.9-v7.3.16-src.tar.bz2 23686849 BLAKE2B 736b173d8bd6b19785e64827d289feb39e30e93caaef3071a5185cc5cbaab4aed23b9da89e34a464dad0c0d5142db9dc238a1dd221aea299f95bea2e47299a81 SHA512 bd13cddb0b4cab4e200d2eafd8239c76209a49f8e847193c5ed0fe446ca46271446fc762cafd2aa8f410d022bc65abcd48ba7148502b70b901565e187058310d

diff --git a/dev-python/pypy3_9/pypy3_9-7.3.16_p2.ebuild b/dev-python/pypy3_9/pypy3_9-7.3.16_p2.ebuild
new file mode 100644
index 000000000000..cd6b3d3e3ed8
--- /dev/null
+++ b/dev-python/pypy3_9/pypy3_9-7.3.16_p2.ebuild
@@ -0,0 +1,211 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multiprocessing pax-utils toolchain-funcs
+
+PYPY_PV=${PV%_p*}
+PYVER=3.9
+MY_P="pypy${PYVER}-v${PYPY_PV/_}"
+PATCHSET="pypy${PYVER}-gentoo-patches-${PV/_rc/rc}"
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language"
+HOMEPAGE="
+	https://www.pypy.org/
+	https://github.com/pypy/pypy/
+"
+SRC_URI="
+	https://downloads.python.org/pypy/${MY_P}-src.tar.bz2
+	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"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+# also check pypy/interpreter/pycode.py -> pypy_incremental_magic
+SLOT="0/pypy39-pp73-336"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+ensurepip gdbm +jit ncurses sqlite tk"
+# many tests are failing upstream
+# see https://buildbot.pypy.org/summary?branch=py${PYVER}
+RESTRICT="test"
+
+RDEPEND="
+	|| (
+		>=dev-python/${PN}-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?]
+		>=dev-python/${PN}-exe-bin-${PYPY_PV}:${PYPY_PV}
+	)
+	dev-lang/python-exec[python_targets_pypy3(-)]
+	dev-libs/openssl:0=
+	dev-python/gentoo-common
+	ensurepip? ( dev-python/ensurepip-wheels )
+	gdbm? ( sys-libs/gdbm:0= )
+	sqlite? ( dev-db/sqlite:3= )
+	tk? (
+		dev-lang/tk:0=
+		dev-tcltk/tix:0=
+	)
+"
+DEPEND="
+	${RDEPEND}
+"
+
+src_prepare() {
+	local PATCHES=(
+		"${WORKDIR}/${PATCHSET}"
+	)
+	default
+}
+
+src_configure() {
+	tc-export CC
+}
+
+src_compile() {
+	mkdir bin || die
+	# switch to the layout expected for cffi module builds
+	mkdir include/pypy${PYVER} || die
+	# copy over to make sys.prefix happy
+	cp -p "${BROOT}"/usr/bin/pypy${PYVER}-c-${PYPY_PV} pypy${PYVER}-c || die
+	cp -p "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/* include/pypy${PYVER}/ || die
+	# (not installed by pypy-exe)
+	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
+	mv pypy/module/cpyext/include/* include/pypy${PYVER}/ || die
+	mv pypy/module/cpyext/parse/*.h include/pypy${PYVER}/ || die
+	pax-mark m pypy${PYVER}-c
+
+	# verify the subslot
+	local soabi=$(
+		./pypy${PYVER}-c - <<-EOF
+			import importlib.util
+			import sysconfig
+			soabi = sysconfig.get_config_var("SOABI")
+			magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff
+			print(f"{soabi}-{magic}")
+		EOF
+	)
+	[[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
+
+	# Add epython.py to the distribution
+	echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die
+
+	einfo "Generating caches and CFFI modules ..."
+
+	# Generate sysconfig data
+	local host_gnu_type=$(sh pypy/tool/release/config.guess)
+	local overrides=(
+		HOST_GNU_TYPE "${host_gnu_type:-unknown}"
+		INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}"
+		LIBDIR "${EPREFIX}/usr/$(get_libdir)"
+		TZPATH "${EPREFIX}/usr/share/zoneinfo"
+		WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip"
+	)
+	./pypy${PYVER}-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die
+	local outdir
+	outdir=$(<pybuilddir.txt) || die
+	cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die
+
+	# Generate Grammar and PatternGrammar pickles.
+	./pypy${PYVER}-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
+		import lib2to3.pygram
+		import lib2to3.patcomp
+		lib2to3.patcomp.PatternCompiler()
+	EOF
+
+	# Generate cffi modules
+	# Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py!
+	# (NB: we build CFFI modules first to avoid error log when importing
+	# build_cffi_imports).
+	cffi_targets=(
+		pypy_util blake2/_blake2 sha3/_sha3 ssl
+		audioop syslog pwdgrp resource lzma posixshmem
+		ctypes_test testmultiphase
+	)
+	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${PYVER}-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
+	done
+	# testcapi does not have a "build" script
+	../pypy${PYVER}-c -c "import _testcapi" || die
+
+	# Verify that CFFI module list is up-to-date
+	local expected_cksum=a4138e48
+	local local_cksum=$(
+		../pypy${PYVER}-c - <<-EOF
+			import binascii
+			import json
+			from pypy_tools.build_cffi_imports import cffi_build_scripts as x
+			print("%08x" % (binascii.crc32(json.dumps(x).encode()),))
+		EOF
+	)
+	if [[ ${local_cksum} != ${expected_cksum} ]]; then
+		die "Please verify cffi_targets and update checksum to ${local_cksum}"
+	fi
+
+	# Cleanup temporary objects
+	find \( -name "*_cffi.c" -o -name '*.o' \) -delete || die
+	find -type d -empty -delete || die
+}
+
+src_install() {
+	einfo "Installing PyPy ..."
+	dodir /usr/bin
+	dosym pypy${PYVER}-c-${PYPY_PV} /usr/bin/pypy${PYVER}
+	insinto /usr/lib/pypy${PYVER}
+	# preserve mtimes to avoid obsoleting caches
+	insopts -p
+	doins -r lib-python/3/. lib_pypy/.
+	insinto /usr/include
+	doins -r include/pypy${PYVER}
+
+	# replace copied headers with symlinks
+	for x in "${BROOT}"/usr/include/pypy${PYVER}/${PYPY_PV}/*; do
+		dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}"
+	done
+
+	dodoc README.rst
+
+	local dest=/usr/lib/pypy${PYVER}
+	rm -r "${ED}${dest}"/ensurepip/_bundled || die
+	if ! use ensurepip; then
+		rm -r "${ED}${dest}"/ensurepip || die
+	fi
+	if ! use gdbm; then
+		rm -r "${ED}${dest}"/_gdbm* || die
+	fi
+	if ! use sqlite; then
+		rm -r "${ED}${dest}"/sqlite3 \
+			"${ED}${dest}"/_sqlite3* \
+			"${ED}${dest}"/test/test_sqlite.py || die
+	fi
+	if ! use tk; then
+		rm -r "${ED}${dest}"/{idlelib,tkinter} \
+			"${ED}${dest}"/_tkinter \
+			"${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die
+	fi
+	dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED"
+
+	local -x PYTHON=${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}
+	# temporarily copy to build tree to facilitate module builds
+	cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die
+
+	einfo "Byte-compiling Python standard library..."
+	# exclude list from CPython Makefile.pre.in
+	"${PYTHON}" -m compileall -j "$(makeopts_jobs)" -o 0 -o 1 -o 2 \
+		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+		--hardlink-dupes -q -f -d "${dest}" "${ED}${dest}" || die
+
+	# remove to avoid collisions
+	rm "${PYTHON}" || die
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2024-08-24  6:41 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-15 21:24 [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3_9/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2024-08-24  6:41 Michał Górny
2024-08-02 18:41 Michał Górny
2024-04-25  3:39 Michał Górny
2024-04-24 15:08 Michał Górny
2024-02-03 15:02 Michał Górny
2023-12-30 18:32 Michał Górny
2023-12-25 20:26 Michał Górny
2023-12-21  4:16 Michał Górny
2023-12-20 16:55 Michał Górny
2023-12-18 15:59 Michał Górny
2023-11-02 12:58 Michał Górny
2023-10-06 15:08 Michał Górny
2023-09-30  8:27 Michał Górny
2023-08-26 13:32 Michał Górny
2023-08-25  9:14 Michał Górny
2023-07-24 11:33 Michał Górny
2023-07-19 11:00 Michał Górny
2023-06-19  5:14 Michał Górny
2023-06-19  5:14 Michał Górny
2023-06-16 17:03 Michał Górny
2023-05-31 11:42 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox