From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1072348-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id A0F53138334
	for <garchives@archives.gentoo.org>; Fri, 15 Feb 2019 05:17:23 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id BD887E0885;
	Fri, 15 Feb 2019 05:17:22 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 7C5BAE0885
	for <gentoo-commits@lists.gentoo.org>; Fri, 15 Feb 2019 05:17:22 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 4A9B7335C7B
	for <gentoo-commits@lists.gentoo.org>; Fri, 15 Feb 2019 05:17:19 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 89CEF44B
	for <gentoo-commits@lists.gentoo.org>; Fri, 15 Feb 2019 05:17:17 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
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" <mgorny@gentoo.org>
Message-ID: <1550207295.dd20425484ded4388b351570d7a276c59e3c3c94.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy-bin/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-python/pypy-bin/Manifest dev-python/pypy-bin/pypy-bin-7.0.0.ebuild
X-VCS-Directories: dev-python/pypy-bin/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: dd20425484ded4388b351570d7a276c59e3c3c94
X-VCS-Branch: master
Date: Fri, 15 Feb 2019 05:17:17 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 38c0edae-47db-4e2b-850d-3c839412657d
X-Archives-Hash: 4b10114c414cc6aeb41d7d35993697c9

commit:     dd20425484ded4388b351570d7a276c59e3c3c94
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 15 04:59:58 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Feb 15 05:08:15 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd204254

dev-python/pypy-bin: Bump to 7.0.0

Closes: https://bugs.gentoo.org/677398
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pypy-bin/Manifest              |  12 ++
 dev-python/pypy-bin/pypy-bin-7.0.0.ebuild | 204 ++++++++++++++++++++++++++++++
 2 files changed, 216 insertions(+)

diff --git a/dev-python/pypy-bin/Manifest b/dev-python/pypy-bin/Manifest
index 5bd84b6a7da..910b5e2468d 100644
--- a/dev-python/pypy-bin/Manifest
+++ b/dev-python/pypy-bin/Manifest
@@ -23,5 +23,17 @@ DIST pypy-bin-6.0.0-x86+bzip2+ncurses+sse2.tar.lz 5979890 BLAKE2B 8f47c34f88b7f4
 DIST pypy-bin-6.0.0-x86+bzip2+ncurses.ffi7.ossl11.tar.lz 5940234 BLAKE2B ba4133f9c261c7b8d7c3a5c04de61398f48c1d34d146009535c5445dd8abab17e914fa675c6c9f4717cafb1be5ee8defcb6d1ecb20cda60223677bf5c2b22db9 SHA512 afe12fcac3a93b8b139a0cbbc5475edd23eceddf3b6e58e5d425459dbc51056ad10459133adee3f7d282c403e881fa0d4d1f9c30955163e580c87be7e1b7825a
 DIST pypy-bin-6.0.0-x86+bzip2+ncurses.ffi7.tar.lz 5939972 BLAKE2B 86ca6f1dd9f00d993986476fbeb253b2a7efb862dec7c8b90945c32e9418d52460d3d305fd0e182e9351e6de148928cf786f461cb3174601d84f5604ca1ae132 SHA512 4d14693ba0bcf3d6f56c9e8a45959d84ba5aacbccee0a643a8c713569a0e5de1449e726e7c813a93105c8dd145f1be6a7f78eec22bbb5c5a8aba31f15cffdbe5
 DIST pypy-bin-6.0.0-x86+bzip2+ncurses.tar.lz 5941591 BLAKE2B 45a4c150e1403fd5a579c3d452cd09f4954238fff18702c5cafc1b23f12134f07a05c1aa9277b76b5d8c4e1da48d64699a2540feb4000b6bd1c285ab59b6c4a1 SHA512 3a69284917e0c233ac27fd96707b43499a5d9e05da946cad21f89fd605d34483454703887efc1049abeeb1d503800061027794d277123ad874583074203ce3a0
+DIST pypy-bin-7.0.0-amd64+bzip2+jit+libressl+ncurses.tar.lz 13183739 BLAKE2B 41e95be3e48f0b53425ce9777b7bdb998dfbccb054c369cfab9b15f3835649d1520ed6ff6bb746feb96517b608b711678e3efe2cb8b70012c29347cfcbeb144f SHA512 974b438233bb9fbc3d3b9979a4f7591ae9e6b5a36795cd9a86c2a9b45e2288aa478811433b62696e33aaa4f8c9d3579b909554a4bb0a2b53975d01357fdb0b58
+DIST pypy-bin-7.0.0-amd64+bzip2+jit+ncurses.tar.lz 13129901 BLAKE2B 9966e298e25d3a40c78f5d729c61e57c82423dda7415b692179131289bfc64506dc347586b7ef0da3a134398671657d89281e35c217d422a343505492dee0081 SHA512 0c00195abe6481ace527bb0653f6f0df1e3b431246948f76d608dc5ea606a1f7ec9bfc014dff8070047c607648575d29356e44b1768c8fb7d07b50be4feded04
+DIST pypy-bin-7.0.0-amd64+bzip2+libressl+ncurses.tar.lz 7650838 BLAKE2B cded65d6d3791f36f8bb61909555bc85110cbb2550336b2366444217d55ed6c615bbd58d0797048e940bd67dd049df063207bd46858e69c7f1ac70dd6c6eedff SHA512 db2d2aff65662dd1cfa2cf42d9bd588f6d7c6f031608931807435c31b4c2b53277e56b517157e8234b386eab2299c51828980817e3d730d946288571f11ea733
+DIST pypy-bin-7.0.0-amd64+bzip2+ncurses.tar.lz 7652033 BLAKE2B c2a8d54ae2ea6c727ee686d5c2e6b612c940c61ea335596ed8fee0397396a0d7a4344e4e03ebc4f3c50fdf311ea6932b93b7422ad2147c5ea6ec8ac1ff8b7271 SHA512 fc39e427fb1b73136d8786d9f594fa355e8d93cebf01a4f5b319e0506b9d6843ef2332086eca569ff694bfb64a9808eb65c727e96b9c7d998f28cddb35717dda
+DIST pypy-bin-7.0.0-x86+bzip2+jit+libressl+ncurses+sse2.tar.lz 9985530 BLAKE2B da9155481b466ad6f3b28764c01c49fa397a728ec6646727038cccb84fdaac9a5808ed73aecebad7d8e1b436932554e5f65e1078547b96dc82c6e6cc1f4b44b8 SHA512 2c378a47473152e464e2f497f959c1f0bad9f5237d18e83969643e267123d1819c2a551892279800b0b810d6ebea6b0e769f9ee6f2077bee5e92dc3c2c80df3e
+DIST pypy-bin-7.0.0-x86+bzip2+jit+ncurses+sse2.tar.lz 9981851 BLAKE2B 75d89b10e9220c2f8b507529404849d24a88678c0884ce1c8c0254306165c5a6782c4a6efef63228e813a4f42103d7ef33a514dda8726e4ff72c3ff1fbf5f127 SHA512 e09f4f1d7c4e12735d2a4529dc603bcef43c76e97ee6ad7b4505675c7fcdc2bdb3d6550f45b8b731dd7c4f0813ad25a0c503084b4822c44d45e1c6e9aac23171
+DIST pypy-bin-7.0.0-x86+bzip2+libressl+ncurses+sse2.tar.lz 6050854 BLAKE2B a8fb831c82f7056d30b5ad2c7829be82e282008a5840ba32edea97394819845281825ec88885daafc0097bf11e572ea6021249ca424f00d6133ed274b3fc990f SHA512 3fe84c10c7f8e5775137d154dea45aefd2b101acd10da38f70935fd4cd69000d64656a96f1452c76537dd7297ca45fcfdc5be2b383fd7fdd3ce0d4848c6d0a81
+DIST pypy-bin-7.0.0-x86+bzip2+libressl+ncurses.tar.lz 6010259 BLAKE2B e841ff1809424a06b018d8ca219aa57d6bc0942e2bfdae545bed548efbca0d19e84365d5e9d0fd3324904d9ed8c5e50bee5b87ffa9742af7d23af84abd11ce82 SHA512 1f736593a1ae0c49e6929498a655bf778a826cb104908356c1ce13298c36fbdb55d4a8de0e39571d74d9ff3757815e81249b301983d6d3efa8cdd21497781603
+DIST pypy-bin-7.0.0-x86+bzip2+ncurses+sse2.tar.lz 6023604 BLAKE2B 07a218bffe485e6b39bea2f901a2de473ce7f6e334739bcc8d9fc9aff1e83cd2fd72aeb420a61464e69bfd9eb9468ae8401a597e8b8251bbdeae5b5644dc44ac SHA512 e74a868e6e12e266d75feeeddf4df700eeb84be70d6f259efa1a5effb0c9c0fe5d228c16f5015b2b993540f17e3b2f45644f6b1ba0356dfe71b778358983e2a8
+DIST pypy-bin-7.0.0-x86+bzip2+ncurses.tar.lz 6022022 BLAKE2B 26f7e87cdbafafe956e143bc5b6814ac9db2e1a3a53a5dc7c10ed436192645951e2a4966514081df94fb918b871a15b68afc55289e611fa04339591a81d3f90d SHA512 47a8d1ae2c3ba5caf7b0c08c37b01f7ef7dc3b2fd44ad2f61823305e02cdfac551080b80958bc1dfbe738fd5da960f43a37bec318e2805b8bdf90dac4dfab5b9
 DIST pypy2-v6.0.0-src.tar.bz2 19741694 BLAKE2B 55f5000e590613b516b12c3682a658fe6a17fbe264be3d61a81698cdf098b39177cf4355eb3f28980209c7a0e005498201cbad8884e3aa02cc86a228d1552046 SHA512 d3bdcd65fc83f2fda3203a604733fe6765049a17cca2715cd6045dc302a6159b4741a821c53fa4c97acf7297cef4c62e941a6a6eb7f8a253a93a28dcf2aa2ca0
+DIST pypy2.7-v7.0.0-src.tar.bz2 19811330 BLAKE2B 38089896934d79d2b3f5813cc9dae23b0534d9d312871b22336a277d5a15b82d748f66f896558cfdb45a23004944a648436e89ae36fadc107930e7b99963e12b SHA512 7fb5682ee4226af51008f50a81c922e44c231410fe36b7656efa20f22c855ba30a01bc96ee897b4c7a02941d37a405c922b09855977313878e34aaad6bf023dc
 DIST python-gentoo-patches-2.7.14-0.tar.xz 13428 BLAKE2B 0048e48ddaaa4bef08451354fde95a123042880f26dddc9267c7f9a90fd8abb40955e26ee8c9dfc5a1165556bb3e11585b27288e635d42a4000dd3d7654c41ad SHA512 6da5b52065752b54e9215d0f0809c75167dc3690d0e94fa21dd7595626925bc5c1dd065d31b3bd696d7087f3986de145d3a335a29eb7bd77442637a7ec2863c1
+DIST python-gentoo-patches-2.7.15.tar.xz 16208 BLAKE2B 5739c2b3a236d48f8e33f0fe6515bfe7a8f99096f6223b402653988feac2513d37d26b6e40e5e049852f42657358170e468ca60097e0e2294e760787c12ad591 SHA512 687fd008d1d41b1e65ce5417f6f6aba84ffd42f7af44ef97c03a7806b28e6888f8df043a0c15187a8b229cc17642853e6feb25494db97f4d10f8a66f8ebcbcca

diff --git a/dev-python/pypy-bin/pypy-bin-7.0.0.ebuild b/dev-python/pypy-bin/pypy-bin-7.0.0.ebuild
new file mode 100644
index 00000000000..3793bd49daa
--- /dev/null
+++ b/dev-python/pypy-bin/pypy-bin-7.0.0.ebuild
@@ -0,0 +1,204 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit pax-utils python-utils-r1 unpacker
+
+BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}"
+CPY_PATCHSET_VERSION="2.7.15"
+MY_P=pypy2.7-v${PV}
+
+DESCRIPTION="Pre-built version of PyPy"
+HOMEPAGE="http://pypy.org/"
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2
+	https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz
+	amd64? (
+		!libressl? (
+			jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz )
+			!jit? ( ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz )
+		)
+		libressl? (
+			jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+libressl+ncurses.tar.lz )
+			!jit? ( ${BINHOST}/${P}-amd64+bzip2+libressl+ncurses.tar.lz )
+		)
+	)
+	x86? (
+		!libressl? (
+			cpu_flags_x86_sse2? (
+				jit? ( ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.lz )
+				!jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.lz )
+			)
+			!cpu_flags_x86_sse2? (
+				!jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses.tar.lz )
+			)
+		)
+		libressl? (
+			cpu_flags_x86_sse2? (
+				jit? ( ${BINHOST}/${P}-x86+bzip2+jit+libressl+ncurses+sse2.tar.lz )
+				!jit? ( ${BINHOST}/${P}-x86+bzip2+libressl+ncurses+sse2.tar.lz )
+			)
+			!cpu_flags_x86_sse2? (
+				!jit? ( ${BINHOST}/${P}-x86+bzip2+libressl+ncurses.tar.lz )
+			)
+		)
+	)"
+
+# Supported variants
+REQUIRED_USE="x86? ( !cpu_flags_x86_sse2? ( !jit ) )"
+
+LICENSE="MIT"
+# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")'
+# pypy 7.0.0: install directory changed to 'pypy2.7'
+SLOT="0/41-py27"
+KEYWORDS="~amd64 ~x86"
+IUSE="gdbm +jit libressl sqlite cpu_flags_x86_sse2 test tk"
+
+RDEPEND="
+	app-arch/bzip2:0/1
+	dev-libs/expat:0/0
+	dev-libs/libffi:0/7
+	sys-devel/gcc:*
+	sys-libs/glibc
+	sys-libs/ncurses:0/6
+	sys-libs/zlib:0/1
+	gdbm? ( sys-libs/gdbm:0= )
+	!libressl? ( dev-libs/openssl:0/1.1[-bindist] )
+	libressl? ( dev-libs/libressl:0/44 )
+	sqlite? ( dev-db/sqlite:3= )
+	tk? (
+		dev-lang/tk:0=
+		dev-tcltk/tix:0=
+	)
+	!dev-python/pypy:0"
+DEPEND="${RDEPEND}
+	app-arch/lzip
+	app-arch/xz-utils"
+
+S=${WORKDIR}/${MY_P}-src
+
+QA_PREBUILT="
+	usr/lib*/pypy/pypy-c
+	usr/lib*/pypy/libpypy-c.so"
+
+src_prepare() {
+	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
+
+	# apply CPython stdlib patches
+	pushd lib-python/2.7 > /dev/null || die
+	# TODO: cpy turkish locale patch now fixes C code
+	# probably needs better port to pypy, if it is broken there
+	eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch
+	eapply -p2 "${WORKDIR}"/patches/0011-use_pyxml.patch
+	popd > /dev/null || die
+
+	eapply_user
+}
+
+src_compile() {
+	# Tadaam! PyPy compiled!
+	mv "${WORKDIR}"/${P}*/{libpypy-c.so,pypy-c} . || die
+	mv "${WORKDIR}"/${P}*/include/*.h include/ || die
+	# (not installed by pypy)
+	rm pypy/module/cpyext/include/_numpypy/numpy/README || die
+	mv pypy/module/cpyext/include/* include/ || die
+	mv pypy/module/cpyext/parse/*.h include/ || die
+
+	pax-mark m pypy-c libpypy-c.so
+
+	einfo "Generating caches and CFFI modules ..."
+
+	# Generate Grammar and PatternGrammar pickles.
+	./pypy-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
+		|| die "Generation of Grammar and PatternGrammar pickles failed"
+
+	# Generate cffi modules
+	# Please keep in sync with pypy/tool/build_cffi_imports.py!
+#cffi_build_scripts = {
+#    "sqlite3": "_sqlite3_build.py",
+#    "audioop": "_audioop_build.py",
+#    "tk": "_tkinter/tklib_build.py",
+#    "curses": "_curses_build.py" if sys.platform != "win32" else None,
+#    "syslog": "_syslog_build.py" if sys.platform != "win32" else None,
+#    "gdbm": "_gdbm_build.py"  if sys.platform != "win32" else None,
+#    "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None,
+#    "resource": "_resource_build.py" if sys.platform != "win32" else None,
+	cffi_targets=( audioop curses syslog pwdgrp resource )
+	use gdbm && cffi_targets+=( gdbm )
+	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-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
+	done
+
+	# Cleanup temporary objects
+	find -name "_cffi_*.[co]" -delete || die
+	find -type d -empty -delete || die
+}
+
+src_test() {
+	# (unset)
+	local -x PYTHONDONTWRITEBYTECODE=
+
+	local ignored_tests=(
+		# network
+		--ignore=lib-python/2.7/test/test_urllibnet.py
+		--ignore=lib-python/2.7/test/test_urllib2net.py
+		# lots of free space
+		--ignore=lib-python/2.7/test/test_zipfile64.py
+		# no module named 'worker' -- a lot
+		--ignore=lib-python/2.7/test/test_xpickle.py
+	)
+
+	./pypy-c ./pypy/test_all.py --pypy=./pypy-c -vv \
+		"${ignored_tests[@]}" lib-python || die
+}
+
+src_install() {
+	local dest=/usr/lib/pypy2.7
+	einfo "Installing PyPy ..."
+	exeinto "${dest}"
+	doexe pypy-c libpypy-c.so
+	pax-mark m "${ED%/}${dest}/pypy-c" "${ED%/}${dest}/libpypy-c.so"
+	insinto "${dest}"
+	# preserve mtimes to avoid obsoleting caches
+	insopts -p
+	doins -r include lib_pypy lib-python
+	dosym ../lib/pypy2.7/pypy-c /usr/bin/pypy
+	dodoc README.rst
+
+	if ! use gdbm; then
+		rm -r "${ED%/}${dest}"/lib_pypy/gdbm.py \
+			"${ED%/}${dest}"/lib-python/*2.7/test/test_gdbm.py || die
+	fi
+	if ! use sqlite; then
+		rm -r "${ED%/}${dest}"/lib-python/*2.7/sqlite3 \
+			"${ED%/}${dest}"/lib_pypy/_sqlite3.py \
+			"${ED%/}${dest}"/lib-python/*2.7/test/test_sqlite.py || die
+	fi
+	if ! use tk; then
+		rm -r "${ED%/}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \
+			"${ED%/}${dest}"/lib_pypy/_tkinter \
+			"${ED%/}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die
+	fi
+
+	local -x PYTHON=${ED%/}${dest}/pypy-c
+	# we can't use eclass function since PyPy is dumb and always gives
+	# paths relative to the interpreter
+	local PYTHON_SITEDIR=${EPREFIX}/usr/lib/pypy2.7/site-packages
+	python_export pypy EPYTHON
+
+	echo "EPYTHON='${EPYTHON}'" > epython.py || die
+	python_domodule epython.py
+
+	einfo "Byte-compiling Python standard library..."
+
+	# compile the installed modules
+	python_optimize "${ED%/}${dest}"
+}