From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DE4DA158094 for ; Wed, 10 Aug 2022 20:31:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2F633E0E9A; Wed, 10 Aug 2022 20:31:12 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 12A3CE0E9A for ; Wed, 10 Aug 2022 20:31:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E48983412E3 for ; Wed, 10 Aug 2022 20:31:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 34C8C54D for ; Wed, 10 Aug 2022 20:31:09 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1660163466.6c9fa085149f3761b4a913c8fdb613441c29c8d8.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pypy/metadata.xml dev-python/pypy/pypy-7.3.9-r1.ebuild X-VCS-Directories: dev-python/pypy/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 6c9fa085149f3761b4a913c8fdb613441c29c8d8 X-VCS-Branch: master Date: Wed, 10 Aug 2022 20:31:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 49962272-5958-4df5-9b8a-c2d0bb36a449 X-Archives-Hash: c02cb5b7918071bc841753e2d6ffd358 commit: 6c9fa085149f3761b4a913c8fdb613441c29c8d8 Author: Michał Górny gentoo org> AuthorDate: Wed Aug 10 18:16:34 2022 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed Aug 10 20:31:06 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c9fa085 dev-python/pypy: Remove most of stdlib by default Signed-off-by: Michał Górny gentoo.org> dev-python/pypy/metadata.xml | 9 ++ dev-python/pypy/pypy-7.3.9-r1.ebuild | 300 +++++++++++++++++++++++++++++++++++ 2 files changed, 309 insertions(+) diff --git a/dev-python/pypy/metadata.xml b/dev-python/pypy/metadata.xml index efd7c8c21836..786955f8b2f0 100644 --- a/dev-python/pypy/metadata.xml +++ b/dev-python/pypy/metadata.xml @@ -5,4 +5,13 @@ python@gentoo.org Python + + + Install complete stdlib as necessary to use PyPy for general + purpose programs. By default, only a limited subset that is + used when building dev-python/pypy3-exe is + installed. Note that PyPy2.7's stdlib contains multiple + known vulnerabilities. + + diff --git a/dev-python/pypy/pypy-7.3.9-r1.ebuild b/dev-python/pypy/pypy-7.3.9-r1.ebuild new file mode 100644 index 000000000000..ae8f4222bb0c --- /dev/null +++ b/dev-python/pypy/pypy-7.3.9-r1.ebuild @@ -0,0 +1,300 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit pax-utils python-utils-r1 + +PYPY_PV=${PV%_p*} +MY_P=pypy2.7-v${PYPY_PV/_} +PATCHSET="pypy2.7-gentoo-patches-${PV/_rc/rc}" + +DESCRIPTION="A fast, compliant alternative implementation of the Python language" +HOMEPAGE="https://www.pypy.org/" +SRC_URI=" + https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2 + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz +" +S="${WORKDIR}/${MY_P}-src" + +LICENSE="MIT" +# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' +SLOT="0/73" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="bzip2 full-stdlib gdbm +jit ncurses sqlite tk" + +RDEPEND=" + || ( + >=dev-python/pypy-exe-${PYPY_PV}:${PYPY_PV}[bzip2?,ncurses?] + >=dev-python/pypy-exe-bin-${PYPY_PV}:${PYPY_PV} + ) + dev-libs/openssl:0= + gdbm? ( sys-libs/gdbm:0= ) + sqlite? ( dev-db/sqlite:3= ) + tk? ( + dev-lang/tk:0= + dev-tcltk/tix:0= + ) + !/dev/null || die + + cd lib-python/2.7/distutils || die + insinto "${dest}/lib-python/2.7/distutils" + doins -r "${distutils_modules[@]}" + cd - >/dev/null || die + + cd lib_pypy || die + insinto "${dest}/lib_pypy" + doins -r "${lib_pypy_modules[@]}" + cd - >/dev/null || die + fi + + dosym ../lib/pypy2.7/pypy-c /usr/bin/pypy + dodoc README.rst + + local -x EPYTHON=pypy + local -x PYTHON=${ED}${dest}/pypy-c-${PYPY_PV} + # temporarily copy to build tree to facilitate module builds + cp -p "${BROOT}${dest}/pypy-c-${PYPY_PV}" "${PYTHON}" || die + + einfo "Byte-compiling Python standard library..." + python_optimize "${ED}${dest}" + + # remove to avoid collisions + rm "${PYTHON}" || die +}