public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/
@ 2015-08-18 16:34 Justin Lecher
  0 siblings, 0 replies; 17+ messages in thread
From: Justin Lecher @ 2015-08-18 16:34 UTC (permalink / raw
  To: gentoo-commits

commit:     bd9b4c3f9787eb28082595d88427b23c61dd25fd
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 18 16:34:18 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Aug 18 16:34:37 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd9b4c3f

dev-python/pypy3: Backport for fix gcc-4.9

https://bitbucket.org/pypy/pypy/commits/c1abec418acf30bb04891c3249bc12cbe8f48d4a

Bug-Debian: https://bugs.debian.org/771137
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=536920

Package-Manager: portage-2.2.20.1
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 dev-python/pypy3/files/pypy3-2.4.0-gcc-4.9.patch | 26 ++++++++++++++++++++++++
 dev-python/pypy3/pypy3-2.4.0.ebuild              |  4 +++-
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/dev-python/pypy3/files/pypy3-2.4.0-gcc-4.9.patch b/dev-python/pypy3/files/pypy3-2.4.0-gcc-4.9.patch
new file mode 100644
index 0000000..dd3a688
--- /dev/null
+++ b/dev-python/pypy3/files/pypy3-2.4.0-gcc-4.9.patch
@@ -0,0 +1,26 @@
+Description: Expect cmovnb and jnb
+ Fixes an FTBFS since gcc 4.9.2, which is emmiting new operations
+Author: Stefano Rivera <stefanor@debian.org>
+Forwarded: https://bitbucket.org/pypy/pypy/commits/c1abec418acf30bb04891c3249bc12cbe8f48d4a
+Bug-Debian: https://bugs.debian.org/771137
+Last-Update: 2014-11-26
+
+--- a/rpython/translator/c/gcc/trackgcroot.py
++++ b/rpython/translator/c/gcc/trackgcroot.py
+@@ -590,7 +590,7 @@
+ 
+     # The various cmov* operations
+     for name in '''
+-        e ne g ge l le a ae b be p np s ns o no
++        e ne g ge l le a ae b be nb p np s ns o no
+         '''.split():
+         locals()['visit_cmov' + name] = binary_insn
+         locals()['visit_cmov' + name + 'l'] = binary_insn
+@@ -837,6 +837,7 @@
+     visit_jb = conditional_jump
+     visit_jbe = conditional_jump
+     visit_jp = conditional_jump
++    visit_jnb = conditional_jump
+     visit_jnp = conditional_jump
+     visit_js = conditional_jump
+     visit_jns = conditional_jump

diff --git a/dev-python/pypy3/pypy3-2.4.0.ebuild b/dev-python/pypy3/pypy3-2.4.0.ebuild
index eda2f1d..9903c1b 100644
--- a/dev-python/pypy3/pypy3-2.4.0.ebuild
+++ b/dev-python/pypy3/pypy3-2.4.0.ebuild
@@ -70,7 +70,9 @@ pkg_setup() {
 }
 
 src_prepare() {
-	epatch "${FILESDIR}/1.9-scripts-location.patch" \
+	epatch \
+		"${FILESDIR}"/${P}-gcc-4.9.patch \
+		"${FILESDIR}/1.9-scripts-location.patch" \
 		"${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" \
 		"${FILESDIR}"/2.3.1-shared-lib.patch	# 517002
 


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/
@ 2015-12-20 21:13 Michał Górny
  0 siblings, 0 replies; 17+ messages in thread
From: Michał Górny @ 2015-12-20 21:13 UTC (permalink / raw
  To: gentoo-commits

commit:     fd32d95f547b668b9d8fdddf36b35ce35a7edc77
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 20 21:12:42 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Dec 20 21:13:24 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd32d95f

dev-python/pypy3: Add a live ebuild

 dev-python/pypy3/files/2.5.0-shared-lib.patch  |  12 ++
 dev-python/pypy3/files/4.0.0-gentoo-path.patch |  50 ++++++
 dev-python/pypy3/pypy3-9999.ebuild             | 233 +++++++++++++++++++++++++
 3 files changed, 295 insertions(+)

diff --git a/dev-python/pypy3/files/2.5.0-shared-lib.patch b/dev-python/pypy3/files/2.5.0-shared-lib.patch
new file mode 100644
index 0000000..ddd7473
--- /dev/null
+++ b/dev-python/pypy3/files/2.5.0-shared-lib.patch
@@ -0,0 +1,12 @@
+diff -ur pypy-2.5.0-src.orig/rpython/translator/platform/posix.py pypy-2.5.0-src/rpython/translator/platform/posix.py
+--- rpython/translator/platform/posix.py	2015-02-03 05:12:49.000000000 +0800
++++ rpython/translator/platform/posix.py	2015-03-22 07:36:01.420116684 +0800
+@@ -183,7 +183,7 @@
+                    'int main(int argc, char* argv[]) '
+                    '{ return $(PYPY_MAIN_FUNCTION)(argc, argv); }" > $@')
+             m.rule('$(DEFAULT_TARGET)', ['$(TARGET)', 'main.o'],
+-                   '$(CC_LINK) $(LDFLAGS_LINK) main.o -L. -l$(SHARED_IMPORT_LIB) -o $@ $(RPATH_FLAGS)')
++                   '$(CC_LINK) $(LDFLAGS_LINK) main.o -L. -l$(SHARED_IMPORT_LIB) \'-Wl,-rpath,$$ORIGIN\' -o $@')
+ 
+         return m
+ 

diff --git a/dev-python/pypy3/files/4.0.0-gentoo-path.patch b/dev-python/pypy3/files/4.0.0-gentoo-path.patch
new file mode 100644
index 0000000..1c0270d
--- /dev/null
+++ b/dev-python/pypy3/files/4.0.0-gentoo-path.patch
@@ -0,0 +1,50 @@
+From 165e05bbdc93e54411217c0198d0a5cbb9de4e33 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 27 Nov 2015 17:02:42 +0100
+Subject: [PATCH] Gentoo: override paths for system-wide install based on
+ sys.prefix
+
+Override all default distutils install paths to ones suitable for
+system-wide install when sys.prefix indicates we're running the Gentoo
+system-wide install of PyPy with no prefix overrides (e.g. virtualenv).
+
+Fixes: https://bugs.gentoo.org/462306
+Fixes: https://bugs.gentoo.org/465546
+---
+ lib-python/3/distutils/command/install.py | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/lib-python/3/distutils/command/install.py b/lib-python/3/distutils/command/install.py
+index fc43951..fed5218 100644
+--- a/lib-python/3/distutils/command/install.py
++++ b/lib-python/3/distutils/command/install.py
+@@ -90,6 +90,13 @@ INSTALL_SCHEMES = {
+         'scripts': '$base/bin',
+         'data'   : '$base',
+         },
++    'gentoo': {
++        'purelib': '$base/site-packages',
++        'platlib': '$base/site-packages',
++        'headers': '$base/include',
++        'scripts': '@EPREFIX@/usr/bin',
++        'data'   : '@EPREFIX@/usr',
++        },
+     }
+ 
+ # The keys to an installation scheme; if any new types of files are to be
+@@ -476,7 +483,11 @@ class install (Command):
+         # it's the caller's problem if they supply a bad name!
+         if (hasattr(sys, 'pypy_version_info') and
+             not name.endswith(('_user', '_home'))):
+-            name = 'pypy'
++            if self.install_base == os.path.normpath('@EPREFIX@/usr/@libdir@/pypy'):
++                # override paths for system-wide install
++                name = 'gentoo'
++            else:
++                name = 'pypy'
+         scheme = INSTALL_SCHEMES[name]
+         for key in SCHEME_KEYS:
+             attrname = 'install_' + key
+-- 
+2.6.3
+

diff --git a/dev-python/pypy3/pypy3-9999.ebuild b/dev-python/pypy3/pypy3-9999.ebuild
new file mode 100644
index 0000000..a335b0f
--- /dev/null
+++ b/dev-python/pypy3/pypy3-9999.ebuild
@@ -0,0 +1,233 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# pypy3 needs to be built using python 2
+PYTHON_COMPAT=( python2_7 pypy )
+EHG_PROJECT="pypy"
+EHG_REPO_URI="https://bitbucket.org/pypy/pypy"
+EHG_REVISION="py3k"
+inherit check-reqs eutils mercurial multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python language"
+HOMEPAGE="http://pypy.org/"
+SRC_URI=""
+
+LICENSE="MIT"
+SLOT="0/$(get_version_component_range 1-2 ${PV})"
+KEYWORDS=""
+IUSE="bzip2 gdbm +jit low-memory ncurses sandbox shadowstack sqlite cpu_flags_x86_sse2 test tk"
+
+RDEPEND=">=sys-libs/zlib-1.1.3:0=
+	virtual/libffi:0=
+	virtual/libintl:0=
+	dev-libs/expat:0=
+	dev-libs/openssl:0=[-bindist]
+	bzip2? ( app-arch/bzip2:0= )
+	gdbm? ( sys-libs/gdbm:0= )
+	ncurses? ( sys-libs/ncurses:0= )
+	sqlite? ( dev-db/sqlite:3= )
+	tk? (
+		dev-lang/tk:0=
+		dev-tcltk/tix:0=
+	)
+	!dev-python/pypy3-bin:0"
+DEPEND="${RDEPEND}
+	low-memory? ( virtual/pypy:0 )
+	!low-memory? ( ${PYTHON_DEPS} )"
+PDEPEND="app-admin/python-updater"
+
+S="${WORKDIR}/${P}-src"
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		if use low-memory; then
+			CHECKREQS_MEMORY="1750M"
+			use amd64 && CHECKREQS_MEMORY="3500M"
+		else
+			CHECKREQS_MEMORY="3G"
+			use amd64 && CHECKREQS_MEMORY="6G"
+		fi
+
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		pkg_pretend
+
+		# unset to allow forcing pypy below :)
+		use low-memory && local EPYTHON=
+		if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
+			einfo "Using PyPy to perform the translation."
+			local EPYTHON=pypy
+		else
+			einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
+			einfo "recommends using PyPy for that. If you wish to do so, please install"
+			einfo "virtual/pypy and ensure that EPYTHON variable is unset."
+		fi
+
+		python-any-r1_pkg_setup
+	fi
+}
+
+src_unpack() {
+	default
+	mercurial_src_unpack
+}
+
+src_prepare() {
+	epatch "${FILESDIR}/4.0.0-gentoo-path.patch" \
+		"${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" \
+		"${FILESDIR}"/2.5.0-shared-lib.patch	# 517002
+
+	sed -e "s^@EPREFIX@^${EPREFIX}^" \
+		-e "s^@libdir@^$(get_libdir)^" \
+		-i lib-python/3/distutils/command/install.py || die
+
+	epatch_user
+}
+
+src_compile() {
+	tc-export CC
+
+	local jit_backend
+	if use jit; then
+		jit_backend='--jit-backend='
+
+		# We only need the explicit sse2 switch for x86.
+		# On other arches we can rely on autodetection which uses
+		# compiler macros. Plus, --jit-backend= doesn't accept all
+		# the modern values...
+
+		if use x86; then
+			if use cpu_flags_x86_sse2; then
+				jit_backend+=x86
+			else
+				jit_backend+=x86-without-sse2
+			fi
+		else
+			jit_backend+=auto
+		fi
+	fi
+
+	local args=(
+		--shared
+		$(usex jit -Ojit -O2)
+		$(usex shadowstack --gcrootfinder=shadowstack '')
+		$(usex sandbox --sandbox '')
+
+		${jit_backend}
+		--make-jobs=$(makeopts_jobs)
+
+		pypy/goal/targetpypystandalone
+	)
+
+	# Avoid linking against libraries disabled by use flags
+	local opts=(
+		bzip2:bz2
+		ncurses:_minimal_curses
+	)
+
+	local opt
+	for opt in "${opts[@]}"; do
+		local flag=${opt%:*}
+		local mod=${opt#*:}
+
+		args+=(
+			$(usex ${flag} --withmod --withoutmod)-${mod}
+		)
+	done
+
+	local interp=( "${PYTHON}" )
+	if use low-memory; then
+		interp=( env PYPY_GC_MAX_DELTA=200MB
+			"${PYTHON}" --jit loop_longevity=300 )
+	fi
+
+	set -- "${interp[@]}" rpython/bin/rpython --batch "${args[@]}"
+	echo -e "\033[1m${@}\033[0m"
+	"${@}" || die "compile error"
+
+	#use doc && emake -C pypy/doc/ html
+	pax-mark m "${ED%/}${INSDESTTREE}/pypy-c"
+}
+
+src_install() {
+	einfo "Installing PyPy ..."
+	insinto "/usr/$(get_libdir)/pypy3"
+	doins -r include lib_pypy lib-python pypy-c libpypy-c.so
+	fperms a+x ${INSDESTTREE}/pypy-c ${INSDESTTREE}/libpypy-c.so
+	pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" "${ED%/}${INSDESTTREE}/libpypy-c.so"
+	dosym ../$(get_libdir)/pypy3/pypy-c /usr/bin/pypy3
+	dodoc README.rst
+
+	if ! use gdbm; then
+		rm -r "${ED%/}${INSDESTTREE}"/lib_pypy/gdbm.py \
+			"${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_gdbm.py || die
+	fi
+	if ! use sqlite; then
+		rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/sqlite3 \
+			"${ED%/}${INSDESTTREE}"/lib_pypy/_sqlite3.py \
+			"${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_sqlite.py || die
+	fi
+	if ! use tk; then
+		rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/{idlelib,tkinter} \
+			"${ED%/}${INSDESTTREE}"/lib_pypy/_tkinter \
+			"${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
+	fi
+
+	# Install docs
+	#use doc && dohtml -r pypy/doc/_build/html/
+
+	einfo "Generating caches and byte-compiling ..."
+
+	local -x PYTHON=${ED%/}${INSDESTTREE}/pypy-c
+	local -x LD_LIBRARY_PATH="${ED%/}${INSDESTTREE}"
+	# we can't use eclass function since PyPy is dumb and always gives
+	# paths relative to the interpreter
+	local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages
+	python_export pypy3 EPYTHON
+
+	echo "EPYTHON='${EPYTHON}'" > epython.py || die
+	python_domodule epython.py
+
+	# Generate Grammar and PatternGrammar pickles.
+	"${PYTHON}" -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,
+	cffi_targets=( audioop syslog pwdgrp )
+	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 "${ED%/}${INSDESTTREE}"/lib_pypy || die
+	for t in "${cffi_targets[@]}"; do
+		# tkinter doesn't work via -m
+		"${PYTHON}" "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
+	done
+
+	# Cleanup temporary objects
+	find "${ED%/}${INSDESTTREE}" -name "_cffi_*.[co]" -delete || die
+	find "${ED%/}${INSDESTTREE}" -type d -empty -delete || die
+
+	# compile the installed modules
+	python_optimize "${ED%/}${INSDESTTREE}"
+}


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

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

commit:     6bf196ac851d5427e020ceb9b79cbb40ea0ecba4
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  6 22:42:07 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Feb  6 22:45:07 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6bf196ac

dev-python/pypy3: Apply fix for ncurses-6, #564454

 dev-python/pypy3/files/2.4.0-ncurses6.patch |  34 ++++
 dev-python/pypy3/pypy3-2.4.0-r1.ebuild      | 232 ++++++++++++++++++++++++++++
 2 files changed, 266 insertions(+)

diff --git a/dev-python/pypy3/files/2.4.0-ncurses6.patch b/dev-python/pypy3/files/2.4.0-ncurses6.patch
new file mode 100644
index 0000000..63a450f
--- /dev/null
+++ b/dev-python/pypy3/files/2.4.0-ncurses6.patch
@@ -0,0 +1,34 @@
+Patch by Vadim A. Misbakh-Soloviov (mva)
+https://bugs.gentoo.org/show_bug.cgi?id=564454
+
+--- lib_pypy/_curses.py.old     2016-01-18 19:13:00.241886442 +0000
++++ lib_pypy/_curses.py 2016-01-18 19:26:01.061885605 +0000
+@@ -1,6 +1,7 @@
+ """Reimplementation of the standard extension module '_curses' using cffi."""
+
+ import sys
++import platform
+ if sys.platform == 'win32':
+     #This module does not exist in windows
+     raise ImportError('No module named _curses')
+@@ -10,12 +11,18 @@
+
+ ffi = FFI()
+
++# Monkeypatch to make it build against ncurses-6.
++# Inspired by https://goo.gl/xvjQcd
++_type = "uint32_t"
++if platform.machine() == "x86_64":
++    _type = "unsigned"
++
+ ffi.cdef("""
+ typedef ... WINDOW;
+ typedef ... SCREEN;
+-typedef unsigned long mmask_t;
++typedef """+_type+""" mmask_t;
+ typedef unsigned char bool;
+-typedef unsigned long chtype;
++typedef """+_type+""" chtype;
+ typedef chtype attr_t;
+
+ typedef struct

diff --git a/dev-python/pypy3/pypy3-2.4.0-r1.ebuild b/dev-python/pypy3/pypy3-2.4.0-r1.ebuild
new file mode 100644
index 0000000..e555175
--- /dev/null
+++ b/dev-python/pypy3/pypy3-2.4.0-r1.ebuild
@@ -0,0 +1,232 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# pypy3 needs to be built using python 2
+PYTHON_COMPAT=( python2_7 pypy )
+inherit check-reqs eutils multilib multiprocessing pax-utils \
+	python-any-r1 toolchain-funcs versionator
+
+DESCRIPTION="A fast, compliant alternative implementation of Python 3"
+HOMEPAGE="http://pypy.org/"
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${P}-src.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0/$(get_version_component_range 1-2 ${PV})"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox +shadowstack sqlite cpu_flags_x86_sse2 tk"
+
+RDEPEND=">=sys-libs/zlib-1.1.3:0=
+	virtual/libffi:0=
+	virtual/libintl:0=
+	dev-libs/expat:0=
+	!libressl? ( dev-libs/openssl:0= )
+	libressl? ( dev-libs/libressl:= )
+	bzip2? ( app-arch/bzip2:0= )
+	gdbm? ( sys-libs/gdbm:0= )
+	ncurses? ( >=sys-libs/ncurses-6.0:0= )
+	sqlite? ( dev-db/sqlite:3= )
+	tk? (
+		dev-lang/tk:0=
+		dev-tcltk/tix:0=
+	)
+	!dev-python/pypy3-bin:0"
+DEPEND="${RDEPEND}
+	low-memory? ( virtual/pypy:0 )
+	!low-memory? ( ${PYTHON_DEPS} )"
+#	doc? ( dev-python/sphinx )
+PDEPEND="app-admin/python-updater"
+
+S="${WORKDIR}/${P}-src"
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		if use low-memory; then
+			CHECKREQS_MEMORY="1750M"
+			use amd64 && CHECKREQS_MEMORY="3500M"
+		else
+			CHECKREQS_MEMORY="3G"
+			use amd64 && CHECKREQS_MEMORY="6G"
+		fi
+	fi
+
+	check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		pkg_pretend
+
+		# unset to allow forcing pypy below :)
+		use low-memory && local EPYTHON=
+		if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
+			einfo "Using PyPy to perform the translation."
+			local EPYTHON=pypy
+		else
+			einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
+			einfo "recommends using PyPy for that. If you wish to do so, please install"
+			einfo "virtual/pypy and ensure that EPYTHON variable is unset."
+		fi
+
+		python-any-r1_pkg_setup
+	fi
+}
+
+src_prepare() {
+	epatch \
+		"${FILESDIR}"/${P}-gcc-4.9.patch \
+		"${FILESDIR}/1.9-scripts-location.patch" \
+		"${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" \
+		"${FILESDIR}"/2.3.1-shared-lib.patch	# 517002
+	epatch "${FILESDIR}/2.4.0-ncurses6.patch"
+	epatch "${FILESDIR}"/${PN}-2.4.0-libressl.patch
+
+	epatch_user
+}
+
+src_compile() {
+	tc-export CC
+
+	local jit_backend
+	if use jit; then
+		jit_backend='--jit-backend='
+
+		# We only need the explicit sse2 switch for x86.
+		# On other arches we can rely on autodetection which uses
+		# compiler macros. Plus, --jit-backend= doesn't accept all
+		# the modern values...
+
+		if use x86; then
+			if use cpu_flags_x86_sse2; then
+				jit_backend+=x86
+			else
+				jit_backend+=x86-without-sse2
+			fi
+		else
+			jit_backend+=auto
+		fi
+	fi
+
+	local args=(
+		--shared
+		$(usex jit -Ojit -O2)
+		$(usex shadowstack --gcrootfinder=shadowstack '')
+		$(usex sandbox --sandbox '')
+
+		${jit_backend}
+		--make-jobs=$(makeopts_jobs)
+
+		pypy/goal/targetpypystandalone
+	)
+
+	# Avoid linking against libraries disabled by use flags
+	local opts=(
+		bzip2:bz2
+		ncurses:_minimal_curses
+	)
+
+	local opt
+	for opt in "${opts[@]}"; do
+		local flag=${opt%:*}
+		local mod=${opt#*:}
+
+		args+=(
+			$(usex ${flag} --withmod --withoutmod)-${mod}
+		)
+	done
+
+	local interp=( "${PYTHON}" )
+	if use low-memory; then
+		interp=( env PYPY_GC_MAX_DELTA=200MB
+			"${PYTHON}" --jit loop_longevity=300 )
+	fi
+
+	set -- "${interp[@]}" rpython/bin/rpython --batch "${args[@]}"
+	echo -e "\033[1m${@}\033[0m"
+	"${@}" || die "compile error"
+
+	# Exception occurred:
+	#  File "/tmp/1/pypy3-2.4.0-src/pypy/config/makerestdoc.py", line 199, in config_role
+	#    assert txt.check()
+	# AssertionError
+	#use doc && emake -C pypy/doc/ html
+	pax-mark m "${ED%/}${INSDESTTREE}/pypy-c"
+}
+
+src_test() {
+	# (unset)
+	local -x PYTHONDONTWRITEBYTECODE
+
+	# Test runner requires Python 2 too. However, it spawns PyPy3
+	# internally so that we end up testing the correct interpreter.
+	"${PYTHON}" ./pypy/test_all.py --pypy=./pypy-c lib-python || die
+}
+
+src_install() {
+	einfo "Installing PyPy ..."
+	insinto "/usr/$(get_libdir)/pypy3"
+	doins -r include lib_pypy lib-python pypy-c libpypy-c.so
+	fperms a+x ${INSDESTTREE}/pypy-c ${INSDESTTREE}/libpypy-c.so
+	pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" "${ED%/}${INSDESTTREE}/libpypy-c.so"
+	dosym ../$(get_libdir)/pypy3/pypy-c /usr/bin/pypy3
+	dodoc README.rst
+
+	if ! use gdbm; then
+		rm -r "${ED%/}${INSDESTTREE}"/lib_pypy/gdbm.py \
+			"${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_gdbm.py || die
+	fi
+	if ! use sqlite; then
+		rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/sqlite3 \
+			"${ED%/}${INSDESTTREE}"/lib_pypy/_sqlite3.py \
+			"${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_sqlite.py || die
+	fi
+	if ! use tk; then
+		rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/{idlelib,tkinter} \
+			"${ED%/}${INSDESTTREE}"/lib_pypy/_tkinter \
+			"${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
+	fi
+
+	# Install docs
+	#use doc && dohtml -r pypy/doc/_build/html/
+
+	einfo "Generating caches and byte-compiling ..."
+
+	local -x PYTHON=${ED%/}${INSDESTTREE}/pypy-c
+	local -x LD_LIBRARY_PATH="${ED%/}${INSDESTTREE}"
+	# we can't use eclass function since PyPy is dumb and always gives
+	# paths relative to the interpreter
+	local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages
+	python_export pypy3 EPYTHON
+
+	echo "EPYTHON='${EPYTHON}'" > epython.py || die
+	python_domodule epython.py
+
+	# Generate Grammar and PatternGrammar pickles.
+	"${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
+		|| die "Generation of Grammar and PatternGrammar pickles failed"
+
+	# Generate cffi cache
+	# Please keep in sync with pypy/tool/release/package.py!
+	"${PYTHON}" -c "import syslog" || die "Failed to import syslog (cffi)"
+	if use gdbm; then
+		"${PYTHON}" -c "import _gdbm" || die "Failed to import gdbm (cffi)"
+	fi
+	if use ncurses; then
+		"${PYTHON}" -c "import _curses" || die "Failed to import _curses (cffi)"
+	fi
+	if use sqlite; then
+		"${PYTHON}" -c "import _sqlite3" || die "Failed to import _sqlite3 (cffi)"
+	fi
+	if use tk; then
+		"${PYTHON}" -c "import _tkinter" || die "Failed to import _tkinter (cffi)"
+	fi
+
+	# Cleanup temporary objects
+	find "${ED%/}${INSDESTTREE}" -name "_cffi_*.[co]" -delete || die
+	find "${ED%/}${INSDESTTREE}" -type d -empty -delete || die
+
+	# compile the installed modules
+	python_optimize "${ED%/}${INSDESTTREE}"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/
@ 2016-03-03 10:47 Michał Górny
  0 siblings, 0 replies; 17+ messages in thread
From: Michał Górny @ 2016-03-03 10:47 UTC (permalink / raw
  To: gentoo-commits

commit:     83eb744d8b60b3c911902999a40c0479823c271b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  3 09:48:00 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Mar  3 10:47:37 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83eb744d

dev-python/pypy3: Sync between release and live ebuild

 .../pypy3/files/2.4.0-21_all_distutils_c++.patch   | 251 +++++++++++++++++++++
 dev-python/pypy3/pypy3-2.4.0-r2.ebuild             |   9 +-
 dev-python/pypy3/pypy3-9999.ebuild                 |  10 +-
 3 files changed, 264 insertions(+), 6 deletions(-)

diff --git a/dev-python/pypy3/files/2.4.0-21_all_distutils_c++.patch b/dev-python/pypy3/files/2.4.0-21_all_distutils_c++.patch
new file mode 100644
index 0000000..90525d5
--- /dev/null
+++ b/dev-python/pypy3/files/2.4.0-21_all_distutils_c++.patch
@@ -0,0 +1,251 @@
+http://bugs.python.org/issue1222585
+
+--- Lib/distutils/cygwinccompiler.py
++++ Lib/distutils/cygwinccompiler.py
+@@ -136,9 +136,13 @@
+         self.set_executables(compiler='gcc -mcygwin -O -Wall',
+                              compiler_so='gcc -mcygwin -mdll -O -Wall',
+                              compiler_cxx='g++ -mcygwin -O -Wall',
++                             compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
+                              linker_exe='gcc -mcygwin',
+                              linker_so=('%s -mcygwin %s' %
+-                                        (self.linker_dll, shared_option)))
++                                        (self.linker_dll, shared_option)),
++                             linker_exe_cxx='g++ -mcygwin',
++                             linker_so_cxx=('%s -mcygwin %s' %
++                                            (self.linker_dll, shared_option)))
+ 
+         # cygwin and mingw32 need different sets of libraries
+         if self.gcc_version == "2.91.57":
+@@ -162,8 +166,12 @@
+                 raise CompileError(msg)
+         else: # for other files use the C-compiler
+             try:
+-                self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
+-                           extra_postargs)
++                if self.detect_language(src) == 'c++':
++                    self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
++                               extra_postargs)
++                else:
++                    self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
++                               extra_postargs)
+             except DistutilsExecError as msg:
+                 raise CompileError(msg)
+ 
+@@ -294,10 +302,15 @@
+         self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
+                              compiler_so='gcc -mno-cygwin -mdll -O -Wall',
+                              compiler_cxx='g++ -mno-cygwin -O -Wall',
++                             compiler_so_cxx='g++ -mno-cygwin -mdll -O -Wall',
+                              linker_exe='gcc -mno-cygwin',
+                              linker_so='%s -mno-cygwin %s %s'
+                                         % (self.linker_dll, shared_option,
+-                                           entry_point))
++                                           entry_point),
++                             linker_exe_cxx='g++ -mno-cygwin',
++                             linker_so_cxx='%s -mno-cygwin %s %s'
++                                            % (self.linker_dll, shared_option,
++                                               entry_point))
+         # Maybe we should also append -mthreads, but then the finished
+         # dlls need another dll (mingwm10.dll see Mingw32 docs)
+         # (-mthreads: Support thread-safe exception handling on `Mingw32')
+--- Lib/distutils/emxccompiler.py
++++ Lib/distutils/emxccompiler.py
+@@ -63,8 +63,12 @@
+         # XXX optimization, warnings etc. should be customizable.
+         self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
+                              compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
++                             compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
++                             compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
+                              linker_exe='gcc -Zomf -Zmt -Zcrtdll',
+-                             linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')
++                             linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll',
++                             linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll',
++                             linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll')
+ 
+         # want the gcc library statically linked (so that we don't have
+         # to distribute a version dependent on the compiler we have)
+@@ -81,8 +85,12 @@
+                 raise CompileError(msg)
+         else: # for other files use the C-compiler
+             try:
+-                self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
+-                           extra_postargs)
++                if self.detect_language(src) == 'c++':
++                    self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
++                               extra_postargs)
++                else:
++                    self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
++                               extra_postargs)
+             except DistutilsExecError as msg:
+                 raise CompileError(msg)
+ 
+--- Lib/distutils/sysconfig_cpython.py
++++ Lib/distutils/sysconfig_cpython.py
+@@ -170,9 +170,12 @@
+                 _osx_support.customize_compiler(_config_vars)
+                 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
+ 
+-        (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
+-            get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
+-                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
++        (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
++            get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
++                            'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
++
++        cflags = ''
++        cxxflags = ''
+ 
+         newcc = None
+         if 'CC' in os.environ:
+@@ -181,19 +184,27 @@
+             cxx = os.environ['CXX']
+         if 'LDSHARED' in os.environ:
+             ldshared = os.environ['LDSHARED']
++        if 'LDCXXSHARED' in os.environ:
++            ldcxxshared = os.environ['LDCXXSHARED']
+         if 'CPP' in os.environ:
+             cpp = os.environ['CPP']
+         else:
+             cpp = cc + " -E"           # not always
+         if 'LDFLAGS' in os.environ:
+             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
+         if 'CFLAGS' in os.environ:
+-            cflags = opt + ' ' + os.environ['CFLAGS']
++            cflags = os.environ['CFLAGS']
+             ldshared = ldshared + ' ' + os.environ['CFLAGS']
++        if 'CXXFLAGS' in os.environ:
++            cxxflags = os.environ['CXXFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
+         if 'CPPFLAGS' in os.environ:
+             cpp = cpp + ' ' + os.environ['CPPFLAGS']
+             cflags = cflags + ' ' + os.environ['CPPFLAGS']
++            cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
+             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
+         if 'AR' in os.environ:
+             ar = os.environ['AR']
+         if 'ARFLAGS' in os.environ:
+@@ -202,13 +213,17 @@
+             archiver = ar + ' ' + ar_flags
+ 
+         cc_cmd = cc + ' ' + cflags
++        cxx_cmd = cxx + ' ' + cxxflags
+         compiler.set_executables(
+             preprocessor=cpp,
+             compiler=cc_cmd,
+             compiler_so=cc_cmd + ' ' + ccshared,
+-            compiler_cxx=cxx,
++            compiler_cxx=cxx_cmd,
++            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
+             linker_so=ldshared,
+             linker_exe=cc,
++            linker_so_cxx=ldcxxshared,
++            linker_exe_cxx=cxx,
+             archiver=archiver)
+ 
+         compiler.shared_lib_extension = shlib_suffix
+--- Lib/distutils/unixccompiler.py
++++ Lib/distutils/unixccompiler.py
+@@ -52,14 +52,17 @@
+     # are pretty generic; they will probably have to be set by an outsider
+     # (eg. using information discovered by the sysconfig about building
+     # Python extensions).
+-    executables = {'preprocessor' : None,
+-                   'compiler'     : ["cc"],
+-                   'compiler_so'  : ["cc"],
+-                   'compiler_cxx' : ["cc"],
+-                   'linker_so'    : ["cc", "-shared"],
+-                   'linker_exe'   : ["cc"],
+-                   'archiver'     : ["ar", "-cr"],
+-                   'ranlib'       : None,
++    executables = {'preprocessor'    : None,
++                   'compiler'        : ["cc"],
++                   'compiler_so'     : ["cc"],
++                   'compiler_cxx'    : ["c++"],
++                   'compiler_so_cxx' : ["c++"],
++                   'linker_so'       : ["cc", "-shared"],
++                   'linker_exe'      : ["cc"],
++                   'linker_so_cxx'   : ["c++", "-shared"],
++                   'linker_exe_cxx'  : ["c++"],
++                   'archiver'        : ["ar", "-cr"],
++                   'ranlib'          : None,
+                   }
+ 
+     if sys.platform[:6] == "darwin":
+@@ -108,12 +111,19 @@
+ 
+     def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
+         compiler_so = self.compiler_so
++        compiler_so_cxx = self.compiler_so_cxx
+         if sys.platform == 'darwin':
+             compiler_so = _osx_support.compiler_fixup(compiler_so,
+                                                     cc_args + extra_postargs)
++            compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
++                                                    cc_args + extra_postargs)
+         try:
+-            self.spawn(compiler_so + cc_args + [src, '-o', obj] +
+-                       extra_postargs)
++            if self.detect_language(src) == 'c++':
++                self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
++                           extra_postargs)
++            else:
++                self.spawn(compiler_so + cc_args + [src, '-o', obj] +
++                           extra_postargs)
+         except DistutilsExecError as msg:
+             raise CompileError(msg)
+ 
+@@ -171,22 +181,16 @@
+                 ld_args.extend(extra_postargs)
+             self.mkpath(os.path.dirname(output_filename))
+             try:
+-                if target_desc == CCompiler.EXECUTABLE:
+-                    linker = self.linker_exe[:]
++                if target_lang == "c++":
++                    if target_desc == CCompiler.EXECUTABLE:
++                        linker = self.linker_exe_cxx[:]
++                    else:
++                        linker = self.linker_so_cxx[:]
+                 else:
+-                    linker = self.linker_so[:]
+-                if target_lang == "c++" and self.compiler_cxx:
+-                    # skip over environment variable settings if /usr/bin/env
+-                    # is used to set up the linker's environment.
+-                    # This is needed on OSX. Note: this assumes that the
+-                    # normal and C++ compiler have the same environment
+-                    # settings.
+-                    i = 0
+-                    if os.path.basename(linker[0]) == "env":
+-                        i = 1
+-                        while '=' in linker[i]:
+-                            i += 1
+-                    linker[i] = self.compiler_cxx[i]
++                    if target_desc == CCompiler.EXECUTABLE:
++                        linker = self.linker_exe[:]
++                    else:
++                        linker = self.linker_so[:]
+ 
+                 if sys.platform == 'darwin':
+                     linker = _osx_support.compiler_fixup(linker, ld_args)
+--- Lib/_osx_support.py
++++ Lib/_osx_support.py
+@@ -14,13 +14,13 @@
+ # configuration variables that may contain universal build flags,
+ # like "-arch" or "-isdkroot", that may need customization for
+ # the user environment
+-_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
+-                            'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
+-                            'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
+-                            'PY_CORE_CFLAGS')
++_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS',
++                          'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED',
++                          'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS',
++                          'PY_CPPFLAGS', 'PY_CORE_CFLAGS')
+ 
+ # configuration variables that may contain compiler calls
+-_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX')
++_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX')
+ 
+ # prefix added to original configuration variable names
+ _INITPRE = '_OSX_SUPPORT_INITIAL_'

diff --git a/dev-python/pypy3/pypy3-2.4.0-r2.ebuild b/dev-python/pypy3/pypy3-2.4.0-r2.ebuild
index 87a1a3d..446c8d6 100644
--- a/dev-python/pypy3/pypy3-2.4.0-r2.ebuild
+++ b/dev-python/pypy3/pypy3-2.4.0-r2.ebuild
@@ -50,9 +50,9 @@ pkg_pretend() {
 			CHECKREQS_MEMORY="3G"
 			use amd64 && CHECKREQS_MEMORY="6G"
 		fi
-	fi
 
-	check-reqs_pkg_pretend
+		check-reqs_pkg_pretend
+	fi
 }
 
 pkg_setup() {
@@ -87,6 +87,11 @@ src_prepare() {
 		-e "s^@libdir@^$(get_libdir)^" \
 		-i lib-python/3/distutils/command/install.py || die
 
+	# apply CPython stdlib patches
+	pushd lib-python/3 > /dev/null || die
+	epatch "${FILESDIR}"/2.4.0-21_all_distutils_c++.patch
+	popd > /dev/null || die
+
 	epatch_user
 }
 

diff --git a/dev-python/pypy3/pypy3-9999.ebuild b/dev-python/pypy3/pypy3-9999.ebuild
index 8050779..5f1b62c 100644
--- a/dev-python/pypy3/pypy3-9999.ebuild
+++ b/dev-python/pypy3/pypy3-9999.ebuild
@@ -9,22 +9,24 @@ PYTHON_COMPAT=( python2_7 pypy )
 EHG_PROJECT="pypy"
 EHG_REPO_URI="https://bitbucket.org/pypy/pypy"
 EHG_REVISION="py3k"
-inherit check-reqs eutils mercurial multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator
+inherit check-reqs eutils mercurial multilib multiprocessing pax-utils \
+	python-any-r1 toolchain-funcs versionator
 
-DESCRIPTION="A fast, compliant alternative implementation of the Python language"
+DESCRIPTION="A fast, compliant alternative implementation of Python 3"
 HOMEPAGE="http://pypy.org/"
 SRC_URI=""
 
 LICENSE="MIT"
 SLOT="0/$(get_version_component_range 1-2 ${PV})"
 KEYWORDS=""
-IUSE="bzip2 gdbm +jit low-memory ncurses sandbox +shadowstack sqlite cpu_flags_x86_sse2 test tk"
+IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox +shadowstack sqlite cpu_flags_x86_sse2 tk"
 
 RDEPEND=">=sys-libs/zlib-1.1.3:0=
 	virtual/libffi:0=
 	virtual/libintl:0=
 	dev-libs/expat:0=
-	dev-libs/openssl:0=[-bindist]
+	!libressl? ( dev-libs/openssl:0= )
+	libressl? ( dev-libs/libressl:= )
 	bzip2? ( app-arch/bzip2:0= )
 	gdbm? ( sys-libs/gdbm:0= )
 	ncurses? ( sys-libs/ncurses:0= )


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/
@ 2016-05-05  9:14 Patrice Clement
  0 siblings, 0 replies; 17+ messages in thread
From: Patrice Clement @ 2016-05-05  9:14 UTC (permalink / raw
  To: gentoo-commits

commit:     b5f1e9968e573009453180799b1156a37b40e6b8
Author:     PPed72 <paolo.pedroni <AT> iol <DOT> it>
AuthorDate: Fri Apr 22 15:34:22 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Thu May  5 08:59:09 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5f1e996

dev-python/pypy3: fix regression in tkinter

Gentoo-Bug: https://bugs.gentoo.org/533384
Closes: https://github.com/gentoo/gentoo/pull/1326

Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 .../files/pypy3-2.4.0-fix-tkinter-regression.patch | 74 ++++++++++++++++++++++
 dev-python/pypy3/pypy3-2.4.0-r2.ebuild             |  1 +
 2 files changed, 75 insertions(+)

diff --git a/dev-python/pypy3/files/pypy3-2.4.0-fix-tkinter-regression.patch b/dev-python/pypy3/files/pypy3-2.4.0-fix-tkinter-regression.patch
new file mode 100644
index 0000000..a92152e
--- /dev/null
+++ b/dev-python/pypy3/files/pypy3-2.4.0-fix-tkinter-regression.patch
@@ -0,0 +1,74 @@
+# HG changeset patch
+# User Philip Jenvey <pjenvey@underboss.org>
+# Date 1414136649 25200
+# Branch py3k
+# Node ID 8c340acffe279d63dd2df525173713b2054619c8
+# Parent  a87e6542c186bdc7408ea027aed83c62820a9c49
+issue1899: fix broken bytes usage from default
+
+diff --git a/lib_pypy/_tkinter/app.py b/lib_pypy/_tkinter/app.py
+--- a/lib_pypy/_tkinter/app.py
++++ b/lib_pypy/_tkinter/app.py
+@@ -439,7 +439,7 @@
+         if isinstance(s, int):
+             return s
+         s = s.encode('utf-8')
+-        if '\x00' in s:
++        if b'\x00' in s:
+             raise TypeError
+         v = tkffi.new("int*")
+         res = tklib.Tcl_GetBoolean(self.interp, s, v)
+@@ -451,7 +451,7 @@
+         if isinstance(s, int):
+             return s
+         s = s.encode('utf-8')
+-        if '\x00' in s:
++        if b'\x00' in s:
+             raise TypeError
+         v = tkffi.new("int*")
+         res = tklib.Tcl_GetInt(self.interp, s, v)
+@@ -463,7 +463,7 @@
+         if isinstance(s, float):
+             return s
+         s = s.encode('utf-8')
+-        if '\x00' in s:
++        if b'\x00' in s:
+             raise TypeError
+         v = tkffi.new("double*")
+         res = tklib.Tcl_GetDouble(self.interp, s, v)
+@@ -472,7 +472,7 @@
+         return v[0]
+ 
+     def exprboolean(self, s):
+-        if '\x00' in s:
++        if b'\x00' in s:
+             raise TypeError
+         v = tkffi.new("int*")
+         res = tklib.Tcl_ExprBoolean(self.interp, s, v)
+@@ -481,7 +481,7 @@
+         return v[0]
+ 
+     def exprlong(self, s):
+-        if '\x00' in s:
++        if b'\x00' in s:
+             raise TypeError
+         v = tkffi.new("long*")
+         res = tklib.Tcl_ExprLong(self.interp, s, v)
+@@ -490,7 +490,7 @@
+         return v[0]
+ 
+     def exprdouble(self, s):
+-        if '\x00' in s:
++        if b'\x00' in s:
+             raise TypeError
+         v = tkffi.new("double*")
+         res = tklib.Tcl_ExprDouble(self.interp, s, v)
+@@ -499,7 +499,7 @@
+         return v[0]
+ 
+     def exprstring(self, s):
+-        if '\x00' in s:
++        if b'\x00' in s:
+             raise TypeError
+         res = tklib.Tcl_ExprString(self.interp, s)
+         if res == tklib.TCL_ERROR:

diff --git a/dev-python/pypy3/pypy3-2.4.0-r2.ebuild b/dev-python/pypy3/pypy3-2.4.0-r2.ebuild
index 446c8d6..07646db 100644
--- a/dev-python/pypy3/pypy3-2.4.0-r2.ebuild
+++ b/dev-python/pypy3/pypy3-2.4.0-r2.ebuild
@@ -82,6 +82,7 @@ src_prepare() {
 		"${FILESDIR}"/2.3.1-shared-lib.patch	# 517002
 	epatch "${FILESDIR}/2.4.0-ncurses6.patch"
 	epatch "${FILESDIR}"/${PN}-2.4.0-libressl.patch
+	epatch "${FILESDIR}/${PN}-2.4.0-fix-tkinter-regression.patch"	# 533384
 
 	sed -e "s^@EPREFIX@^${EPREFIX}^" \
 		-e "s^@libdir@^$(get_libdir)^" \


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/
@ 2017-04-25 21:49 Michał Górny
  0 siblings, 0 replies; 17+ messages in thread
From: Michał Górny @ 2017-04-25 21:49 UTC (permalink / raw
  To: gentoo-commits

commit:     27d9dc7c45731e84947d401db38022c1eab49b5c
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 25 16:03:22 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Apr 25 21:49:20 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27d9dc7c

dev-python/pypy3: Fix implicit -flto in 9999

 dev-python/pypy3/files/5.7.1-kill-flto.patch | 27 +++++++++++++++++++++++++++
 dev-python/pypy3/pypy3-9999.ebuild           |  2 ++
 2 files changed, 29 insertions(+)

diff --git a/dev-python/pypy3/files/5.7.1-kill-flto.patch b/dev-python/pypy3/files/5.7.1-kill-flto.patch
new file mode 100644
index 00000000000..92395bdb6ca
--- /dev/null
+++ b/dev-python/pypy3/files/5.7.1-kill-flto.patch
@@ -0,0 +1,27 @@
+From 261f9280d9736965a8626c2d6a6fadd4254b2b89 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 25 Apr 2017 17:03:46 +0200
+Subject: [PATCH] Kill -flto
+
+---
+ rpython/translator/platform/posix.py | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/rpython/translator/platform/posix.py b/rpython/translator/platform/posix.py
+index a8d4768..20a2934 100644
+--- a/rpython/translator/platform/posix.py
++++ b/rpython/translator/platform/posix.py
+@@ -130,10 +130,6 @@ class BasePosix(Platform):
+         else:
+             cflags = tuple(self.cflags) + tuple(self.standalone_only)
+ 
+-        # xxx check which compilers accept this option or not
+-        if not config or config.translation.gcrootfinder != 'asmgcc':
+-            cflags = ('-flto',) + cflags
+-
+         m = GnuMakefile(path)
+         m.exe_name = path.join(exe_name.basename)
+         m.eci = eci
+-- 
+2.12.2
+

diff --git a/dev-python/pypy3/pypy3-9999.ebuild b/dev-python/pypy3/pypy3-9999.ebuild
index f22d4d75d87..eaa0e20886c 100644
--- a/dev-python/pypy3/pypy3-9999.ebuild
+++ b/dev-python/pypy3/pypy3-9999.ebuild
@@ -86,6 +86,8 @@ src_prepare() {
 	eapply "${FILESDIR}/4.0.0-gentoo-path.patch"
 	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
 	eapply "${FILESDIR}"/2.5.0-shared-lib.patch	# 517002
+	# disarm implicit -flto
+	eapply "${FILESDIR}"/5.7.1-kill-flto.patch
 
 	sed -e "s^@EPREFIX@^${EPREFIX}^" \
 		-e "s^@libdir@^$(get_libdir)^" \


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/
@ 2017-04-25 21:49 Michał Górny
  0 siblings, 0 replies; 17+ messages in thread
From: Michał Górny @ 2017-04-25 21:49 UTC (permalink / raw
  To: gentoo-commits

commit:     de2429b416e556af4cec2cf05da1ede52cb6a473
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 24 20:14:35 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Apr 25 21:49:15 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de2429b4

dev-python/pypy3: Update the distutils C++ patch

 .../pypy3/files/5.7.1_all_distutils_cxx.patch      | 342 +++++++++++++++++++++
 dev-python/pypy3/pypy3-9999.ebuild                 |   2 +-
 2 files changed, 343 insertions(+), 1 deletion(-)

diff --git a/dev-python/pypy3/files/5.7.1_all_distutils_cxx.patch b/dev-python/pypy3/files/5.7.1_all_distutils_cxx.patch
new file mode 100644
index 00000000000..52a833f29d9
--- /dev/null
+++ b/dev-python/pypy3/files/5.7.1_all_distutils_cxx.patch
@@ -0,0 +1,342 @@
+From b2f2c9d23996d431d606ac7d8ed731a5302b4e97 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 25 Apr 2017 17:42:33 +0200
+Subject: [PATCH] Fancy distutils C++ support, rebased for PyPy3.5
+
+https://bugs.python.org/issue1222585
+---
+ _osx_support.py                | 10 +++---
+ distutils/cygwinccompiler.py   | 21 +++++++++--
+ distutils/sysconfig_cpython.py | 25 ++++++++++---
+ distutils/sysconfig_pypy.py    | 35 +++++++++++++++----
+ distutils/unixccompiler.py     | 54 ++++++++++++++++-------------
+ 5 files changed, 100 insertions(+), 45 deletions(-)
+
+diff --git a/_osx_support.py b/_osx_support.py
+index 13fcd8b..0525be1 100644
+--- a/_osx_support.py
++++ b/_osx_support.py
+@@ -14,13 +14,13 @@ __all__ = [
+ # configuration variables that may contain universal build flags,
+ # like "-arch" or "-isdkroot", that may need customization for
+ # the user environment
+-_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
+-                            'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
+-                            'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
+-                            'PY_CORE_CFLAGS')
++_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS',
++                          'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED',
++                          'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS',
++                          'PY_CPPFLAGS', 'PY_CORE_CFLAGS')
+ 
+ # configuration variables that may contain compiler calls
+-_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX')
++_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX')
+ 
+ # prefix added to original configuration variable names
+ _INITPRE = '_OSX_SUPPORT_INITIAL_'
+diff --git a/distutils/cygwinccompiler.py b/distutils/cygwinccompiler.py
+index c879646..a6157fb 100644
+--- a/distutils/cygwinccompiler.py
++++ b/distutils/cygwinccompiler.py
+@@ -125,8 +125,10 @@ class CygwinCCompiler(UnixCCompiler):
+         # dllwrap 2.10.90 is buggy
+         if self.ld_version >= "2.10.90":
+             self.linker_dll = "gcc"
++            self.linker_dll_cxx = "g++"
+         else:
+             self.linker_dll = "dllwrap"
++            self.linker_dll_cxx = "dllwrap"
+ 
+         # ld_version >= "2.13" support -shared so use it instead of
+         # -mdll -static
+@@ -140,9 +142,13 @@ class CygwinCCompiler(UnixCCompiler):
+         self.set_executables(compiler='gcc -mcygwin -O -Wall',
+                              compiler_so='gcc -mcygwin -mdll -O -Wall',
+                              compiler_cxx='g++ -mcygwin -O -Wall',
++                             compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
+                              linker_exe='gcc -mcygwin',
+                              linker_so=('%s -mcygwin %s' %
+-                                        (self.linker_dll, shared_option)))
++                                        (self.linker_dll, shared_option)),
++                             linker_exe_cxx='g++ -mcygwin',
++                             linker_so_cxx=('%s -mcygwin %s' %
++                                            (self.linker_dll_cxx, shared_option)))
+ 
+         # cygwin and mingw32 need different sets of libraries
+         if self.gcc_version == "2.91.57":
+@@ -166,8 +172,12 @@ class CygwinCCompiler(UnixCCompiler):
+                 raise CompileError(msg)
+         else: # for other files use the C-compiler
+             try:
+-                self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
+-                           extra_postargs)
++                if self.detect_language(src) == 'c++':
++                    self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
++                               extra_postargs)
++                else:
++                    self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
++                               extra_postargs)
+             except DistutilsExecError as msg:
+                 raise CompileError(msg)
+ 
+@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler):
+         self.set_executables(compiler='gcc -O -Wall',
+                              compiler_so='gcc -mdll -O -Wall',
+                              compiler_cxx='g++ -O -Wall',
++                             compiler_so_cxx='g++ -mdll -O -Wall',
+                              linker_exe='gcc',
+                              linker_so='%s %s %s'
+                                         % (self.linker_dll, shared_option,
++                                           entry_point),
++                             linker_exe_cxx='g++',
++                             linker_so_cxx='%s %s %s'
++                                        % (self.linker_dll_cxx, shared_option,
+                                            entry_point))
+         # Maybe we should also append -mthreads, but then the finished
+         # dlls need another dll (mingwm10.dll see Mingw32 docs)
+diff --git a/distutils/sysconfig_cpython.py b/distutils/sysconfig_cpython.py
+index 573724d..0a04f33 100644
+--- a/distutils/sysconfig_cpython.py
++++ b/distutils/sysconfig_cpython.py
+@@ -173,9 +173,12 @@ def customize_compiler(compiler):
+                 _osx_support.customize_compiler(_config_vars)
+                 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
+ 
+-        (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
+-            get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
+-                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
++        (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
++            get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
++                            'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
++
++        cflags = ''
++        cxxflags = ''
+ 
+         if 'CC' in os.environ:
+             newcc = os.environ['CC']
+@@ -190,19 +193,27 @@ def customize_compiler(compiler):
+             cxx = os.environ['CXX']
+         if 'LDSHARED' in os.environ:
+             ldshared = os.environ['LDSHARED']
++        if 'LDCXXSHARED' in os.environ:
++            ldcxxshared = os.environ['LDCXXSHARED']
+         if 'CPP' in os.environ:
+             cpp = os.environ['CPP']
+         else:
+             cpp = cc + " -E"           # not always
+         if 'LDFLAGS' in os.environ:
+             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
+         if 'CFLAGS' in os.environ:
+-            cflags = opt + ' ' + os.environ['CFLAGS']
++            cflags = os.environ['CFLAGS']
+             ldshared = ldshared + ' ' + os.environ['CFLAGS']
++        if 'CXXFLAGS' in os.environ:
++            cxxflags = os.environ['CXXFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
+         if 'CPPFLAGS' in os.environ:
+             cpp = cpp + ' ' + os.environ['CPPFLAGS']
+             cflags = cflags + ' ' + os.environ['CPPFLAGS']
++            cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
+             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
+         if 'AR' in os.environ:
+             ar = os.environ['AR']
+         if 'ARFLAGS' in os.environ:
+@@ -211,13 +222,17 @@ def customize_compiler(compiler):
+             archiver = ar + ' ' + ar_flags
+ 
+         cc_cmd = cc + ' ' + cflags
++        cxx_cmd = cxx + ' ' + cxxflags
+         compiler.set_executables(
+             preprocessor=cpp,
+             compiler=cc_cmd,
+             compiler_so=cc_cmd + ' ' + ccshared,
+-            compiler_cxx=cxx,
++            compiler_cxx=cxx_cmd,
++            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
+             linker_so=ldshared,
+             linker_exe=cc,
++            linker_so_cxx=ldcxxshared,
++            linker_exe_cxx=cxx,
+             archiver=archiver)
+ 
+         compiler.shared_lib_extension = shlib_suffix
+diff --git a/distutils/sysconfig_pypy.py b/distutils/sysconfig_pypy.py
+index a0a8dec..aa97c4e 100644
+--- a/distutils/sysconfig_pypy.py
++++ b/distutils/sysconfig_pypy.py
+@@ -72,6 +72,7 @@ def _init_posix():
+     g['CFLAGS'] = "-DNDEBUG -O2"
+     g['CCSHARED'] = "-fPIC"
+     g['LDSHARED'] = "gcc -pthread -shared"
++    g['LDCXXSHARED'] = "g++ -pthread -shared"
+     g['EXT_SUFFIX'] = so_ext
+     g['SHLIB_SUFFIX'] = so_ext
+     g['SO'] = so_ext  # deprecated in Python 3, for backward compatibility
+@@ -156,36 +157,52 @@ def customize_compiler(compiler):
+                 _osx_support.customize_compiler(_config_vars)
+                 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
+ 
+-        (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
+-            get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
+-                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
++        (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
++            get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
++                            'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
++
++        cflags = ''
++        cxxflags = ''
+ 
+         if 'CC' in os.environ:
+             newcc = os.environ['CC']
+-            if (sys.platform == 'darwin'
++            if (True
+                     and 'LDSHARED' not in os.environ
+                     and ldshared.startswith(cc)):
+                 # On OS X, if CC is overridden, use that as the default
+                 #       command for LDSHARED as well
++                # Gentoo: s/OS X/every system/
+                 ldshared = newcc + ldshared[len(cc):]
+             cc = newcc
+         if 'CXX' in os.environ:
+-            cxx = os.environ['CXX']
++            newcxx = os.environ['CXX']
++            if ('LDCXXSHARED' not in os.environ
++                    and ldcxxshared.startswith(cxx)):
++                ldcxxshared = newcxx + ldcxxshared[len(cxx):]
++            cxx = newcxx
+         if 'LDSHARED' in os.environ:
+             ldshared = os.environ['LDSHARED']
++        if 'LDCXXSHARED' in os.environ:
++            ldcxxshared = os.environ['LDCXXSHARED']
+         if 'CPP' in os.environ:
+             cpp = os.environ['CPP']
+         else:
+             cpp = cc + " -E"           # not always
+         if 'LDFLAGS' in os.environ:
+             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
+         if 'CFLAGS' in os.environ:
+-            cflags = opt + ' ' + os.environ['CFLAGS']
++            cflags = os.environ['CFLAGS']
+             ldshared = ldshared + ' ' + os.environ['CFLAGS']
++        if 'CXXFLAGS' in os.environ:
++            cxxflags = os.environ['CXXFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
+         if 'CPPFLAGS' in os.environ:
+             cpp = cpp + ' ' + os.environ['CPPFLAGS']
+             cflags = cflags + ' ' + os.environ['CPPFLAGS']
++            cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
+             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
+         if 'AR' in os.environ:
+             ar = os.environ['AR']
+         if 'ARFLAGS' in os.environ:
+@@ -194,13 +211,17 @@ def customize_compiler(compiler):
+             archiver = ar + ' ' + ar_flags
+ 
+         cc_cmd = cc + ' ' + cflags
++        cxx_cmd = cxx + ' ' + cxxflags
+         compiler.set_executables(
+             preprocessor=cpp,
+             compiler=cc_cmd,
+             compiler_so=cc_cmd + ' ' + ccshared,
+-            compiler_cxx=cxx,
++            compiler_cxx=cxx_cmd,
++            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
+             linker_so=ldshared,
+             linker_exe=cc,
++            linker_so_cxx=ldcxxshared,
++            linker_exe_cxx=cxx,
+             archiver=archiver)
+ 
+         compiler.shared_lib_extension = shlib_suffix
+diff --git a/distutils/unixccompiler.py b/distutils/unixccompiler.py
+index 254b22d..c9cacc1 100644
+--- a/distutils/unixccompiler.py
++++ b/distutils/unixccompiler.py
+@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler):
+     # are pretty generic; they will probably have to be set by an outsider
+     # (eg. using information discovered by the sysconfig about building
+     # Python extensions).
+-    executables = {'preprocessor' : None,
+-                   'compiler'     : ["cc"],
+-                   'compiler_so'  : ["cc"],
+-                   'compiler_cxx' : ["c++"],  # pypy: changed, 'cc' is bogus
+-                   'linker_so'    : ["cc", "-shared"],
+-                   'linker_exe'   : ["cc"],
+-                   'archiver'     : ["ar", "-cr"],
+-                   'ranlib'       : None,
++    executables = {'preprocessor'    : None,
++                   'compiler'        : ["cc"],
++                   'compiler_so'     : ["cc"],
++                   'compiler_cxx'    : ["c++"],
++                   'compiler_so_cxx' : ["c++"],
++                   'linker_so'       : ["cc", "-shared"],
++                   'linker_exe'      : ["cc"],
++                   'linker_so_cxx'   : ["c++", "-shared"],
++                   'linker_exe_cxx'  : ["c++"],
++                   'archiver'        : ["ar", "-cr"],
++                   'ranlib'          : None,
+                   }
+ 
+     if sys.platform[:6] == "darwin":
+@@ -125,12 +128,19 @@ class UnixCCompiler(CCompiler):
+ 
+     def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
+         compiler_so = self.compiler_so
++        compiler_so_cxx = self.compiler_so_cxx
+         if sys.platform == 'darwin':
+             compiler_so = _osx_support.compiler_fixup(compiler_so,
+                                                     cc_args + extra_postargs)
++            compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
++                                                    cc_args + extra_postargs)
+         try:
+-            self.spawn(compiler_so + cc_args + [src, '-o', obj] +
+-                       extra_postargs)
++            if self.detect_language(src) == 'c++':
++                self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
++                           extra_postargs)
++            else:
++                self.spawn(compiler_so + cc_args + [src, '-o', obj] +
++                           extra_postargs)
+         except DistutilsExecError as msg:
+             raise CompileError(msg)
+ 
+@@ -188,22 +198,16 @@ class UnixCCompiler(CCompiler):
+                 ld_args.extend(extra_postargs)
+             self.mkpath(os.path.dirname(output_filename))
+             try:
+-                if target_desc == CCompiler.EXECUTABLE:
+-                    linker = self.linker_exe[:]
++                if target_lang == "c++":
++                    if target_desc == CCompiler.EXECUTABLE:
++                        linker = self.linker_exe_cxx[:]
++                    else:
++                        linker = self.linker_so_cxx[:]
+                 else:
+-                    linker = self.linker_so[:]
+-                if target_lang == "c++" and self.compiler_cxx:
+-                    # skip over environment variable settings if /usr/bin/env
+-                    # is used to set up the linker's environment.
+-                    # This is needed on OSX. Note: this assumes that the
+-                    # normal and C++ compiler have the same environment
+-                    # settings.
+-                    i = 0
+-                    if os.path.basename(linker[0]) == "env":
+-                        i = 1
+-                        while '=' in linker[i]:
+-                            i += 1
+-                    linker[i] = self.compiler_cxx[i]
++                    if target_desc == CCompiler.EXECUTABLE:
++                        linker = self.linker_exe[:]
++                    else:
++                        linker = self.linker_so[:]
+ 
+                 if sys.platform == 'darwin':
+                     linker = _osx_support.compiler_fixup(linker, ld_args)
+-- 
+2.12.2
+

diff --git a/dev-python/pypy3/pypy3-9999.ebuild b/dev-python/pypy3/pypy3-9999.ebuild
index 315b209ae38..e192a166b39 100644
--- a/dev-python/pypy3/pypy3-9999.ebuild
+++ b/dev-python/pypy3/pypy3-9999.ebuild
@@ -96,7 +96,7 @@ src_prepare() {
 
 	# apply CPython stdlib patches
 	pushd lib-python/3 > /dev/null || die
-	epatch "${FILESDIR}"/5.2.0-distutils-c++.patch \
+	epatch "${FILESDIR}"/5.7.1_all_distutils_cxx.patch \
 		"${WORKDIR}"/patches/24_all_sqlite-3.8.4.patch
 	popd > /dev/null || die
 


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/
@ 2017-10-09 18:58 Michał Górny
  0 siblings, 0 replies; 17+ messages in thread
From: Michał Górny @ 2017-10-09 18:58 UTC (permalink / raw
  To: gentoo-commits

commit:     53ef182b3f5663c226d06a043e6dac3843648c13
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  5 17:45:39 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Oct  9 18:58:14 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53ef182b

dev-python/pypy3: Bump to 5.9.0

 dev-python/pypy3/Manifest                          |  1 +
 dev-python/pypy3/files/5.9.0-shared-lib.patch      | 12 +++++
 .../{pypy3-9999.ebuild => pypy3-5.9.0.ebuild}      | 54 ++++++----------------
 dev-python/pypy3/pypy3-9999.ebuild                 |  6 +--
 4 files changed, 29 insertions(+), 44 deletions(-)

diff --git a/dev-python/pypy3/Manifest b/dev-python/pypy3/Manifest
index 84c8dbad617..ba2c2b770e8 100644
--- a/dev-python/pypy3/Manifest
+++ b/dev-python/pypy3/Manifest
@@ -1,4 +1,5 @@
 DIST pypy3-v5.7.1-src.tar.bz2 28811162 SHA256 40ece0145282980ac121390f13709404c0532896507d5767496381180b631bd0 SHA512 f8ead8214ad7d89fe80e24d97b13ece7f2c80b2f11446257a2eab0e3025fc7d8fec26474b0e9eb2b2e3ccd629532dd062829459361b601add12e40793bd5aa60 WHIRLPOOL 180a5cb39c9a5e3840f4940463dd9cccf44486f11a657d2ac644d1eac4561068f08905fdadc495918fb0ceaf018d4b85a3e5756ca6d99a020310b46bdb16ef87
 DIST pypy3-v5.8.0-src.tar.bz2 28986883 SHA256 9d090127335c3c0fd2b14c8835bf91752e62756e55ea06aad3353f24a6854223 SHA512 d78b4c899a5643028664365ed973a7b292a8e5b3989cc75203cd381ea3cda7dd73121c574726e23dca86e8364fcfcf42c372c9deee438c805f30d6e1c4ac115a WHIRLPOOL b7567fa21e3ded400a72ec06197184df37e0b5893adfb55622ea9afb668bfbda7ebbecd9b80660efef42f160838966d103c4181a9b07355e873981b35f4bf104
+DIST pypy3-v5.9.0-src.tar.bz2 29055111 SHA256 a014f47f50a1480f871a0b82705f904b38c93c4ca069850eb37653fedafb1b97 SHA512 3d5384d644fdd1bc8b95f5747dbd1771ae06eb2cfc7b57be359b8bf40177676afd097620d0cb9d9000c40d8cce075cfa6bfd92de987d3dd927c04d7d595dc5bd WHIRLPOOL e0936d56c64c3c077910c4713295010ec3e0fabebe654115ddf07407884d1564db7de2f85bcedf1226449c516085f3e4814a2c523f0d48e3ad8ac21150a93a72
 DIST pypy3.3-v5.5.0-alpha-src.tar.bz2 25122033 SHA256 d5591c34d77253e9ed57d182b6f49585b95f7c09c3e121f0e8630e5a7e75ab5f SHA512 b2cf9700e45c452293297edffe08e572dffc3c567026b4b5d9165c1ba1b4d858ffc8a6754f5f28781020016c36440e5c02d07562d075b12444c9c32ea5dd2168 WHIRLPOOL 6bde174969413c55d6d077cd14e737c4f034f19935536af1bffaf3a1caa456d2bf6850760a18c274ad99089bd5ab7331d7d185f914cd6c69f708abf857d35df3
 DIST python-gentoo-patches-3.3.5-0.tar.xz 12892 SHA256 a7240de9598033cb40f8f273d8104d4e2b1dcaea028d45ac28efaa3c680ff6f7 SHA512 27eef4c2b3f631b000db3f6a5c426d9b498d63a08fe82b1ab7c2c010fb72208109461a5f008d47703852526655b70a734ea95be8742897026db5750bb9cc9d16 WHIRLPOOL edab9222d7da94cab3b1de0e1a27c6c7dbd49194b813a0a1cf9e532063029c4e4f19151c9f4878eeabed3168ff1f97eae7f008280c7ed2897fc14c5516c68d7e

diff --git a/dev-python/pypy3/files/5.9.0-shared-lib.patch b/dev-python/pypy3/files/5.9.0-shared-lib.patch
new file mode 100644
index 00000000000..5d89d3b15a3
--- /dev/null
+++ b/dev-python/pypy3/files/5.9.0-shared-lib.patch
@@ -0,0 +1,12 @@
+diff -dupr a/rpython/translator/platform/posix.py b/rpython/translator/platform/posix.py
+--- a/rpython/translator/platform/posix.py	2017-10-05 20:17:25.009954656 +0200
++++ b/rpython/translator/platform/posix.py	2017-10-05 20:17:31.115666386 +0200
+@@ -227,7 +227,7 @@ class BasePosix(Platform):
+                    'int main(int argc, char* argv[]) '
+                    '{ return $(PYPY_MAIN_FUNCTION)(argc, argv); }" > $@')
+             m.rule('$(DEFAULT_TARGET)', ['$(TARGET)', 'main.o'],
+-                   ['$(CC_LINK) $(LDFLAGS_LINK) main.o -L. -l$(SHARED_IMPORT_LIB) -o $@ $(RPATH_FLAGS)', '$(MAKE) postcompile BIN=$(DEFAULT_TARGET)'])
++                   ['$(CC_LINK) $(LDFLAGS_LINK) main.o -L. -l$(SHARED_IMPORT_LIB) \'-Wl,-rpath,$$ORIGIN\' -o $@', '$(MAKE) postcompile BIN=$(DEFAULT_TARGET)'])
+ 
+         return m
+ 

diff --git a/dev-python/pypy3/pypy3-9999.ebuild b/dev-python/pypy3/pypy3-5.9.0.ebuild
similarity index 85%
copy from dev-python/pypy3/pypy3-9999.ebuild
copy to dev-python/pypy3/pypy3-5.9.0.ebuild
index 7291b119ea0..1c93d21dd75 100644
--- a/dev-python/pypy3/pypy3-9999.ebuild
+++ b/dev-python/pypy3/pypy3-5.9.0.ebuild
@@ -5,20 +5,19 @@ EAPI=6
 
 # pypy3 needs to be built using python 2
 PYTHON_COMPAT=( python2_7 pypy )
-EHG_PROJECT="pypy"
-EHG_REPO_URI="https://bitbucket.org/pypy/pypy"
-EHG_REVISION="py3k"
-inherit check-reqs mercurial pax-utils python-any-r1 toolchain-funcs versionator
+inherit check-reqs pax-utils python-any-r1 toolchain-funcs versionator
+
+MY_P=pypy3-v${PV}
 
 DESCRIPTION="A fast, compliant alternative implementation of the Python (3.3) language"
 HOMEPAGE="http://pypy.org/"
-SRC_URI=""
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2"
 
 LICENSE="MIT"
-# XX from pypy3-XX.so module suffix
-SLOT="0/57"
-KEYWORDS=""
-IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite cpu_flags_x86_sse2 tk"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+SLOT="0/59"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite tk"
 
 RDEPEND=">=sys-libs/zlib-1.1.3:0=
 	virtual/libffi:0=
@@ -40,8 +39,7 @@ DEPEND="${RDEPEND}
 	!low-memory? ( ${PYTHON_DEPS} )"
 #	doc? ( dev-python/sphinx )
 
-# Who would care about predictable directory names?
-S="${WORKDIR}/pypy3-v${PV%_*}-src"
+S="${WORKDIR}/${MY_P}-src"
 
 pkg_pretend() {
 	if [[ ${MERGE_TYPE} != binary ]]; then
@@ -76,15 +74,10 @@ pkg_setup() {
 	fi
 }
 
-src_unpack() {
-	default
-	mercurial_src_unpack
-}
-
 src_prepare() {
 	eapply "${FILESDIR}/4.0.0-gentoo-path.patch"
 	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
-	eapply "${FILESDIR}"/2.5.0-shared-lib.patch	# 517002
+	eapply "${FILESDIR}"/5.9.0-shared-lib.patch	# 517002
 
 	sed -e "s^@EPREFIX@^${EPREFIX}^" \
 		-e "s^@libdir@^$(get_libdir)^" \
@@ -102,32 +95,12 @@ src_prepare() {
 src_configure() {
 	tc-export CC
 
-	local jit_backend
-	if use jit; then
-		jit_backend='--jit-backend='
-
-		# We only need the explicit sse2 switch for x86.
-		# On other arches we can rely on autodetection which uses
-		# compiler macros. Plus, --jit-backend= doesn't accept all
-		# the modern values...
-
-		if use x86; then
-			if use cpu_flags_x86_sse2; then
-				jit_backend+=x86
-			else
-				jit_backend+=x86-without-sse2
-			fi
-		else
-			jit_backend+=auto
-		fi
-	fi
-
 	local args=(
 		--shared
 		$(usex jit -Ojit -O2)
 		$(usex sandbox --sandbox '')
 
-		${jit_backend}
+		--jit-backend=auto
 
 		pypy/goal/targetpypystandalone
 	)
@@ -193,12 +166,11 @@ src_install() {
 	dodoc README.rst
 
 	if ! use gdbm; then
-		rm -r "${ED%/}${dest}"/lib_pypy/gdbm.py \
-			"${ED%/}${dest}"/lib-python/*3/test/test_gdbm.py || die
+		rm -r "${ED%/}${dest}"/lib_pypy/_gdbm* || die
 	fi
 	if ! use sqlite; then
 		rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
-			"${ED%/}${dest}"/lib_pypy/_sqlite3.py \
+			"${ED%/}${dest}"/lib_pypy/_sqlite3* \
 			"${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || die
 	fi
 	if ! use tk; then

diff --git a/dev-python/pypy3/pypy3-9999.ebuild b/dev-python/pypy3/pypy3-9999.ebuild
index 7291b119ea0..1175a210c98 100644
--- a/dev-python/pypy3/pypy3-9999.ebuild
+++ b/dev-python/pypy3/pypy3-9999.ebuild
@@ -15,8 +15,8 @@ HOMEPAGE="http://pypy.org/"
 SRC_URI=""
 
 LICENSE="MIT"
-# XX from pypy3-XX.so module suffix
-SLOT="0/57"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+SLOT="0/59"
 KEYWORDS=""
 IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite cpu_flags_x86_sse2 tk"
 
@@ -84,7 +84,7 @@ src_unpack() {
 src_prepare() {
 	eapply "${FILESDIR}/4.0.0-gentoo-path.patch"
 	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
-	eapply "${FILESDIR}"/2.5.0-shared-lib.patch	# 517002
+	eapply "${FILESDIR}"/5.9.0-shared-lib.patch	# 517002
 
 	sed -e "s^@EPREFIX@^${EPREFIX}^" \
 		-e "s^@libdir@^$(get_libdir)^" \


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/
@ 2017-10-15  9:38 Michał Górny
  0 siblings, 0 replies; 17+ messages in thread
From: Michał Górny @ 2017-10-15  9:38 UTC (permalink / raw
  To: gentoo-commits

commit:     a46e22a8d586b11151dd9f974f0588f8d98df431
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 15 09:16:59 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Oct 15 09:38:02 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a46e22a8

dev-python/pypy3: Drop old

 dev-python/pypy3/Manifest                          |   3 -
 dev-python/pypy3/files/5.2.0-distutils-c++.patch   | 284 -----------------
 dev-python/pypy3/files/5.7.1-kill-flto.patch       |  27 --
 .../pypy3/files/5.7.1_all_distutils_cxx.patch      | 342 ---------------------
 dev-python/pypy3/metadata.xml                      |   1 -
 dev-python/pypy3/pypy3-5.5.0_alpha.ebuild          | 260 ----------------
 dev-python/pypy3/pypy3-5.7.1-r2.ebuild             | 238 --------------
 7 files changed, 1155 deletions(-)

diff --git a/dev-python/pypy3/Manifest b/dev-python/pypy3/Manifest
index ba2c2b770e8..b145fb4f4b2 100644
--- a/dev-python/pypy3/Manifest
+++ b/dev-python/pypy3/Manifest
@@ -1,5 +1,2 @@
-DIST pypy3-v5.7.1-src.tar.bz2 28811162 SHA256 40ece0145282980ac121390f13709404c0532896507d5767496381180b631bd0 SHA512 f8ead8214ad7d89fe80e24d97b13ece7f2c80b2f11446257a2eab0e3025fc7d8fec26474b0e9eb2b2e3ccd629532dd062829459361b601add12e40793bd5aa60 WHIRLPOOL 180a5cb39c9a5e3840f4940463dd9cccf44486f11a657d2ac644d1eac4561068f08905fdadc495918fb0ceaf018d4b85a3e5756ca6d99a020310b46bdb16ef87
 DIST pypy3-v5.8.0-src.tar.bz2 28986883 SHA256 9d090127335c3c0fd2b14c8835bf91752e62756e55ea06aad3353f24a6854223 SHA512 d78b4c899a5643028664365ed973a7b292a8e5b3989cc75203cd381ea3cda7dd73121c574726e23dca86e8364fcfcf42c372c9deee438c805f30d6e1c4ac115a WHIRLPOOL b7567fa21e3ded400a72ec06197184df37e0b5893adfb55622ea9afb668bfbda7ebbecd9b80660efef42f160838966d103c4181a9b07355e873981b35f4bf104
 DIST pypy3-v5.9.0-src.tar.bz2 29055111 SHA256 a014f47f50a1480f871a0b82705f904b38c93c4ca069850eb37653fedafb1b97 SHA512 3d5384d644fdd1bc8b95f5747dbd1771ae06eb2cfc7b57be359b8bf40177676afd097620d0cb9d9000c40d8cce075cfa6bfd92de987d3dd927c04d7d595dc5bd WHIRLPOOL e0936d56c64c3c077910c4713295010ec3e0fabebe654115ddf07407884d1564db7de2f85bcedf1226449c516085f3e4814a2c523f0d48e3ad8ac21150a93a72
-DIST pypy3.3-v5.5.0-alpha-src.tar.bz2 25122033 SHA256 d5591c34d77253e9ed57d182b6f49585b95f7c09c3e121f0e8630e5a7e75ab5f SHA512 b2cf9700e45c452293297edffe08e572dffc3c567026b4b5d9165c1ba1b4d858ffc8a6754f5f28781020016c36440e5c02d07562d075b12444c9c32ea5dd2168 WHIRLPOOL 6bde174969413c55d6d077cd14e737c4f034f19935536af1bffaf3a1caa456d2bf6850760a18c274ad99089bd5ab7331d7d185f914cd6c69f708abf857d35df3
-DIST python-gentoo-patches-3.3.5-0.tar.xz 12892 SHA256 a7240de9598033cb40f8f273d8104d4e2b1dcaea028d45ac28efaa3c680ff6f7 SHA512 27eef4c2b3f631b000db3f6a5c426d9b498d63a08fe82b1ab7c2c010fb72208109461a5f008d47703852526655b70a734ea95be8742897026db5750bb9cc9d16 WHIRLPOOL edab9222d7da94cab3b1de0e1a27c6c7dbd49194b813a0a1cf9e532063029c4e4f19151c9f4878eeabed3168ff1f97eae7f008280c7ed2897fc14c5516c68d7e

diff --git a/dev-python/pypy3/files/5.2.0-distutils-c++.patch b/dev-python/pypy3/files/5.2.0-distutils-c++.patch
deleted file mode 100644
index 1251694107d..00000000000
--- a/dev-python/pypy3/files/5.2.0-distutils-c++.patch
+++ /dev/null
@@ -1,284 +0,0 @@
-From e3afe6721897c8de830055621313bc0659518415 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Thu, 9 Jun 2016 20:48:10 +0200
-Subject: [PATCH] distutils c++ fixes, python3.3 patch updated for pypy3.3
-
----
- lib-python/3/_osx_support.py                | 10 +++---
- lib-python/3/distutils/cygwinccompiler.py   | 21 +++++++++--
- lib-python/3/distutils/emxccompiler.py      | 14 ++++++--
- lib-python/3/distutils/sysconfig_cpython.py | 25 ++++++++++---
- lib-python/3/distutils/unixccompiler.py     | 54 ++++++++++++++++-------------
- 5 files changed, 83 insertions(+), 41 deletions(-)
-
-diff --git a/lib-python/3/_osx_support.py b/lib-python/3/_osx_support.py
-index 50b2d17..1d19599 100644
---- a/lib-python/3/_osx_support.py
-+++ b/lib-python/3/_osx_support.py
-@@ -14,13 +14,13 @@ __all__ = [
- # configuration variables that may contain universal build flags,
- # like "-arch" or "-isdkroot", that may need customization for
- # the user environment
--_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
--                            'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
--                            'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
--                            'PY_CORE_CFLAGS')
-+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS',
-+                          'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED',
-+                          'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS',
-+                          'PY_CPPFLAGS', 'PY_CORE_CFLAGS')
- 
- # configuration variables that may contain compiler calls
--_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX')
-+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX')
- 
- # prefix added to original configuration variable names
- _INITPRE = '_OSX_SUPPORT_INITIAL_'
-diff --git a/lib-python/3/distutils/cygwinccompiler.py b/lib-python/3/distutils/cygwinccompiler.py
-index e0074a1..1b383d3 100644
---- a/lib-python/3/distutils/cygwinccompiler.py
-+++ b/lib-python/3/distutils/cygwinccompiler.py
-@@ -124,8 +124,10 @@ class CygwinCCompiler(UnixCCompiler):
-         # dllwrap 2.10.90 is buggy
-         if self.ld_version >= "2.10.90":
-             self.linker_dll = "gcc"
-+            self.linker_dll_cxx = "g++"
-         else:
-             self.linker_dll = "dllwrap"
-+            self.linker_dll_cxx = "dllwrap"
- 
-         # ld_version >= "2.13" support -shared so use it instead of
-         # -mdll -static
-@@ -139,9 +141,13 @@ class CygwinCCompiler(UnixCCompiler):
-         self.set_executables(compiler='gcc -mcygwin -O -Wall',
-                              compiler_so='gcc -mcygwin -mdll -O -Wall',
-                              compiler_cxx='g++ -mcygwin -O -Wall',
-+                             compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
-                              linker_exe='gcc -mcygwin',
-                              linker_so=('%s -mcygwin %s' %
--                                        (self.linker_dll, shared_option)))
-+                                        (self.linker_dll, shared_option)),
-+                             linker_exe_cxx='g++ -mcygwin',
-+                             linker_so_cxx=('%s -mcygwin %s' %
-+                                            (self.linker_dll_cxx, shared_option)))
- 
-         # cygwin and mingw32 need different sets of libraries
-         if self.gcc_version == "2.91.57":
-@@ -165,8 +171,12 @@ class CygwinCCompiler(UnixCCompiler):
-                 raise CompileError(msg)
-         else: # for other files use the C-compiler
-             try:
--                self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
--                           extra_postargs)
-+                if self.detect_language(src) == 'c++':
-+                    self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
-+                               extra_postargs)
-+                else:
-+                    self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-+                               extra_postargs)
-             except DistutilsExecError as msg:
-                 raise CompileError(msg)
- 
-@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler):
-         self.set_executables(compiler='gcc%s -O -Wall' % no_cygwin,
-                              compiler_so='gcc%s -mdll -O -Wall' % no_cygwin,
-                              compiler_cxx='g++%s -O -Wall' % no_cygwin,
-+                             compiler_so_cxx='g++%s -mdll -O -Wall' % no_cygwin,
-                              linker_exe='gcc%s' % no_cygwin,
-                              linker_so='%s%s %s %s'
-                                     % (self.linker_dll, no_cygwin,
-+                                       shared_option, entry_point),
-+                             linker_exe_cxx='g++%s' % no_cygwin,
-+                             linker_so_cxx='%s%s %s %s'
-+                                    % (self.linker_dll_cxx, no_cygwin,
-                                        shared_option, entry_point))
-         # Maybe we should also append -mthreads, but then the finished
-         # dlls need another dll (mingwm10.dll see Mingw32 docs)
-diff --git a/lib-python/3/distutils/emxccompiler.py b/lib-python/3/distutils/emxccompiler.py
-index 3675f8d..17d2afa 100644
---- a/lib-python/3/distutils/emxccompiler.py
-+++ b/lib-python/3/distutils/emxccompiler.py
-@@ -63,8 +63,12 @@ class EMXCCompiler (UnixCCompiler):
-         # XXX optimization, warnings etc. should be customizable.
-         self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
-                              compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
-+                             compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
-+                             compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
-                              linker_exe='gcc -Zomf -Zmt -Zcrtdll',
--                             linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')
-+                             linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll',
-+                             linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll',
-+                             linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll')
- 
-         # want the gcc library statically linked (so that we don't have
-         # to distribute a version dependent on the compiler we have)
-@@ -81,8 +85,12 @@ class EMXCCompiler (UnixCCompiler):
-                 raise CompileError(msg)
-         else: # for other files use the C-compiler
-             try:
--                self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
--                           extra_postargs)
-+                if self.detect_language(src) == 'c++':
-+                    self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
-+                               extra_postargs)
-+                else:
-+                    self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-+                               extra_postargs)
-             except DistutilsExecError as msg:
-                 raise CompileError(msg)
- 
-diff --git a/lib-python/3/distutils/sysconfig_cpython.py b/lib-python/3/distutils/sysconfig_cpython.py
-index b947988..3f19020 100644
---- a/lib-python/3/distutils/sysconfig_cpython.py
-+++ b/lib-python/3/distutils/sysconfig_cpython.py
-@@ -191,9 +191,12 @@ def customize_compiler(compiler):
-                 _osx_support.customize_compiler(_config_vars)
-                 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
- 
--        (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
--            get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
--                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+        (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
-+            get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
-+                            'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+
-+        cflags = ''
-+        cxxflags = ''
- 
-         if 'CC' in os.environ:
-             newcc = os.environ['CC']
-@@ -208,19 +211,27 @@ def customize_compiler(compiler):
-             cxx = os.environ['CXX']
-         if 'LDSHARED' in os.environ:
-             ldshared = os.environ['LDSHARED']
-+        if 'LDCXXSHARED' in os.environ:
-+            ldcxxshared = os.environ['LDCXXSHARED']
-         if 'CPP' in os.environ:
-             cpp = os.environ['CPP']
-         else:
-             cpp = cc + " -E"           # not always
-         if 'LDFLAGS' in os.environ:
-             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
-         if 'CFLAGS' in os.environ:
--            cflags = opt + ' ' + os.environ['CFLAGS']
-+            cflags = os.environ['CFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CFLAGS']
-+        if 'CXXFLAGS' in os.environ:
-+            cxxflags = os.environ['CXXFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
-         if 'CPPFLAGS' in os.environ:
-             cpp = cpp + ' ' + os.environ['CPPFLAGS']
-             cflags = cflags + ' ' + os.environ['CPPFLAGS']
-+            cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
-         if 'AR' in os.environ:
-             ar = os.environ['AR']
-         if 'ARFLAGS' in os.environ:
-@@ -229,13 +240,17 @@ def customize_compiler(compiler):
-             archiver = ar + ' ' + ar_flags
- 
-         cc_cmd = cc + ' ' + cflags
-+        cxx_cmd = cxx + ' ' + cxxflags
-         compiler.set_executables(
-             preprocessor=cpp,
-             compiler=cc_cmd,
-             compiler_so=cc_cmd + ' ' + ccshared,
--            compiler_cxx=cxx,
-+            compiler_cxx=cxx_cmd,
-+            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
-             linker_so=ldshared,
-             linker_exe=cc,
-+            linker_so_cxx=ldcxxshared,
-+            linker_exe_cxx=cxx,
-             archiver=archiver)
- 
-         compiler.shared_lib_extension = shlib_suffix
-diff --git a/lib-python/3/distutils/unixccompiler.py b/lib-python/3/distutils/unixccompiler.py
-index 6819d50..19345ee 100644
---- a/lib-python/3/distutils/unixccompiler.py
-+++ b/lib-python/3/distutils/unixccompiler.py
-@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler):
-     # are pretty generic; they will probably have to be set by an outsider
-     # (eg. using information discovered by the sysconfig about building
-     # Python extensions).
--    executables = {'preprocessor' : None,
--                   'compiler'     : ["cc"],
--                   'compiler_so'  : ["cc"],
--                   'compiler_cxx' : ["c++"],  # pypy: changed, 'cc' is bogus
--                   'linker_so'    : ["cc", "-shared"],
--                   'linker_exe'   : ["cc"],
--                   'archiver'     : ["ar", "-cr"],
--                   'ranlib'       : None,
-+    executables = {'preprocessor'    : None,
-+                   'compiler'        : ["cc"],
-+                   'compiler_so'     : ["cc"],
-+                   'compiler_cxx'    : ["c++"],
-+                   'compiler_so_cxx' : ["c++"],
-+                   'linker_so'       : ["cc", "-shared"],
-+                   'linker_exe'      : ["cc"],
-+                   'linker_so_cxx'   : ["c++", "-shared"],
-+                   'linker_exe_cxx'  : ["c++"],
-+                   'archiver'        : ["ar", "-cr"],
-+                   'ranlib'          : None,
-                   }
- 
-     if sys.platform[:6] == "darwin":
-@@ -123,12 +126,19 @@ class UnixCCompiler(CCompiler):
- 
-     def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
-         compiler_so = self.compiler_so
-+        compiler_so_cxx = self.compiler_so_cxx
-         if sys.platform == 'darwin':
-             compiler_so = _osx_support.compiler_fixup(compiler_so,
-                                                     cc_args + extra_postargs)
-+            compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
-+                                                    cc_args + extra_postargs)
-         try:
--            self.spawn(compiler_so + cc_args + [src, '-o', obj] +
--                       extra_postargs)
-+            if self.detect_language(src) == 'c++':
-+                self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
-+                           extra_postargs)
-+            else:
-+                self.spawn(compiler_so + cc_args + [src, '-o', obj] +
-+                           extra_postargs)
-         except DistutilsExecError as msg:
-             raise CompileError(msg)
- 
-@@ -186,22 +196,16 @@ class UnixCCompiler(CCompiler):
-                 ld_args.extend(extra_postargs)
-             self.mkpath(os.path.dirname(output_filename))
-             try:
--                if target_desc == CCompiler.EXECUTABLE:
--                    linker = self.linker_exe[:]
-+                if target_lang == "c++":
-+                    if target_desc == CCompiler.EXECUTABLE:
-+                        linker = self.linker_exe_cxx[:]
-+                    else:
-+                        linker = self.linker_so_cxx[:]
-                 else:
--                    linker = self.linker_so[:]
--                if target_lang == "c++" and self.compiler_cxx:
--                    # skip over environment variable settings if /usr/bin/env
--                    # is used to set up the linker's environment.
--                    # This is needed on OSX. Note: this assumes that the
--                    # normal and C++ compiler have the same environment
--                    # settings.
--                    i = 0
--                    if os.path.basename(linker[0]) == "env":
--                        i = 1
--                        while '=' in linker[i]:
--                            i += 1
--                    linker[i] = self.compiler_cxx[i]
-+                    if target_desc == CCompiler.EXECUTABLE:
-+                        linker = self.linker_exe[:]
-+                    else:
-+                        linker = self.linker_so[:]
- 
-                 if sys.platform == 'darwin':
-                     linker = _osx_support.compiler_fixup(linker, ld_args)
--- 
-2.8.4
-

diff --git a/dev-python/pypy3/files/5.7.1-kill-flto.patch b/dev-python/pypy3/files/5.7.1-kill-flto.patch
deleted file mode 100644
index 92395bdb6ca..00000000000
--- a/dev-python/pypy3/files/5.7.1-kill-flto.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 261f9280d9736965a8626c2d6a6fadd4254b2b89 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Tue, 25 Apr 2017 17:03:46 +0200
-Subject: [PATCH] Kill -flto
-
----
- rpython/translator/platform/posix.py | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/rpython/translator/platform/posix.py b/rpython/translator/platform/posix.py
-index a8d4768..20a2934 100644
---- a/rpython/translator/platform/posix.py
-+++ b/rpython/translator/platform/posix.py
-@@ -130,10 +130,6 @@ class BasePosix(Platform):
-         else:
-             cflags = tuple(self.cflags) + tuple(self.standalone_only)
- 
--        # xxx check which compilers accept this option or not
--        if not config or config.translation.gcrootfinder != 'asmgcc':
--            cflags = ('-flto',) + cflags
--
-         m = GnuMakefile(path)
-         m.exe_name = path.join(exe_name.basename)
-         m.eci = eci
--- 
-2.12.2
-

diff --git a/dev-python/pypy3/files/5.7.1_all_distutils_cxx.patch b/dev-python/pypy3/files/5.7.1_all_distutils_cxx.patch
deleted file mode 100644
index 52a833f29d9..00000000000
--- a/dev-python/pypy3/files/5.7.1_all_distutils_cxx.patch
+++ /dev/null
@@ -1,342 +0,0 @@
-From b2f2c9d23996d431d606ac7d8ed731a5302b4e97 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Tue, 25 Apr 2017 17:42:33 +0200
-Subject: [PATCH] Fancy distutils C++ support, rebased for PyPy3.5
-
-https://bugs.python.org/issue1222585
----
- _osx_support.py                | 10 +++---
- distutils/cygwinccompiler.py   | 21 +++++++++--
- distutils/sysconfig_cpython.py | 25 ++++++++++---
- distutils/sysconfig_pypy.py    | 35 +++++++++++++++----
- distutils/unixccompiler.py     | 54 ++++++++++++++++-------------
- 5 files changed, 100 insertions(+), 45 deletions(-)
-
-diff --git a/_osx_support.py b/_osx_support.py
-index 13fcd8b..0525be1 100644
---- a/_osx_support.py
-+++ b/_osx_support.py
-@@ -14,13 +14,13 @@ __all__ = [
- # configuration variables that may contain universal build flags,
- # like "-arch" or "-isdkroot", that may need customization for
- # the user environment
--_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
--                            'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
--                            'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
--                            'PY_CORE_CFLAGS')
-+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS',
-+                          'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED',
-+                          'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS',
-+                          'PY_CPPFLAGS', 'PY_CORE_CFLAGS')
- 
- # configuration variables that may contain compiler calls
--_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX')
-+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX')
- 
- # prefix added to original configuration variable names
- _INITPRE = '_OSX_SUPPORT_INITIAL_'
-diff --git a/distutils/cygwinccompiler.py b/distutils/cygwinccompiler.py
-index c879646..a6157fb 100644
---- a/distutils/cygwinccompiler.py
-+++ b/distutils/cygwinccompiler.py
-@@ -125,8 +125,10 @@ class CygwinCCompiler(UnixCCompiler):
-         # dllwrap 2.10.90 is buggy
-         if self.ld_version >= "2.10.90":
-             self.linker_dll = "gcc"
-+            self.linker_dll_cxx = "g++"
-         else:
-             self.linker_dll = "dllwrap"
-+            self.linker_dll_cxx = "dllwrap"
- 
-         # ld_version >= "2.13" support -shared so use it instead of
-         # -mdll -static
-@@ -140,9 +142,13 @@ class CygwinCCompiler(UnixCCompiler):
-         self.set_executables(compiler='gcc -mcygwin -O -Wall',
-                              compiler_so='gcc -mcygwin -mdll -O -Wall',
-                              compiler_cxx='g++ -mcygwin -O -Wall',
-+                             compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
-                              linker_exe='gcc -mcygwin',
-                              linker_so=('%s -mcygwin %s' %
--                                        (self.linker_dll, shared_option)))
-+                                        (self.linker_dll, shared_option)),
-+                             linker_exe_cxx='g++ -mcygwin',
-+                             linker_so_cxx=('%s -mcygwin %s' %
-+                                            (self.linker_dll_cxx, shared_option)))
- 
-         # cygwin and mingw32 need different sets of libraries
-         if self.gcc_version == "2.91.57":
-@@ -166,8 +172,12 @@ class CygwinCCompiler(UnixCCompiler):
-                 raise CompileError(msg)
-         else: # for other files use the C-compiler
-             try:
--                self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
--                           extra_postargs)
-+                if self.detect_language(src) == 'c++':
-+                    self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
-+                               extra_postargs)
-+                else:
-+                    self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-+                               extra_postargs)
-             except DistutilsExecError as msg:
-                 raise CompileError(msg)
- 
-@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler):
-         self.set_executables(compiler='gcc -O -Wall',
-                              compiler_so='gcc -mdll -O -Wall',
-                              compiler_cxx='g++ -O -Wall',
-+                             compiler_so_cxx='g++ -mdll -O -Wall',
-                              linker_exe='gcc',
-                              linker_so='%s %s %s'
-                                         % (self.linker_dll, shared_option,
-+                                           entry_point),
-+                             linker_exe_cxx='g++',
-+                             linker_so_cxx='%s %s %s'
-+                                        % (self.linker_dll_cxx, shared_option,
-                                            entry_point))
-         # Maybe we should also append -mthreads, but then the finished
-         # dlls need another dll (mingwm10.dll see Mingw32 docs)
-diff --git a/distutils/sysconfig_cpython.py b/distutils/sysconfig_cpython.py
-index 573724d..0a04f33 100644
---- a/distutils/sysconfig_cpython.py
-+++ b/distutils/sysconfig_cpython.py
-@@ -173,9 +173,12 @@ def customize_compiler(compiler):
-                 _osx_support.customize_compiler(_config_vars)
-                 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
- 
--        (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
--            get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
--                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+        (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
-+            get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
-+                            'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+
-+        cflags = ''
-+        cxxflags = ''
- 
-         if 'CC' in os.environ:
-             newcc = os.environ['CC']
-@@ -190,19 +193,27 @@ def customize_compiler(compiler):
-             cxx = os.environ['CXX']
-         if 'LDSHARED' in os.environ:
-             ldshared = os.environ['LDSHARED']
-+        if 'LDCXXSHARED' in os.environ:
-+            ldcxxshared = os.environ['LDCXXSHARED']
-         if 'CPP' in os.environ:
-             cpp = os.environ['CPP']
-         else:
-             cpp = cc + " -E"           # not always
-         if 'LDFLAGS' in os.environ:
-             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
-         if 'CFLAGS' in os.environ:
--            cflags = opt + ' ' + os.environ['CFLAGS']
-+            cflags = os.environ['CFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CFLAGS']
-+        if 'CXXFLAGS' in os.environ:
-+            cxxflags = os.environ['CXXFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
-         if 'CPPFLAGS' in os.environ:
-             cpp = cpp + ' ' + os.environ['CPPFLAGS']
-             cflags = cflags + ' ' + os.environ['CPPFLAGS']
-+            cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
-         if 'AR' in os.environ:
-             ar = os.environ['AR']
-         if 'ARFLAGS' in os.environ:
-@@ -211,13 +222,17 @@ def customize_compiler(compiler):
-             archiver = ar + ' ' + ar_flags
- 
-         cc_cmd = cc + ' ' + cflags
-+        cxx_cmd = cxx + ' ' + cxxflags
-         compiler.set_executables(
-             preprocessor=cpp,
-             compiler=cc_cmd,
-             compiler_so=cc_cmd + ' ' + ccshared,
--            compiler_cxx=cxx,
-+            compiler_cxx=cxx_cmd,
-+            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
-             linker_so=ldshared,
-             linker_exe=cc,
-+            linker_so_cxx=ldcxxshared,
-+            linker_exe_cxx=cxx,
-             archiver=archiver)
- 
-         compiler.shared_lib_extension = shlib_suffix
-diff --git a/distutils/sysconfig_pypy.py b/distutils/sysconfig_pypy.py
-index a0a8dec..aa97c4e 100644
---- a/distutils/sysconfig_pypy.py
-+++ b/distutils/sysconfig_pypy.py
-@@ -72,6 +72,7 @@ def _init_posix():
-     g['CFLAGS'] = "-DNDEBUG -O2"
-     g['CCSHARED'] = "-fPIC"
-     g['LDSHARED'] = "gcc -pthread -shared"
-+    g['LDCXXSHARED'] = "g++ -pthread -shared"
-     g['EXT_SUFFIX'] = so_ext
-     g['SHLIB_SUFFIX'] = so_ext
-     g['SO'] = so_ext  # deprecated in Python 3, for backward compatibility
-@@ -156,36 +157,52 @@ def customize_compiler(compiler):
-                 _osx_support.customize_compiler(_config_vars)
-                 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
- 
--        (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
--            get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
--                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+        (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
-+            get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
-+                            'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+
-+        cflags = ''
-+        cxxflags = ''
- 
-         if 'CC' in os.environ:
-             newcc = os.environ['CC']
--            if (sys.platform == 'darwin'
-+            if (True
-                     and 'LDSHARED' not in os.environ
-                     and ldshared.startswith(cc)):
-                 # On OS X, if CC is overridden, use that as the default
-                 #       command for LDSHARED as well
-+                # Gentoo: s/OS X/every system/
-                 ldshared = newcc + ldshared[len(cc):]
-             cc = newcc
-         if 'CXX' in os.environ:
--            cxx = os.environ['CXX']
-+            newcxx = os.environ['CXX']
-+            if ('LDCXXSHARED' not in os.environ
-+                    and ldcxxshared.startswith(cxx)):
-+                ldcxxshared = newcxx + ldcxxshared[len(cxx):]
-+            cxx = newcxx
-         if 'LDSHARED' in os.environ:
-             ldshared = os.environ['LDSHARED']
-+        if 'LDCXXSHARED' in os.environ:
-+            ldcxxshared = os.environ['LDCXXSHARED']
-         if 'CPP' in os.environ:
-             cpp = os.environ['CPP']
-         else:
-             cpp = cc + " -E"           # not always
-         if 'LDFLAGS' in os.environ:
-             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
-         if 'CFLAGS' in os.environ:
--            cflags = opt + ' ' + os.environ['CFLAGS']
-+            cflags = os.environ['CFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CFLAGS']
-+        if 'CXXFLAGS' in os.environ:
-+            cxxflags = os.environ['CXXFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
-         if 'CPPFLAGS' in os.environ:
-             cpp = cpp + ' ' + os.environ['CPPFLAGS']
-             cflags = cflags + ' ' + os.environ['CPPFLAGS']
-+            cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
-         if 'AR' in os.environ:
-             ar = os.environ['AR']
-         if 'ARFLAGS' in os.environ:
-@@ -194,13 +211,17 @@ def customize_compiler(compiler):
-             archiver = ar + ' ' + ar_flags
- 
-         cc_cmd = cc + ' ' + cflags
-+        cxx_cmd = cxx + ' ' + cxxflags
-         compiler.set_executables(
-             preprocessor=cpp,
-             compiler=cc_cmd,
-             compiler_so=cc_cmd + ' ' + ccshared,
--            compiler_cxx=cxx,
-+            compiler_cxx=cxx_cmd,
-+            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
-             linker_so=ldshared,
-             linker_exe=cc,
-+            linker_so_cxx=ldcxxshared,
-+            linker_exe_cxx=cxx,
-             archiver=archiver)
- 
-         compiler.shared_lib_extension = shlib_suffix
-diff --git a/distutils/unixccompiler.py b/distutils/unixccompiler.py
-index 254b22d..c9cacc1 100644
---- a/distutils/unixccompiler.py
-+++ b/distutils/unixccompiler.py
-@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler):
-     # are pretty generic; they will probably have to be set by an outsider
-     # (eg. using information discovered by the sysconfig about building
-     # Python extensions).
--    executables = {'preprocessor' : None,
--                   'compiler'     : ["cc"],
--                   'compiler_so'  : ["cc"],
--                   'compiler_cxx' : ["c++"],  # pypy: changed, 'cc' is bogus
--                   'linker_so'    : ["cc", "-shared"],
--                   'linker_exe'   : ["cc"],
--                   'archiver'     : ["ar", "-cr"],
--                   'ranlib'       : None,
-+    executables = {'preprocessor'    : None,
-+                   'compiler'        : ["cc"],
-+                   'compiler_so'     : ["cc"],
-+                   'compiler_cxx'    : ["c++"],
-+                   'compiler_so_cxx' : ["c++"],
-+                   'linker_so'       : ["cc", "-shared"],
-+                   'linker_exe'      : ["cc"],
-+                   'linker_so_cxx'   : ["c++", "-shared"],
-+                   'linker_exe_cxx'  : ["c++"],
-+                   'archiver'        : ["ar", "-cr"],
-+                   'ranlib'          : None,
-                   }
- 
-     if sys.platform[:6] == "darwin":
-@@ -125,12 +128,19 @@ class UnixCCompiler(CCompiler):
- 
-     def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
-         compiler_so = self.compiler_so
-+        compiler_so_cxx = self.compiler_so_cxx
-         if sys.platform == 'darwin':
-             compiler_so = _osx_support.compiler_fixup(compiler_so,
-                                                     cc_args + extra_postargs)
-+            compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
-+                                                    cc_args + extra_postargs)
-         try:
--            self.spawn(compiler_so + cc_args + [src, '-o', obj] +
--                       extra_postargs)
-+            if self.detect_language(src) == 'c++':
-+                self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
-+                           extra_postargs)
-+            else:
-+                self.spawn(compiler_so + cc_args + [src, '-o', obj] +
-+                           extra_postargs)
-         except DistutilsExecError as msg:
-             raise CompileError(msg)
- 
-@@ -188,22 +198,16 @@ class UnixCCompiler(CCompiler):
-                 ld_args.extend(extra_postargs)
-             self.mkpath(os.path.dirname(output_filename))
-             try:
--                if target_desc == CCompiler.EXECUTABLE:
--                    linker = self.linker_exe[:]
-+                if target_lang == "c++":
-+                    if target_desc == CCompiler.EXECUTABLE:
-+                        linker = self.linker_exe_cxx[:]
-+                    else:
-+                        linker = self.linker_so_cxx[:]
-                 else:
--                    linker = self.linker_so[:]
--                if target_lang == "c++" and self.compiler_cxx:
--                    # skip over environment variable settings if /usr/bin/env
--                    # is used to set up the linker's environment.
--                    # This is needed on OSX. Note: this assumes that the
--                    # normal and C++ compiler have the same environment
--                    # settings.
--                    i = 0
--                    if os.path.basename(linker[0]) == "env":
--                        i = 1
--                        while '=' in linker[i]:
--                            i += 1
--                    linker[i] = self.compiler_cxx[i]
-+                    if target_desc == CCompiler.EXECUTABLE:
-+                        linker = self.linker_exe[:]
-+                    else:
-+                        linker = self.linker_so[:]
- 
-                 if sys.platform == 'darwin':
-                     linker = _osx_support.compiler_fixup(linker, ld_args)
--- 
-2.12.2
-

diff --git a/dev-python/pypy3/metadata.xml b/dev-python/pypy3/metadata.xml
index 8114c70878c..89f86a0b2be 100644
--- a/dev-python/pypy3/metadata.xml
+++ b/dev-python/pypy3/metadata.xml
@@ -10,7 +10,6 @@
 			This makes it possible to build PyPy using ~3.5G of RAM on amd64 and ~half of that on x86,
 			at the cost of lengthened build time.</flag>
 		<flag name="sandbox">Enable sandboxing functionality</flag>
-		<flag name="shadowstack">Use a shadow stack for finding GC roots</flag>
 	</use>
 	<upstream>
 		<remote-id type="bitbucket">pypy/pypy</remote-id>

diff --git a/dev-python/pypy3/pypy3-5.5.0_alpha.ebuild b/dev-python/pypy3/pypy3-5.5.0_alpha.ebuild
deleted file mode 100644
index 3c4ac7df716..00000000000
--- a/dev-python/pypy3/pypy3-5.5.0_alpha.ebuild
+++ /dev/null
@@ -1,260 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-# pypy3 needs to be built using python 2
-PYTHON_COMPAT=( python2_7 pypy )
-inherit check-reqs eutils multilib multiprocessing pax-utils python-any-r1 toolchain-funcs versionator
-
-CPY_PATCHSET_VERSION="3.3.5-0"
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (3.3) language"
-HOMEPAGE="http://pypy.org/"
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v${PV/_/-}-src.tar.bz2
-	https://dev.gentoo.org/~floppym/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz"
-
-LICENSE="MIT"
-# XX from pypy3-XX.so module suffix
-SLOT="0/55"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox +shadowstack sqlite cpu_flags_x86_sse2 tk"
-
-RDEPEND=">=sys-libs/zlib-1.1.3:0=
-	virtual/libffi:0=
-	virtual/libintl:0=
-	dev-libs/expat:0=
-	!libressl? ( dev-libs/openssl:0=[-bindist] )
-	libressl? ( dev-libs/libressl:0= )
-	bzip2? ( app-arch/bzip2:0= )
-	gdbm? ( sys-libs/gdbm:0= )
-	ncurses? ( sys-libs/ncurses:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!dev-python/pypy3-bin:0"
-DEPEND="${RDEPEND}
-	low-memory? ( virtual/pypy:0 )
-	!low-memory? ( ${PYTHON_DEPS} )"
-#	doc? ( dev-python/sphinx )
-
-# Who would care about predictable directory names?
-S="${WORKDIR}/pypy3-v${PV%_*}-src"
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]]; then
-		if use low-memory; then
-			CHECKREQS_MEMORY="1750M"
-			use amd64 && CHECKREQS_MEMORY="3500M"
-		else
-			CHECKREQS_MEMORY="3G"
-			use amd64 && CHECKREQS_MEMORY="6G"
-		fi
-
-		check-reqs_pkg_pretend
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]]; then
-		pkg_pretend
-
-		# unset to allow forcing pypy below :)
-		use low-memory && local EPYTHON=
-		if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
-			einfo "Using PyPy to perform the translation."
-			local EPYTHON=pypy
-		else
-			einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
-			einfo "recommends using PyPy for that. If you wish to do so, please install"
-			einfo "virtual/pypy and ensure that EPYTHON variable is unset."
-		fi
-
-		python-any-r1_pkg_setup
-	fi
-}
-
-src_prepare() {
-	epatch "${FILESDIR}/4.0.0-gentoo-path.patch" \
-		"${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" \
-		"${FILESDIR}"/2.5.0-shared-lib.patch	# 517002
-
-	sed -e "s^@EPREFIX@^${EPREFIX}^" \
-		-e "s^@libdir@^$(get_libdir)^" \
-		-i lib-python/3/distutils/command/install.py || die
-
-	# apply CPython stdlib patches
-	pushd lib-python/3 > /dev/null || die
-	epatch "${FILESDIR}"/5.2.0-distutils-c++.patch \
-		"${WORKDIR}"/patches/24_all_sqlite-3.8.4.patch
-	popd > /dev/null || die
-
-	epatch_user
-}
-
-src_configure() {
-	tc-export CC
-
-	local jit_backend
-	if use jit; then
-		jit_backend='--jit-backend='
-
-		# We only need the explicit sse2 switch for x86.
-		# On other arches we can rely on autodetection which uses
-		# compiler macros. Plus, --jit-backend= doesn't accept all
-		# the modern values...
-
-		if use x86; then
-			if use cpu_flags_x86_sse2; then
-				jit_backend+=x86
-			else
-				jit_backend+=x86-without-sse2
-			fi
-		else
-			jit_backend+=auto
-		fi
-	fi
-
-	local args=(
-		--shared
-		$(usex jit -Ojit -O2)
-		$(usex shadowstack --gcrootfinder=shadowstack '')
-		$(usex sandbox --sandbox '')
-
-		${jit_backend}
-		--make-jobs=$(makeopts_jobs)
-
-		pypy/goal/targetpypystandalone
-	)
-
-	# Avoid linking against libraries disabled by use flags
-	local opts=(
-		bzip2:bz2
-		ncurses:_minimal_curses
-	)
-
-	local opt
-	for opt in "${opts[@]}"; do
-		local flag=${opt%:*}
-		local mod=${opt#*:}
-
-		args+=(
-			$(usex ${flag} --withmod --withoutmod)-${mod}
-		)
-	done
-
-	local interp=( "${PYTHON}" )
-	if use low-memory; then
-		interp=( env PYPY_GC_MAX_DELTA=200MB
-			"${PYTHON}" --jit loop_longevity=300 )
-	fi
-
-	# translate into the C sources
-	# we're going to make them ourselves since otherwise pypy does not
-	# free up the unneeded memory before spawning the compiler
-	set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
-	echo -e "\033[1m${@}\033[0m"
-	"${@}" || die "translation failed"
-}
-
-src_compile() {
-	emake -C "${T}"/usession*-0/testing_1
-
-	# copy back to make sys.prefix happy
-	cp -p "${T}"/usession*-0/testing_1/{pypy-c,libpypy-c.so} . || die
-	pax-mark m pypy-c libpypy-c.so
-
-	#use doc && emake -C pypy/doc html
-}
-
-src_test() {
-	# (unset)
-	local -x PYTHONDONTWRITEBYTECODE
-
-	# Test runner requires Python 2 too. However, it spawns PyPy3
-	# internally so that we end up testing the correct interpreter.
-	"${PYTHON}" ./pypy/test_all.py --pypy=./pypy-c lib-python || die
-}
-
-src_install() {
-	local dest=/usr/$(get_libdir)/pypy3
-	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}"
-	doins -r include lib_pypy lib-python
-	dosym ../$(get_libdir)/pypy3/pypy-c /usr/bin/pypy3
-	dodoc README.rst
-
-	if ! use gdbm; then
-		rm -r "${ED%/}${dest}"/lib_pypy/gdbm.py \
-			"${ED%/}${dest}"/lib-python/*3/test/test_gdbm.py || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
-			"${ED%/}${dest}"/lib_pypy/_sqlite3.py \
-			"${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED%/}${dest}"/lib-python/*3/{idlelib,tkinter} \
-			"${ED%/}${dest}"/lib_pypy/_tkinter \
-			"${ED%/}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
-	fi
-
-	# Install docs
-	#use doc && dohtml -r pypy/doc/_build/html/
-
-	einfo "Generating caches and byte-compiling ..."
-
-	local -x PYTHON=${ED%/}${dest}/pypy-c
-	local -x LD_LIBRARY_PATH="${ED%/}${dest}"
-	# we can't use eclass function since PyPy is dumb and always gives
-	# paths relative to the interpreter
-	local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages
-	python_export pypy3 EPYTHON
-
-	echo "EPYTHON='${EPYTHON}'" > epython.py || die
-	python_domodule epython.py
-
-	# Generate Grammar and PatternGrammar pickles.
-	"${PYTHON}" -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,
-#    "lzma": "_lzma_build.py",
-#    "_decimal": "_decimal_build.py",
-	cffi_targets=( audioop syslog pwdgrp resource lzma decimal )
-	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 "${ED%/}${dest}"/lib_pypy || die
-	for t in "${cffi_targets[@]}"; do
-		# tkinter doesn't work via -m
-		"${PYTHON}" "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
-	done
-
-	# Cleanup temporary objects
-	find "${ED%/}${dest}" -name "_cffi_*.[co]" -delete || die
-	find "${ED%/}${dest}" -type d -empty -delete || die
-
-	# compile the installed modules
-	python_optimize "${ED%/}${dest}"
-}

diff --git a/dev-python/pypy3/pypy3-5.7.1-r2.ebuild b/dev-python/pypy3/pypy3-5.7.1-r2.ebuild
deleted file mode 100644
index e0a8417672e..00000000000
--- a/dev-python/pypy3/pypy3-5.7.1-r2.ebuild
+++ /dev/null
@@ -1,238 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# pypy3 needs to be built using python 2
-PYTHON_COMPAT=( python2_7 pypy )
-inherit check-reqs pax-utils python-any-r1 toolchain-funcs versionator
-
-MY_P=pypy3-v${PV}
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (3.3) language"
-HOMEPAGE="http://pypy.org/"
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2"
-
-LICENSE="MIT"
-# XX from pypy3-XX.so module suffix
-SLOT="0/57"
-KEYWORDS="~amd64 ~amd64-linux"
-IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite tk"
-
-RDEPEND=">=sys-libs/zlib-1.1.3:0=
-	virtual/libffi:0=
-	virtual/libintl:0=
-	dev-libs/expat:0=
-	!libressl? ( dev-libs/openssl:0=[-bindist] )
-	libressl? ( dev-libs/libressl:0= )
-	bzip2? ( app-arch/bzip2:0= )
-	gdbm? ( sys-libs/gdbm:0= )
-	ncurses? ( sys-libs/ncurses:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!dev-python/pypy3-bin:0"
-DEPEND="${RDEPEND}
-	low-memory? ( virtual/pypy:0 )
-	!low-memory? ( ${PYTHON_DEPS} )"
-#	doc? ( dev-python/sphinx )
-
-S="${WORKDIR}/${MY_P}-src"
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]]; then
-		if use low-memory; then
-			CHECKREQS_MEMORY="1750M"
-			use amd64 && CHECKREQS_MEMORY="3500M"
-		else
-			CHECKREQS_MEMORY="3G"
-			use amd64 && CHECKREQS_MEMORY="6G"
-		fi
-
-		check-reqs_pkg_pretend
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]]; then
-		pkg_pretend
-
-		# unset to allow forcing pypy below :)
-		use low-memory && local EPYTHON=
-		if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
-			einfo "Using PyPy to perform the translation."
-			local EPYTHON=pypy
-		else
-			einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
-			einfo "recommends using PyPy for that. If you wish to do so, please install"
-			einfo "virtual/pypy and ensure that EPYTHON variable is unset."
-		fi
-
-		python-any-r1_pkg_setup
-	fi
-}
-
-src_prepare() {
-	eapply "${FILESDIR}/4.0.0-gentoo-path.patch"
-	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
-	eapply "${FILESDIR}"/2.5.0-shared-lib.patch	# 517002
-	# disarm implicit -flto
-	eapply "${FILESDIR}"/5.7.1-kill-flto.patch
-
-	sed -e "s^@EPREFIX@^${EPREFIX}^" \
-		-e "s^@libdir@^$(get_libdir)^" \
-		-i lib-python/3/distutils/command/install.py || die
-
-	# apply CPython stdlib patches
-	pushd lib-python/3 > /dev/null || die
-	eapply "${FILESDIR}"/5.7.1_all_distutils_cxx.patch
-	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
-	popd > /dev/null || die
-
-	eapply_user
-}
-
-src_configure() {
-	tc-export CC
-
-	local args=(
-		--shared
-		$(usex jit -Ojit -O2)
-		$(usex sandbox --sandbox '')
-
-		--jit-backend=auto
-
-		pypy/goal/targetpypystandalone
-	)
-
-	# Avoid linking against libraries disabled by use flags
-	local opts=(
-		bzip2:bz2
-		ncurses:_minimal_curses
-	)
-
-	local opt
-	for opt in "${opts[@]}"; do
-		local flag=${opt%:*}
-		local mod=${opt#*:}
-
-		args+=(
-			$(usex ${flag} --withmod --withoutmod)-${mod}
-		)
-	done
-
-	local interp=( "${PYTHON}" )
-	if use low-memory; then
-		interp=( env PYPY_GC_MAX_DELTA=200MB
-			"${PYTHON}" --jit loop_longevity=300 )
-	fi
-
-	# translate into the C sources
-	# we're going to make them ourselves since otherwise pypy does not
-	# free up the unneeded memory before spawning the compiler
-	set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
-	echo -e "\033[1m${@}\033[0m"
-	"${@}" || die "translation failed"
-}
-
-src_compile() {
-	emake -C "${T}"/usession*-0/testing_1
-
-	# copy back to make sys.prefix happy
-	cp -p "${T}"/usession*-0/testing_1/{pypy3-c,libpypy3-c.so} . || die
-	pax-mark m pypy3-c libpypy3-c.so
-
-	#use doc && emake -C pypy/doc html
-}
-
-src_test() {
-	# (unset)
-	local -x PYTHONDONTWRITEBYTECODE
-
-	# Test runner requires Python 2 too. However, it spawns PyPy3
-	# internally so that we end up testing the correct interpreter.
-	"${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c lib-python || die
-}
-
-src_install() {
-	local dest=/usr/$(get_libdir)/pypy3
-	einfo "Installing PyPy ..."
-	exeinto "${dest}"
-	doexe pypy3-c libpypy3-c.so
-	pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so"
-	insinto "${dest}"
-	doins -r include lib_pypy lib-python
-	dosym ../$(get_libdir)/pypy3/pypy3-c /usr/bin/pypy3
-	dodoc README.rst
-
-	if ! use gdbm; then
-		rm -r "${ED%/}${dest}"/lib_pypy/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
-			"${ED%/}${dest}"/lib_pypy/_sqlite3* \
-			"${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED%/}${dest}"/lib-python/*3/{idlelib,tkinter} \
-			"${ED%/}${dest}"/lib_pypy/_tkinter \
-			"${ED%/}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
-	fi
-
-	# Install docs
-	#use doc && dohtml -r pypy/doc/_build/html/
-
-	einfo "Generating caches and byte-compiling ..."
-
-	local -x PYTHON=${ED%/}${dest}/pypy3-c
-	local -x LD_LIBRARY_PATH="${ED%/}${dest}"
-	# we can't use eclass function since PyPy is dumb and always gives
-	# paths relative to the interpreter
-	local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages
-	python_export pypy3 EPYTHON
-
-	echo "EPYTHON='${EPYTHON}'" > epython.py || die
-	python_domodule epython.py
-
-	# Generate Grammar and PatternGrammar pickles.
-	"${PYTHON}" -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,
-#    "lzma": "_lzma_build.py",
-#    "_decimal": "_decimal_build.py",
-#    "ssl": "_ssl_build.py",
-	cffi_targets=( audioop syslog pwdgrp resource lzma decimal ssl )
-	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 "${ED%/}${dest}"/lib_pypy || die
-	for t in "${cffi_targets[@]}"; do
-		# tkinter doesn't work via -m
-		"${PYTHON}" "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
-	done
-
-	# Cleanup temporary objects
-	find "${ED%/}${dest}" -name "_cffi_*.[co]" -delete || die
-	find "${ED%/}${dest}" -type d -empty -delete || die
-
-	# compile the installed modules
-	python_optimize "${ED%/}${dest}"
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/
@ 2018-01-05 23:19 Michał Górny
  0 siblings, 0 replies; 17+ messages in thread
From: Michał Górny @ 2018-01-05 23:19 UTC (permalink / raw
  To: gentoo-commits

commit:     e106c34cf8d3786faa62b91f79feb430a2e3d7eb
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jan  5 22:19:47 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jan  5 23:19:26 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e106c34c

dev-python/pypy3: Clean old up

 dev-python/pypy3/Manifest                     |   1 -
 dev-python/pypy3/files/2.5.0-shared-lib.patch |  12 --
 dev-python/pypy3/pypy3-5.8.0.ebuild           | 238 --------------------------
 3 files changed, 251 deletions(-)

diff --git a/dev-python/pypy3/Manifest b/dev-python/pypy3/Manifest
index 0cf5fe7f341..4e6e3227823 100644
--- a/dev-python/pypy3/Manifest
+++ b/dev-python/pypy3/Manifest
@@ -1,3 +1,2 @@
 DIST pypy3-v5.10.0-src.tar.bz2 29075971 BLAKE2B 02fb64d514ab292e09ced57e1c206b04d0fb38353ad6ec0e836448344a6d126d0fccfb61cbd278ea3acaa227032640e82f9ffd7efe3b33ade1ca34a18831b3e4 SHA512 69a373c18dbad9dd617f994ad885c8d8975f0c484ba9dd547e6e892c9a3030a43e9e3ee668aee5f4969403883de1311cef97a0a5e5701921172ee6c2119b771b
-DIST pypy3-v5.8.0-src.tar.bz2 28986883 BLAKE2B dc6c906109269e8d1bd6b171cabf6475aa803e4326a9974ded86fbb0943798317761bc0ae0ab09829a48c073b3755c8a2bdcb03bed4b06b9a70cee061867edb6 SHA512 d78b4c899a5643028664365ed973a7b292a8e5b3989cc75203cd381ea3cda7dd73121c574726e23dca86e8364fcfcf42c372c9deee438c805f30d6e1c4ac115a
 DIST pypy3-v5.9.0-src.tar.bz2 29055111 BLAKE2B 181d87ebe4a83a3f03b28d891f248f718ad120ed54621f8054f19a65aebbe90b65c69e40ca656612356b2019aa9ac22d5e242e688a80190b046511a8ceb9c040 SHA512 3d5384d644fdd1bc8b95f5747dbd1771ae06eb2cfc7b57be359b8bf40177676afd097620d0cb9d9000c40d8cce075cfa6bfd92de987d3dd927c04d7d595dc5bd

diff --git a/dev-python/pypy3/files/2.5.0-shared-lib.patch b/dev-python/pypy3/files/2.5.0-shared-lib.patch
deleted file mode 100644
index b5c877bd58b..00000000000
--- a/dev-python/pypy3/files/2.5.0-shared-lib.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur pypy-2.5.0-src.orig/rpython/translator/platform/posix.py pypy-2.5.0-src/rpython/translator/platform/posix.py
---- a/rpython/translator/platform/posix.py	2015-02-03 05:12:49.000000000 +0800
-+++ b/rpython/translator/platform/posix.py	2015-03-22 07:36:01.420116684 +0800
-@@ -183,7 +183,7 @@
-                    'int main(int argc, char* argv[]) '
-                    '{ return $(PYPY_MAIN_FUNCTION)(argc, argv); }" > $@')
-             m.rule('$(DEFAULT_TARGET)', ['$(TARGET)', 'main.o'],
--                   '$(CC_LINK) $(LDFLAGS_LINK) main.o -L. -l$(SHARED_IMPORT_LIB) -o $@ $(RPATH_FLAGS)')
-+                   '$(CC_LINK) $(LDFLAGS_LINK) main.o -L. -l$(SHARED_IMPORT_LIB) \'-Wl,-rpath,$$ORIGIN\' -o $@')
- 
-         return m
- 

diff --git a/dev-python/pypy3/pypy3-5.8.0.ebuild b/dev-python/pypy3/pypy3-5.8.0.ebuild
deleted file mode 100644
index b286c989e72..00000000000
--- a/dev-python/pypy3/pypy3-5.8.0.ebuild
+++ /dev/null
@@ -1,238 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# pypy3 needs to be built using python 2
-PYTHON_COMPAT=( python2_7 pypy )
-inherit check-reqs pax-utils python-any-r1 toolchain-funcs versionator
-
-MY_P=pypy3-v${PV}
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (3.3) language"
-HOMEPAGE="http://pypy.org/"
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2"
-
-LICENSE="MIT"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-SLOT="0/58"
-KEYWORDS="~amd64 ~amd64-linux"
-IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite tk"
-
-RDEPEND=">=sys-libs/zlib-1.1.3:0=
-	virtual/libffi:0=
-	virtual/libintl:0=
-	dev-libs/expat:0=
-	!libressl? ( dev-libs/openssl:0=[-bindist] )
-	libressl? ( dev-libs/libressl:0= )
-	bzip2? ( app-arch/bzip2:0= )
-	gdbm? ( sys-libs/gdbm:0= )
-	ncurses? ( sys-libs/ncurses:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!dev-python/pypy3-bin:0"
-DEPEND="${RDEPEND}
-	low-memory? ( virtual/pypy:0 )
-	!low-memory? ( ${PYTHON_DEPS} )"
-#	doc? ( dev-python/sphinx )
-
-S="${WORKDIR}/${MY_P}-src"
-
-check_env() {
-	if use low-memory; then
-		CHECKREQS_MEMORY="1750M"
-		use amd64 && CHECKREQS_MEMORY="3500M"
-	else
-		CHECKREQS_MEMORY="3G"
-		use amd64 && CHECKREQS_MEMORY="6G"
-	fi
-
-	check-reqs_pkg_pretend
-}
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} != binary ]] && check_env
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]]; then
-		check_env
-
-		# unset to allow forcing pypy below :)
-		use low-memory && local EPYTHON=
-		if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
-			einfo "Using PyPy to perform the translation."
-			local EPYTHON=pypy
-		else
-			einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
-			einfo "recommends using PyPy for that. If you wish to do so, please install"
-			einfo "virtual/pypy and ensure that EPYTHON variable is unset."
-		fi
-
-		python-any-r1_pkg_setup
-	fi
-}
-
-src_prepare() {
-	eapply "${FILESDIR}/4.0.0-gentoo-path.patch"
-	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
-	eapply "${FILESDIR}"/2.5.0-shared-lib.patch	# 517002
-
-	sed -e "s^@EPREFIX@^${EPREFIX}^" \
-		-e "s^@libdir@^$(get_libdir)^" \
-		-i lib-python/3/distutils/command/install.py || die
-
-	# apply CPython stdlib patches
-	pushd lib-python/3 > /dev/null || die
-	eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch
-	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
-	popd > /dev/null || die
-
-	eapply_user
-}
-
-src_configure() {
-	tc-export CC
-
-	local args=(
-		--shared
-		$(usex jit -Ojit -O2)
-		$(usex sandbox --sandbox '')
-
-		--jit-backend=auto
-
-		pypy/goal/targetpypystandalone
-	)
-
-	# Avoid linking against libraries disabled by use flags
-	local opts=(
-		bzip2:bz2
-		ncurses:_minimal_curses
-	)
-
-	local opt
-	for opt in "${opts[@]}"; do
-		local flag=${opt%:*}
-		local mod=${opt#*:}
-
-		args+=(
-			$(usex ${flag} --withmod --withoutmod)-${mod}
-		)
-	done
-
-	local interp=( "${PYTHON}" )
-	if use low-memory; then
-		interp=( env PYPY_GC_MAX_DELTA=200MB
-			"${PYTHON}" --jit loop_longevity=300 )
-	fi
-
-	# translate into the C sources
-	# we're going to make them ourselves since otherwise pypy does not
-	# free up the unneeded memory before spawning the compiler
-	set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
-	echo -e "\033[1m${@}\033[0m"
-	"${@}" || die "translation failed"
-}
-
-src_compile() {
-	emake -C "${T}"/usession*-0/testing_1
-
-	# copy back to make sys.prefix happy
-	cp -p "${T}"/usession*-0/testing_1/{pypy3-c,libpypy3-c.so} . || die
-	pax-mark m pypy3-c libpypy3-c.so
-
-	#use doc && emake -C pypy/doc html
-}
-
-src_test() {
-	# (unset)
-	local -x PYTHONDONTWRITEBYTECODE
-
-	# Test runner requires Python 2 too. However, it spawns PyPy3
-	# internally so that we end up testing the correct interpreter.
-	"${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c lib-python || die
-}
-
-src_install() {
-	local dest=/usr/$(get_libdir)/pypy3
-	einfo "Installing PyPy ..."
-	exeinto "${dest}"
-	doexe pypy3-c libpypy3-c.so
-	pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so"
-	insinto "${dest}"
-	doins -r include lib_pypy lib-python
-	dosym ../$(get_libdir)/pypy3/pypy3-c /usr/bin/pypy3
-	dodoc README.rst
-
-	if ! use gdbm; then
-		rm -r "${ED%/}${dest}"/lib_pypy/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
-			"${ED%/}${dest}"/lib_pypy/_sqlite3* \
-			"${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED%/}${dest}"/lib-python/*3/{idlelib,tkinter} \
-			"${ED%/}${dest}"/lib_pypy/_tkinter \
-			"${ED%/}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
-	fi
-
-	# Install docs
-	#use doc && dohtml -r pypy/doc/_build/html/
-
-	einfo "Generating caches and byte-compiling ..."
-
-	local -x PYTHON=${ED%/}${dest}/pypy3-c
-	local -x LD_LIBRARY_PATH="${ED%/}${dest}"
-	# we can't use eclass function since PyPy is dumb and always gives
-	# paths relative to the interpreter
-	local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages
-	python_export pypy3 EPYTHON
-
-	echo "EPYTHON='${EPYTHON}'" > epython.py || die
-	python_domodule epython.py
-
-	# Generate Grammar and PatternGrammar pickles.
-	"${PYTHON}" -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,
-#    "lzma": "_lzma_build.py",
-#    "_decimal": "_decimal_build.py",
-#    "ssl": "_ssl_build.py",
-	cffi_targets=( audioop syslog pwdgrp resource lzma decimal ssl )
-	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 "${ED%/}${dest}"/lib_pypy || die
-	for t in "${cffi_targets[@]}"; do
-		# tkinter doesn't work via -m
-		"${PYTHON}" "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
-	done
-
-	# Cleanup temporary objects
-	find "${ED%/}${dest}" -name "_cffi_*.[co]" -delete || die
-	find "${ED%/}${dest}" -type d -empty -delete || die
-
-	# compile the installed modules
-	python_optimize "${ED%/}${dest}"
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/
@ 2019-02-14 22:07 Michał Górny
  0 siblings, 0 replies; 17+ messages in thread
From: Michał Górny @ 2019-02-14 22:07 UTC (permalink / raw
  To: gentoo-commits

commit:     8c6ad58918e983f531e19772f51bbb39e1e04537
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 14 10:27:46 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Feb 14 22:07:10 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c6ad589

dev-python/pypy3: Bump to 7.0.0

Bump to the 7.0.0 release.  Upstream has apparently changed install
location to be /usr/lib/pypy3.5 independently of prefix, so we remove
the Gentoo patch and adjust our paths accordingly.  Also distutils C++
patch needed rebasing.  Thanks to Sander Sweers for early reporting
and research.

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

 dev-python/pypy3/Manifest                          |   1 +
 .../pypy3/files/7.0.0_all_distutils_cxx.patch      | 347 +++++++++++++++++++++
 dev-python/pypy3/pypy3-7.0.0.ebuild                | 240 ++++++++++++++
 3 files changed, 588 insertions(+)

diff --git a/dev-python/pypy3/Manifest b/dev-python/pypy3/Manifest
index c4da582a7c1..e330cd40201 100644
--- a/dev-python/pypy3/Manifest
+++ b/dev-python/pypy3/Manifest
@@ -1 +1,2 @@
 DIST pypy3-v6.0.0-src.tar.bz2 22648140 BLAKE2B b8678859b0c24494788ddf6f410a3ec1a56a04663452e1aba25d3f41c5073a95866d1623f00cb1a6c9d0256df728fa60d1edb5b58d26c0d88577769cc8a6205d SHA512 ea406c4dd1837a6ab13026de01330790f3c18f6e2bfb83e8553e52acf78b43dfb559ce75c2d91395055c771db359356c8183ed950da6f01a21bf09128935af5e
+DIST pypy3.5-v7.0.0-src.tar.bz2 22730690 BLAKE2B 312aea1f88303b225bbfa5e82a28d3c2893d9977b03a3fd12923db15c4a77f04ec3fbce947f0684c4e27073836583ef8a5eaf5be05612e564172170740c2a6e3 SHA512 3facac26e06e254cbf244841824b35ec211859123f6ba9f095dc980292c10d9cf1d11de62cc6372cf77e92ee1cd2358bbd794b3ff25cb7172e1b21c02c8ce6c2

diff --git a/dev-python/pypy3/files/7.0.0_all_distutils_cxx.patch b/dev-python/pypy3/files/7.0.0_all_distutils_cxx.patch
new file mode 100644
index 00000000000..a9099e5c9dc
--- /dev/null
+++ b/dev-python/pypy3/files/7.0.0_all_distutils_cxx.patch
@@ -0,0 +1,347 @@
+From 5c396fb8b644e5de82d9b54cdb088ea673e16e14 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 25 Apr 2017 17:42:33 +0200
+Subject: [PATCH] Fancy distutils C++ support, rebased for PyPy3.5/7.0.0
+
+https://bugs.python.org/issue1222585
+---
+ lib-python/3/_osx_support.py                | 10 ++--
+ lib-python/3/distutils/cygwinccompiler.py   | 21 ++++++--
+ lib-python/3/distutils/sysconfig_cpython.py | 25 ++++++++--
+ lib-python/3/distutils/sysconfig_pypy.py    | 34 ++++++++++---
+ lib-python/3/distutils/unixccompiler.py     | 54 +++++++++++----------
+ lib_pypy/_sysconfigdata.py                  |  1 +
+ 6 files changed, 100 insertions(+), 45 deletions(-)
+
+diff --git a/lib-python/3/_osx_support.py b/lib-python/3/_osx_support.py
+index 13fcd8b8d2..0525be1cbc 100644
+--- a/lib-python/3/_osx_support.py
++++ b/lib-python/3/_osx_support.py
+@@ -14,13 +14,13 @@ __all__ = [
+ # configuration variables that may contain universal build flags,
+ # like "-arch" or "-isdkroot", that may need customization for
+ # the user environment
+-_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
+-                            'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
+-                            'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
+-                            'PY_CORE_CFLAGS')
++_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS',
++                          'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED',
++                          'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS',
++                          'PY_CPPFLAGS', 'PY_CORE_CFLAGS')
+ 
+ # configuration variables that may contain compiler calls
+-_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX')
++_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX')
+ 
+ # prefix added to original configuration variable names
+ _INITPRE = '_OSX_SUPPORT_INITIAL_'
+diff --git a/lib-python/3/distutils/cygwinccompiler.py b/lib-python/3/distutils/cygwinccompiler.py
+index c879646c0f..a6157fbd5f 100644
+--- a/lib-python/3/distutils/cygwinccompiler.py
++++ b/lib-python/3/distutils/cygwinccompiler.py
+@@ -125,8 +125,10 @@ class CygwinCCompiler(UnixCCompiler):
+         # dllwrap 2.10.90 is buggy
+         if self.ld_version >= "2.10.90":
+             self.linker_dll = "gcc"
++            self.linker_dll_cxx = "g++"
+         else:
+             self.linker_dll = "dllwrap"
++            self.linker_dll_cxx = "dllwrap"
+ 
+         # ld_version >= "2.13" support -shared so use it instead of
+         # -mdll -static
+@@ -140,9 +142,13 @@ class CygwinCCompiler(UnixCCompiler):
+         self.set_executables(compiler='gcc -mcygwin -O -Wall',
+                              compiler_so='gcc -mcygwin -mdll -O -Wall',
+                              compiler_cxx='g++ -mcygwin -O -Wall',
++                             compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
+                              linker_exe='gcc -mcygwin',
+                              linker_so=('%s -mcygwin %s' %
+-                                        (self.linker_dll, shared_option)))
++                                        (self.linker_dll, shared_option)),
++                             linker_exe_cxx='g++ -mcygwin',
++                             linker_so_cxx=('%s -mcygwin %s' %
++                                            (self.linker_dll_cxx, shared_option)))
+ 
+         # cygwin and mingw32 need different sets of libraries
+         if self.gcc_version == "2.91.57":
+@@ -166,8 +172,12 @@ class CygwinCCompiler(UnixCCompiler):
+                 raise CompileError(msg)
+         else: # for other files use the C-compiler
+             try:
+-                self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
+-                           extra_postargs)
++                if self.detect_language(src) == 'c++':
++                    self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
++                               extra_postargs)
++                else:
++                    self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
++                               extra_postargs)
+             except DistutilsExecError as msg:
+                 raise CompileError(msg)
+ 
+@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler):
+         self.set_executables(compiler='gcc -O -Wall',
+                              compiler_so='gcc -mdll -O -Wall',
+                              compiler_cxx='g++ -O -Wall',
++                             compiler_so_cxx='g++ -mdll -O -Wall',
+                              linker_exe='gcc',
+                              linker_so='%s %s %s'
+                                         % (self.linker_dll, shared_option,
++                                           entry_point),
++                             linker_exe_cxx='g++',
++                             linker_so_cxx='%s %s %s'
++                                        % (self.linker_dll_cxx, shared_option,
+                                            entry_point))
+         # Maybe we should also append -mthreads, but then the finished
+         # dlls need another dll (mingwm10.dll see Mingw32 docs)
+diff --git a/lib-python/3/distutils/sysconfig_cpython.py b/lib-python/3/distutils/sysconfig_cpython.py
+index 573724ddd7..0a04f33a86 100644
+--- a/lib-python/3/distutils/sysconfig_cpython.py
++++ b/lib-python/3/distutils/sysconfig_cpython.py
+@@ -173,9 +173,12 @@ def customize_compiler(compiler):
+                 _osx_support.customize_compiler(_config_vars)
+                 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
+ 
+-        (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
+-            get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
+-                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
++        (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
++            get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
++                            'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
++
++        cflags = ''
++        cxxflags = ''
+ 
+         if 'CC' in os.environ:
+             newcc = os.environ['CC']
+@@ -190,19 +193,27 @@ def customize_compiler(compiler):
+             cxx = os.environ['CXX']
+         if 'LDSHARED' in os.environ:
+             ldshared = os.environ['LDSHARED']
++        if 'LDCXXSHARED' in os.environ:
++            ldcxxshared = os.environ['LDCXXSHARED']
+         if 'CPP' in os.environ:
+             cpp = os.environ['CPP']
+         else:
+             cpp = cc + " -E"           # not always
+         if 'LDFLAGS' in os.environ:
+             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
+         if 'CFLAGS' in os.environ:
+-            cflags = opt + ' ' + os.environ['CFLAGS']
++            cflags = os.environ['CFLAGS']
+             ldshared = ldshared + ' ' + os.environ['CFLAGS']
++        if 'CXXFLAGS' in os.environ:
++            cxxflags = os.environ['CXXFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
+         if 'CPPFLAGS' in os.environ:
+             cpp = cpp + ' ' + os.environ['CPPFLAGS']
+             cflags = cflags + ' ' + os.environ['CPPFLAGS']
++            cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
+             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
+         if 'AR' in os.environ:
+             ar = os.environ['AR']
+         if 'ARFLAGS' in os.environ:
+@@ -211,13 +222,17 @@ def customize_compiler(compiler):
+             archiver = ar + ' ' + ar_flags
+ 
+         cc_cmd = cc + ' ' + cflags
++        cxx_cmd = cxx + ' ' + cxxflags
+         compiler.set_executables(
+             preprocessor=cpp,
+             compiler=cc_cmd,
+             compiler_so=cc_cmd + ' ' + ccshared,
+-            compiler_cxx=cxx,
++            compiler_cxx=cxx_cmd,
++            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
+             linker_so=ldshared,
+             linker_exe=cc,
++            linker_so_cxx=ldcxxshared,
++            linker_exe_cxx=cxx,
+             archiver=archiver)
+ 
+         compiler.shared_lib_extension = shlib_suffix
+diff --git a/lib-python/3/distutils/sysconfig_pypy.py b/lib-python/3/distutils/sysconfig_pypy.py
+index bf1748e300..70dfd72a1a 100644
+--- a/lib-python/3/distutils/sysconfig_pypy.py
++++ b/lib-python/3/distutils/sysconfig_pypy.py
+@@ -145,36 +145,52 @@ def customize_compiler(compiler):
+                 _osx_support.customize_compiler(_config_vars)
+                 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
+ 
+-        (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
+-            get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
+-                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
++        (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
++            get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
++                            'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
++
++        cflags = ''
++        cxxflags = ''
+ 
+         if 'CC' in os.environ:
+             newcc = os.environ['CC']
+-            if (sys.platform == 'darwin'
++            if (True
+                     and 'LDSHARED' not in os.environ
+                     and ldshared.startswith(cc)):
+                 # On OS X, if CC is overridden, use that as the default
+                 #       command for LDSHARED as well
++                # Gentoo: s/OS X/every system/
+                 ldshared = newcc + ldshared[len(cc):]
+             cc = newcc
+         if 'CXX' in os.environ:
+-            cxx = os.environ['CXX']
++            newcxx = os.environ['CXX']
++            if ('LDCXXSHARED' not in os.environ
++                    and ldcxxshared.startswith(cxx)):
++                ldcxxshared = newcxx + ldcxxshared[len(cxx):]
++            cxx = newcxx
+         if 'LDSHARED' in os.environ:
+             ldshared = os.environ['LDSHARED']
++        if 'LDCXXSHARED' in os.environ:
++            ldcxxshared = os.environ['LDCXXSHARED']
+         if 'CPP' in os.environ:
+             cpp = os.environ['CPP']
+         else:
+             cpp = cc + " -E"           # not always
+         if 'LDFLAGS' in os.environ:
+             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
+         if 'CFLAGS' in os.environ:
+-            cflags = opt + ' ' + os.environ['CFLAGS']
++            cflags = os.environ['CFLAGS']
+             ldshared = ldshared + ' ' + os.environ['CFLAGS']
++        if 'CXXFLAGS' in os.environ:
++            cxxflags = os.environ['CXXFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
+         if 'CPPFLAGS' in os.environ:
+             cpp = cpp + ' ' + os.environ['CPPFLAGS']
+             cflags = cflags + ' ' + os.environ['CPPFLAGS']
++            cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
+             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
+         if 'AR' in os.environ:
+             ar = os.environ['AR']
+         if 'ARFLAGS' in os.environ:
+@@ -183,13 +199,17 @@ def customize_compiler(compiler):
+             archiver = ar + ' ' + ar_flags
+ 
+         cc_cmd = cc + ' ' + cflags
++        cxx_cmd = cxx + ' ' + cxxflags
+         compiler.set_executables(
+             preprocessor=cpp,
+             compiler=cc_cmd,
+             compiler_so=cc_cmd + ' ' + ccshared,
+-            compiler_cxx=cxx,
++            compiler_cxx=cxx_cmd,
++            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
+             linker_so=ldshared,
+             linker_exe=cc,
++            linker_so_cxx=ldcxxshared,
++            linker_exe_cxx=cxx,
+             archiver=archiver)
+ 
+         compiler.shared_lib_extension = shlib_suffix
+diff --git a/lib-python/3/distutils/unixccompiler.py b/lib-python/3/distutils/unixccompiler.py
+index 32030ed150..1db3d5498b 100644
+--- a/lib-python/3/distutils/unixccompiler.py
++++ b/lib-python/3/distutils/unixccompiler.py
+@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler):
+     # are pretty generic; they will probably have to be set by an outsider
+     # (eg. using information discovered by the sysconfig about building
+     # Python extensions).
+-    executables = {'preprocessor' : None,
+-                   'compiler'     : ["cc"],
+-                   'compiler_so'  : ["cc"],
+-                   'compiler_cxx' : ["c++"],  # pypy: changed, 'cc' is bogus
+-                   'linker_so'    : ["cc", "-shared"],
+-                   'linker_exe'   : ["cc"],
+-                   'archiver'     : ["ar", "-cr"],
+-                   'ranlib'       : None,
++    executables = {'preprocessor'    : None,
++                   'compiler'        : ["cc"],
++                   'compiler_so'     : ["cc"],
++                   'compiler_cxx'    : ["c++"],
++                   'compiler_so_cxx' : ["c++"],
++                   'linker_so'       : ["cc", "-shared"],
++                   'linker_exe'      : ["cc"],
++                   'linker_so_cxx'   : ["c++", "-shared"],
++                   'linker_exe_cxx'  : ["c++"],
++                   'archiver'        : ["ar", "-cr"],
++                   'ranlib'          : None,
+                   }
+ 
+     if sys.platform[:6] == "darwin":
+@@ -125,12 +128,19 @@ class UnixCCompiler(CCompiler):
+ 
+     def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
+         compiler_so = self.compiler_so
++        compiler_so_cxx = self.compiler_so_cxx
+         if sys.platform == 'darwin':
+             compiler_so = _osx_support.compiler_fixup(compiler_so,
+                                                     cc_args + extra_postargs)
++            compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
++                                                    cc_args + extra_postargs)
+         try:
+-            self.spawn(compiler_so + cc_args + [src, '-o', obj] +
+-                       extra_postargs)
++            if self.detect_language(src) == 'c++':
++                self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
++                           extra_postargs)
++            else:
++                self.spawn(compiler_so + cc_args + [src, '-o', obj] +
++                           extra_postargs)
+         except DistutilsExecError as msg:
+             raise CompileError(msg)
+ 
+@@ -188,22 +198,16 @@ class UnixCCompiler(CCompiler):
+                 ld_args.extend(extra_postargs)
+             self.mkpath(os.path.dirname(output_filename))
+             try:
+-                if target_desc == CCompiler.EXECUTABLE:
+-                    linker = self.linker_exe[:]
++                if target_lang == "c++":
++                    if target_desc == CCompiler.EXECUTABLE:
++                        linker = self.linker_exe_cxx[:]
++                    else:
++                        linker = self.linker_so_cxx[:]
+                 else:
+-                    linker = self.linker_so[:]
+-                if target_lang == "c++" and self.compiler_cxx:
+-                    # skip over environment variable settings if /usr/bin/env
+-                    # is used to set up the linker's environment.
+-                    # This is needed on OSX. Note: this assumes that the
+-                    # normal and C++ compiler have the same environment
+-                    # settings.
+-                    i = 0
+-                    if os.path.basename(linker[0]) == "env":
+-                        i = 1
+-                        while '=' in linker[i]:
+-                            i += 1
+-                    linker[i] = self.compiler_cxx[i]
++                    if target_desc == CCompiler.EXECUTABLE:
++                        linker = self.linker_exe[:]
++                    else:
++                        linker = self.linker_so[:]
+ 
+                 if sys.platform == 'darwin':
+                     linker = _osx_support.compiler_fixup(linker, ld_args)
+diff --git a/lib_pypy/_sysconfigdata.py b/lib_pypy/_sysconfigdata.py
+index 2ceafe80bf..ee3f802c41 100644
+--- a/lib_pypy/_sysconfigdata.py
++++ b/lib_pypy/_sysconfigdata.py
+@@ -15,6 +15,7 @@ build_time_vars = {
+     'CFLAGS': "-DNDEBUG -O2",
+     'CCSHARED': "-fPIC",
+     'LDSHARED': "cc -pthread -shared",
++    'LDCXXSHARED': "c++ -pthread -shared",
+     'EXT_SUFFIX': so_ext,
+     'SHLIB_SUFFIX': ".so",
+     'AR': "ar",
+-- 
+2.20.1
+

diff --git a/dev-python/pypy3/pypy3-7.0.0.ebuild b/dev-python/pypy3/pypy3-7.0.0.ebuild
new file mode 100644
index 00000000000..c318a1f521a
--- /dev/null
+++ b/dev-python/pypy3/pypy3-7.0.0.ebuild
@@ -0,0 +1,240 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# pypy3 needs to be built using python 2
+PYTHON_COMPAT=( python2_7 pypy )
+inherit check-reqs pax-utils python-any-r1 toolchain-funcs
+
+MY_P=pypy3.5-v${PV}
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (3.5) language"
+HOMEPAGE="http://pypy.org/"
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2"
+
+LICENSE="MIT"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+SLOT="0/71"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite tk"
+
+RDEPEND=">=sys-libs/zlib-1.1.3:0=
+	virtual/libffi:0=
+	virtual/libintl:0=
+	dev-libs/expat:0=
+	!libressl? ( dev-libs/openssl:0=[-bindist] )
+	libressl? ( dev-libs/libressl:0= )
+	bzip2? ( app-arch/bzip2:0= )
+	gdbm? ( sys-libs/gdbm:0= )
+	ncurses? ( sys-libs/ncurses:0= )
+	sqlite? ( dev-db/sqlite:3= )
+	tk? (
+		dev-lang/tk:0=
+		dev-tcltk/tix:0=
+	)
+	!dev-python/pypy3-bin:0"
+DEPEND="${RDEPEND}
+	low-memory? ( virtual/pypy )
+	!low-memory? (
+		|| (
+			virtual/pypy
+			(
+				dev-lang/python:2.7
+				dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)]
+			)
+		)
+	)"
+
+S="${WORKDIR}/${MY_P}-src"
+
+check_env() {
+	if use low-memory; then
+		CHECKREQS_MEMORY="1750M"
+		use amd64 && CHECKREQS_MEMORY="3500M"
+	else
+		CHECKREQS_MEMORY="3G"
+		use amd64 && CHECKREQS_MEMORY="6G"
+	fi
+
+	check-reqs_pkg_pretend
+}
+
+pkg_pretend() {
+	[[ ${MERGE_TYPE} != binary ]] && check_env
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		check_env
+
+		# unset to allow forcing pypy below :)
+		use low-memory && local EPYTHON=
+		if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
+			einfo "Using PyPy to perform the translation."
+			local EPYTHON=pypy
+		else
+			einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
+			einfo "recommends using PyPy for that. If you wish to do so, please install"
+			einfo "virtual/pypy and ensure that EPYTHON variable is unset."
+		fi
+
+		python-any-r1_pkg_setup
+	fi
+}
+
+src_prepare() {
+	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
+	eapply "${FILESDIR}"/5.9.0-shared-lib.patch	# 517002
+	eapply "${FILESDIR}"/7.0.0_all_distutils_cxx.patch
+
+	# apply CPython stdlib patches
+	pushd lib-python/3 > /dev/null || die
+	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
+	popd > /dev/null || die
+
+	eapply_user
+}
+
+src_configure() {
+	tc-export CC
+
+	local args=(
+		--shared
+		$(usex jit -Ojit -O2)
+		$(usex sandbox --sandbox '')
+
+		--jit-backend=auto
+
+		pypy/goal/targetpypystandalone
+	)
+
+	# Avoid linking against libraries disabled by use flags
+	local opts=(
+		bzip2:bz2
+		ncurses:_minimal_curses
+	)
+
+	local opt
+	for opt in "${opts[@]}"; do
+		local flag=${opt%:*}
+		local mod=${opt#*:}
+
+		args+=(
+			$(usex ${flag} --withmod --withoutmod)-${mod}
+		)
+	done
+
+	local interp=( "${PYTHON}" )
+	if use low-memory; then
+		interp=( env PYPY_GC_MAX_DELTA=200MB
+			"${PYTHON}" --jit loop_longevity=300 )
+	fi
+
+	# translate into the C sources
+	# we're going to make them ourselves since otherwise pypy does not
+	# free up the unneeded memory before spawning the compiler
+	set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
+	echo -e "\033[1m${@}\033[0m"
+	"${@}" || die "translation failed"
+}
+
+src_compile() {
+	emake -C "${T}"/usession*-0/testing_1
+
+	# copy back to make sys.prefix happy
+	cp -p "${T}"/usession*-0/testing_1/{pypy3-c,libpypy3-c.so} . || die
+	pax-mark m pypy3-c libpypy3-c.so
+
+	einfo "Generating caches and CFFI modules ..."
+
+	# Generate Grammar and PatternGrammar pickles.
+	./pypy3-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,
+#    "lzma": "_lzma_build.py",
+#    "_decimal": "_decimal_build.py",
+#    "_ssl": "_ssl_build.py",
+	cffi_targets=( audioop syslog pwdgrp resource lzma decimal ssl )
+	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
+		../pypy3-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=
+
+	# Test runner requires Python 2 too. However, it spawns PyPy3
+	# internally so that we end up testing the correct interpreter.
+	"${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python || die
+}
+
+src_install() {
+	local dest=/usr/lib/pypy3.5
+	einfo "Installing PyPy ..."
+	exeinto "${dest}"
+	doexe pypy3-c libpypy3-c.so
+	pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so"
+	insinto "${dest}"
+	# preserve mtimes to avoid obsoleting caches
+	insopts -p
+	doins -r include lib_pypy lib-python
+	dosym ../lib/pypy3.5/pypy3-c /usr/bin/pypy3
+	dodoc README.rst
+
+	if ! use gdbm; then
+		rm -r "${ED%/}${dest}"/lib_pypy/_gdbm* || die
+	fi
+	if ! use sqlite; then
+		rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
+			"${ED%/}${dest}"/lib_pypy/_sqlite3* \
+			"${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || die
+	fi
+	if ! use tk; then
+		rm -r "${ED%/}${dest}"/lib-python/*3/{idlelib,tkinter} \
+			"${ED%/}${dest}"/lib_pypy/_tkinter \
+			"${ED%/}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
+	fi
+
+	einfo "Generating caches and byte-compiling ..."
+
+	local -x PYTHON=${ED%/}${dest}/pypy3-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/pypy3.5/site-packages
+	python_export pypy3 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}"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/
@ 2019-02-16 15:08 Michał Górny
  0 siblings, 0 replies; 17+ messages in thread
From: Michał Górny @ 2019-02-16 15:08 UTC (permalink / raw
  To: gentoo-commits

commit:     233a876f75e258f9e72383917a1c2ee40ca55aa6
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 16 14:45:01 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Feb 16 15:08:24 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=233a876f

dev-python/pypy3: Restore Gentoo path patch

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

 dev-python/pypy3/files/7.0.0-gentoo-path.patch     | 52 ++++++++++++++++++++++
 .../{pypy3-7.0.0.ebuild => pypy3-7.0.0-r1.ebuild}  |  4 ++
 dev-python/pypy3/pypy3-9999.ebuild                 |  4 ++
 3 files changed, 60 insertions(+)

diff --git a/dev-python/pypy3/files/7.0.0-gentoo-path.patch b/dev-python/pypy3/files/7.0.0-gentoo-path.patch
new file mode 100644
index 00000000000..17409fa89a4
--- /dev/null
+++ b/dev-python/pypy3/files/7.0.0-gentoo-path.patch
@@ -0,0 +1,52 @@
+From 44c16c344f137cc91a145294c4124174fc25ad16 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 27 Nov 2015 17:02:42 +0100
+Subject: [PATCH] Gentoo: override paths for system-wide install based on
+ sys.prefix
+
+Override all default distutils install paths to ones suitable for
+system-wide install when sys.prefix indicates we're running the Gentoo
+system-wide install of PyPy with no prefix overrides (e.g. virtualenv).
+
+Fixes: https://bugs.gentoo.org/462306
+Fixes: https://bugs.gentoo.org/465546
+
+[updated for 7.0.0]
+---
+ lib-python/3/distutils/command/install.py | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/lib-python/3/distutils/command/install.py b/lib-python/3/distutils/command/install.py
+index 77a1827d4b..255603967f 100644
+--- a/lib-python/3/distutils/command/install.py
++++ b/lib-python/3/distutils/command/install.py
+@@ -50,6 +50,13 @@ INSTALL_SCHEMES = {
+         'scripts': '$base/bin',
+         'data'   : '$base',
+         },
++    'gentoo': {
++        'purelib': '$base/site-packages',
++        'platlib': '$base/site-packages',
++        'headers': '$base/include',
++        'scripts': '@EPREFIX@/usr/bin',
++        'data'   : '@EPREFIX@/usr',
++        },
+     }
+ 
+ # user site schemes
+@@ -461,7 +468,11 @@ class install(Command):
+         # it's the caller's problem if they supply a bad name!
+         if (hasattr(sys, 'pypy_version_info') and
+             not name.endswith(('_user', '_home'))):
+-            name = 'pypy'
++            if self.install_base == os.path.normpath('@EPREFIX@/usr/lib/pypy3.5'):
++                # override paths for system-wide install
++                name = 'gentoo'
++            else:
++                name = 'pypy'
+         scheme = INSTALL_SCHEMES[name]
+         for key in SCHEME_KEYS:
+             attrname = 'install_' + key
+-- 
+2.21.0.rc1
+

diff --git a/dev-python/pypy3/pypy3-7.0.0.ebuild b/dev-python/pypy3/pypy3-7.0.0-r1.ebuild
similarity index 97%
rename from dev-python/pypy3/pypy3-7.0.0.ebuild
rename to dev-python/pypy3/pypy3-7.0.0-r1.ebuild
index c318a1f521a..87ce4dbc248 100644
--- a/dev-python/pypy3/pypy3-7.0.0.ebuild
+++ b/dev-python/pypy3/pypy3-7.0.0-r1.ebuild
@@ -84,10 +84,14 @@ pkg_setup() {
 }
 
 src_prepare() {
+	eapply "${FILESDIR}/7.0.0-gentoo-path.patch"
 	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
 	eapply "${FILESDIR}"/5.9.0-shared-lib.patch	# 517002
 	eapply "${FILESDIR}"/7.0.0_all_distutils_cxx.patch
 
+	sed -e "s^@EPREFIX@^${EPREFIX}^" \
+		-i lib-python/3/distutils/command/install.py || die
+
 	# apply CPython stdlib patches
 	pushd lib-python/3 > /dev/null || die
 	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch

diff --git a/dev-python/pypy3/pypy3-9999.ebuild b/dev-python/pypy3/pypy3-9999.ebuild
index 3b0362d0252..236616d1f28 100644
--- a/dev-python/pypy3/pypy3-9999.ebuild
+++ b/dev-python/pypy3/pypy3-9999.ebuild
@@ -92,10 +92,14 @@ src_unpack() {
 }
 
 src_prepare() {
+	eapply "${FILESDIR}/7.0.0-gentoo-path.patch"
 	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
 	eapply "${FILESDIR}"/5.9.0-shared-lib.patch	# 517002
 	eapply "${FILESDIR}"/7.0.0_all_distutils_cxx.patch
 
+	sed -e "s^@EPREFIX@^${EPREFIX}^" \
+		-i lib-python/3/distutils/command/install.py || die
+
 	# apply CPython stdlib patches
 	pushd lib-python/3 > /dev/null || die
 	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/
@ 2019-05-24 14:21 Michał Górny
  0 siblings, 0 replies; 17+ messages in thread
From: Michał Górny @ 2019-05-24 14:21 UTC (permalink / raw
  To: gentoo-commits

commit:     69aac0302c7db2c99ae564fc564218fe5f14f843
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri May 24 14:15:31 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri May 24 14:21:33 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69aac030

dev-python/pypy3: Drop old (<7.1.1)

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

 dev-python/pypy3/Manifest                          |   3 -
 dev-python/pypy3/files/4.0.0-gentoo-path.patch     |  50 ---
 .../pypy3/files/5.8.0_all_distutils_cxx.patch      | 342 ---------------------
 dev-python/pypy3/pypy3-6.0.0.ebuild                | 245 ---------------
 dev-python/pypy3/pypy3-7.0.0-r1.ebuild             | 244 ---------------
 dev-python/pypy3/pypy3-7.1.0.ebuild                | 250 ---------------
 6 files changed, 1134 deletions(-)

diff --git a/dev-python/pypy3/Manifest b/dev-python/pypy3/Manifest
index 40244f11480..d687ce6ca9f 100644
--- a/dev-python/pypy3/Manifest
+++ b/dev-python/pypy3/Manifest
@@ -1,4 +1 @@
-DIST pypy3-v6.0.0-src.tar.bz2 22648140 BLAKE2B b8678859b0c24494788ddf6f410a3ec1a56a04663452e1aba25d3f41c5073a95866d1623f00cb1a6c9d0256df728fa60d1edb5b58d26c0d88577769cc8a6205d SHA512 ea406c4dd1837a6ab13026de01330790f3c18f6e2bfb83e8553e52acf78b43dfb559ce75c2d91395055c771db359356c8183ed950da6f01a21bf09128935af5e
-DIST pypy3.5-v7.0.0-src.tar.bz2 22730690 BLAKE2B 312aea1f88303b225bbfa5e82a28d3c2893d9977b03a3fd12923db15c4a77f04ec3fbce947f0684c4e27073836583ef8a5eaf5be05612e564172170740c2a6e3 SHA512 3facac26e06e254cbf244841824b35ec211859123f6ba9f095dc980292c10d9cf1d11de62cc6372cf77e92ee1cd2358bbd794b3ff25cb7172e1b21c02c8ce6c2
-DIST pypy3.6-v7.1.0-src.tar.bz2 23167216 BLAKE2B 12a085c2d4820289643818d8bc1c17304e4cf4f4687054452d878c6f26fd36802bbbe5baee73f0ce2f0322e126dbccbcf7b48ca6569bb7eb8d59f473bd80d4b1 SHA512 1a0a9e9de31c63114c0537747c4a718504a28b780a2ef1f76bff6051a1ec68b496b574989f0b729c07611cd81e199135dd268834dfa6f9664e1e119db8ae20e4
 DIST pypy3.6-v7.1.1-src.tar.bz2 23171982 BLAKE2B be43528bc6f3e02d146016a4969bd8c7a9e880a3bd3b77f441aac6d22ef67700f71e0171ec000066bd2c0bd506db64af69d6b75b59a92222dd0353ee70e6629b SHA512 17e78f9c7080d597a6283d8e8247d1ca78f09a14ff221db8c3d90d255b5befc73102b317ca34a80979e544d5ee72f3e5e649f89d185a085f4cc15012da4d0473

diff --git a/dev-python/pypy3/files/4.0.0-gentoo-path.patch b/dev-python/pypy3/files/4.0.0-gentoo-path.patch
deleted file mode 100644
index cf96d3fb2a5..00000000000
--- a/dev-python/pypy3/files/4.0.0-gentoo-path.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 165e05bbdc93e54411217c0198d0a5cbb9de4e33 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Fri, 27 Nov 2015 17:02:42 +0100
-Subject: [PATCH] Gentoo: override paths for system-wide install based on
- sys.prefix
-
-Override all default distutils install paths to ones suitable for
-system-wide install when sys.prefix indicates we're running the Gentoo
-system-wide install of PyPy with no prefix overrides (e.g. virtualenv).
-
-Fixes: https://bugs.gentoo.org/462306
-Fixes: https://bugs.gentoo.org/465546
----
- lib-python/3/distutils/command/install.py | 13 ++++++++++++-
- 1 file changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/lib-python/3/distutils/command/install.py b/lib-python/3/distutils/command/install.py
-index fc43951..fed5218 100644
---- a/lib-python/3/distutils/command/install.py
-+++ b/lib-python/3/distutils/command/install.py
-@@ -90,6 +90,13 @@ INSTALL_SCHEMES = {
-         'scripts': '$base/bin',
-         'data'   : '$base',
-         },
-+    'gentoo': {
-+        'purelib': '$base/site-packages',
-+        'platlib': '$base/site-packages',
-+        'headers': '$base/include',
-+        'scripts': '@EPREFIX@/usr/bin',
-+        'data'   : '@EPREFIX@/usr',
-+        },
-     }
- 
- # The keys to an installation scheme; if any new types of files are to be
-@@ -476,7 +483,11 @@ class install (Command):
-         # it's the caller's problem if they supply a bad name!
-         if (hasattr(sys, 'pypy_version_info') and
-             not name.endswith(('_user', '_home'))):
--            name = 'pypy'
-+            if self.install_base == os.path.normpath('@EPREFIX@/usr/@libdir@/pypy3'):
-+                # override paths for system-wide install
-+                name = 'gentoo'
-+            else:
-+                name = 'pypy'
-         scheme = INSTALL_SCHEMES[name]
-         for key in SCHEME_KEYS:
-             attrname = 'install_' + key
--- 
-2.6.3
-

diff --git a/dev-python/pypy3/files/5.8.0_all_distutils_cxx.patch b/dev-python/pypy3/files/5.8.0_all_distutils_cxx.patch
deleted file mode 100644
index 5d89ce2711c..00000000000
--- a/dev-python/pypy3/files/5.8.0_all_distutils_cxx.patch
+++ /dev/null
@@ -1,342 +0,0 @@
-From b2f2c9d23996d431d606ac7d8ed731a5302b4e97 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Tue, 25 Apr 2017 17:42:33 +0200
-Subject: [PATCH] Fancy distutils C++ support, rebased for PyPy3.5
-
-https://bugs.python.org/issue1222585
----
- _osx_support.py                | 10 +++---
- distutils/cygwinccompiler.py   | 21 +++++++++--
- distutils/sysconfig_cpython.py | 25 ++++++++++---
- distutils/sysconfig_pypy.py    | 35 +++++++++++++++----
- distutils/unixccompiler.py     | 54 ++++++++++++++++-------------
- 5 files changed, 100 insertions(+), 45 deletions(-)
-
-diff --git a/_osx_support.py b/_osx_support.py
-index 13fcd8b..0525be1 100644
---- a/_osx_support.py
-+++ b/_osx_support.py
-@@ -14,13 +14,13 @@ __all__ = [
- # configuration variables that may contain universal build flags,
- # like "-arch" or "-isdkroot", that may need customization for
- # the user environment
--_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
--                            'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
--                            'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
--                            'PY_CORE_CFLAGS')
-+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS',
-+                          'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED',
-+                          'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS',
-+                          'PY_CPPFLAGS', 'PY_CORE_CFLAGS')
- 
- # configuration variables that may contain compiler calls
--_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX')
-+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX')
- 
- # prefix added to original configuration variable names
- _INITPRE = '_OSX_SUPPORT_INITIAL_'
-diff --git a/distutils/cygwinccompiler.py b/distutils/cygwinccompiler.py
-index c879646..a6157fb 100644
---- a/distutils/cygwinccompiler.py
-+++ b/distutils/cygwinccompiler.py
-@@ -125,8 +125,10 @@ class CygwinCCompiler(UnixCCompiler):
-         # dllwrap 2.10.90 is buggy
-         if self.ld_version >= "2.10.90":
-             self.linker_dll = "gcc"
-+            self.linker_dll_cxx = "g++"
-         else:
-             self.linker_dll = "dllwrap"
-+            self.linker_dll_cxx = "dllwrap"
- 
-         # ld_version >= "2.13" support -shared so use it instead of
-         # -mdll -static
-@@ -140,9 +142,13 @@ class CygwinCCompiler(UnixCCompiler):
-         self.set_executables(compiler='gcc -mcygwin -O -Wall',
-                              compiler_so='gcc -mcygwin -mdll -O -Wall',
-                              compiler_cxx='g++ -mcygwin -O -Wall',
-+                             compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
-                              linker_exe='gcc -mcygwin',
-                              linker_so=('%s -mcygwin %s' %
--                                        (self.linker_dll, shared_option)))
-+                                        (self.linker_dll, shared_option)),
-+                             linker_exe_cxx='g++ -mcygwin',
-+                             linker_so_cxx=('%s -mcygwin %s' %
-+                                            (self.linker_dll_cxx, shared_option)))
- 
-         # cygwin and mingw32 need different sets of libraries
-         if self.gcc_version == "2.91.57":
-@@ -166,8 +172,12 @@ class CygwinCCompiler(UnixCCompiler):
-                 raise CompileError(msg)
-         else: # for other files use the C-compiler
-             try:
--                self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
--                           extra_postargs)
-+                if self.detect_language(src) == 'c++':
-+                    self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
-+                               extra_postargs)
-+                else:
-+                    self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-+                               extra_postargs)
-             except DistutilsExecError as msg:
-                 raise CompileError(msg)
- 
-@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler):
-         self.set_executables(compiler='gcc -O -Wall',
-                              compiler_so='gcc -mdll -O -Wall',
-                              compiler_cxx='g++ -O -Wall',
-+                             compiler_so_cxx='g++ -mdll -O -Wall',
-                              linker_exe='gcc',
-                              linker_so='%s %s %s'
-                                         % (self.linker_dll, shared_option,
-+                                           entry_point),
-+                             linker_exe_cxx='g++',
-+                             linker_so_cxx='%s %s %s'
-+                                        % (self.linker_dll_cxx, shared_option,
-                                            entry_point))
-         # Maybe we should also append -mthreads, but then the finished
-         # dlls need another dll (mingwm10.dll see Mingw32 docs)
-diff --git a/distutils/sysconfig_cpython.py b/distutils/sysconfig_cpython.py
-index 573724d..0a04f33 100644
---- a/distutils/sysconfig_cpython.py
-+++ b/distutils/sysconfig_cpython.py
-@@ -173,9 +173,12 @@ def customize_compiler(compiler):
-                 _osx_support.customize_compiler(_config_vars)
-                 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
- 
--        (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
--            get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
--                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+        (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
-+            get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
-+                            'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+
-+        cflags = ''
-+        cxxflags = ''
- 
-         if 'CC' in os.environ:
-             newcc = os.environ['CC']
-@@ -190,19 +193,27 @@ def customize_compiler(compiler):
-             cxx = os.environ['CXX']
-         if 'LDSHARED' in os.environ:
-             ldshared = os.environ['LDSHARED']
-+        if 'LDCXXSHARED' in os.environ:
-+            ldcxxshared = os.environ['LDCXXSHARED']
-         if 'CPP' in os.environ:
-             cpp = os.environ['CPP']
-         else:
-             cpp = cc + " -E"           # not always
-         if 'LDFLAGS' in os.environ:
-             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
-         if 'CFLAGS' in os.environ:
--            cflags = opt + ' ' + os.environ['CFLAGS']
-+            cflags = os.environ['CFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CFLAGS']
-+        if 'CXXFLAGS' in os.environ:
-+            cxxflags = os.environ['CXXFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
-         if 'CPPFLAGS' in os.environ:
-             cpp = cpp + ' ' + os.environ['CPPFLAGS']
-             cflags = cflags + ' ' + os.environ['CPPFLAGS']
-+            cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
-         if 'AR' in os.environ:
-             ar = os.environ['AR']
-         if 'ARFLAGS' in os.environ:
-@@ -211,13 +222,17 @@ def customize_compiler(compiler):
-             archiver = ar + ' ' + ar_flags
- 
-         cc_cmd = cc + ' ' + cflags
-+        cxx_cmd = cxx + ' ' + cxxflags
-         compiler.set_executables(
-             preprocessor=cpp,
-             compiler=cc_cmd,
-             compiler_so=cc_cmd + ' ' + ccshared,
--            compiler_cxx=cxx,
-+            compiler_cxx=cxx_cmd,
-+            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
-             linker_so=ldshared,
-             linker_exe=cc,
-+            linker_so_cxx=ldcxxshared,
-+            linker_exe_cxx=cxx,
-             archiver=archiver)
- 
-         compiler.shared_lib_extension = shlib_suffix
-diff --git a/distutils/sysconfig_pypy.py b/distutils/sysconfig_pypy.py
-index a0a8dec..aa97c4e 100644
---- a/distutils/sysconfig_pypy.py
-+++ b/distutils/sysconfig_pypy.py
-@@ -72,6 +72,7 @@ def _init_posix():
-     g['CFLAGS'] = "-DNDEBUG -O2"
-     g['CCSHARED'] = "-fPIC"
-     g['LDSHARED'] = "cc -pthread -shared"
-+    g['LDCXXSHARED'] = "c++ -pthread -shared"
-     g['EXT_SUFFIX'] = so_ext
-     g['SHLIB_SUFFIX'] = so_ext
-     g['SO'] = so_ext  # deprecated in Python 3, for backward compatibility
-@@ -156,36 +157,52 @@ def customize_compiler(compiler):
-                 _osx_support.customize_compiler(_config_vars)
-                 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
- 
--        (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
--            get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
--                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+        (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
-+            get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
-+                            'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+
-+        cflags = ''
-+        cxxflags = ''
- 
-         if 'CC' in os.environ:
-             newcc = os.environ['CC']
--            if (sys.platform == 'darwin'
-+            if (True
-                     and 'LDSHARED' not in os.environ
-                     and ldshared.startswith(cc)):
-                 # On OS X, if CC is overridden, use that as the default
-                 #       command for LDSHARED as well
-+                # Gentoo: s/OS X/every system/
-                 ldshared = newcc + ldshared[len(cc):]
-             cc = newcc
-         if 'CXX' in os.environ:
--            cxx = os.environ['CXX']
-+            newcxx = os.environ['CXX']
-+            if ('LDCXXSHARED' not in os.environ
-+                    and ldcxxshared.startswith(cxx)):
-+                ldcxxshared = newcxx + ldcxxshared[len(cxx):]
-+            cxx = newcxx
-         if 'LDSHARED' in os.environ:
-             ldshared = os.environ['LDSHARED']
-+        if 'LDCXXSHARED' in os.environ:
-+            ldcxxshared = os.environ['LDCXXSHARED']
-         if 'CPP' in os.environ:
-             cpp = os.environ['CPP']
-         else:
-             cpp = cc + " -E"           # not always
-         if 'LDFLAGS' in os.environ:
-             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
-         if 'CFLAGS' in os.environ:
--            cflags = opt + ' ' + os.environ['CFLAGS']
-+            cflags = os.environ['CFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CFLAGS']
-+        if 'CXXFLAGS' in os.environ:
-+            cxxflags = os.environ['CXXFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
-         if 'CPPFLAGS' in os.environ:
-             cpp = cpp + ' ' + os.environ['CPPFLAGS']
-             cflags = cflags + ' ' + os.environ['CPPFLAGS']
-+            cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
-         if 'AR' in os.environ:
-             ar = os.environ['AR']
-         if 'ARFLAGS' in os.environ:
-@@ -194,13 +211,17 @@ def customize_compiler(compiler):
-             archiver = ar + ' ' + ar_flags
- 
-         cc_cmd = cc + ' ' + cflags
-+        cxx_cmd = cxx + ' ' + cxxflags
-         compiler.set_executables(
-             preprocessor=cpp,
-             compiler=cc_cmd,
-             compiler_so=cc_cmd + ' ' + ccshared,
--            compiler_cxx=cxx,
-+            compiler_cxx=cxx_cmd,
-+            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
-             linker_so=ldshared,
-             linker_exe=cc,
-+            linker_so_cxx=ldcxxshared,
-+            linker_exe_cxx=cxx,
-             archiver=archiver)
- 
-         compiler.shared_lib_extension = shlib_suffix
-diff --git a/distutils/unixccompiler.py b/distutils/unixccompiler.py
-index 254b22d..c9cacc1 100644
---- a/distutils/unixccompiler.py
-+++ b/distutils/unixccompiler.py
-@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler):
-     # are pretty generic; they will probably have to be set by an outsider
-     # (eg. using information discovered by the sysconfig about building
-     # Python extensions).
--    executables = {'preprocessor' : None,
--                   'compiler'     : ["cc"],
--                   'compiler_so'  : ["cc"],
--                   'compiler_cxx' : ["c++"],  # pypy: changed, 'cc' is bogus
--                   'linker_so'    : ["cc", "-shared"],
--                   'linker_exe'   : ["cc"],
--                   'archiver'     : ["ar", "-cr"],
--                   'ranlib'       : None,
-+    executables = {'preprocessor'    : None,
-+                   'compiler'        : ["cc"],
-+                   'compiler_so'     : ["cc"],
-+                   'compiler_cxx'    : ["c++"],
-+                   'compiler_so_cxx' : ["c++"],
-+                   'linker_so'       : ["cc", "-shared"],
-+                   'linker_exe'      : ["cc"],
-+                   'linker_so_cxx'   : ["c++", "-shared"],
-+                   'linker_exe_cxx'  : ["c++"],
-+                   'archiver'        : ["ar", "-cr"],
-+                   'ranlib'          : None,
-                   }
- 
-     if sys.platform[:6] == "darwin":
-@@ -125,12 +128,19 @@ class UnixCCompiler(CCompiler):
- 
-     def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
-         compiler_so = self.compiler_so
-+        compiler_so_cxx = self.compiler_so_cxx
-         if sys.platform == 'darwin':
-             compiler_so = _osx_support.compiler_fixup(compiler_so,
-                                                     cc_args + extra_postargs)
-+            compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
-+                                                    cc_args + extra_postargs)
-         try:
--            self.spawn(compiler_so + cc_args + [src, '-o', obj] +
--                       extra_postargs)
-+            if self.detect_language(src) == 'c++':
-+                self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
-+                           extra_postargs)
-+            else:
-+                self.spawn(compiler_so + cc_args + [src, '-o', obj] +
-+                           extra_postargs)
-         except DistutilsExecError as msg:
-             raise CompileError(msg)
- 
-@@ -188,22 +198,16 @@ class UnixCCompiler(CCompiler):
-                 ld_args.extend(extra_postargs)
-             self.mkpath(os.path.dirname(output_filename))
-             try:
--                if target_desc == CCompiler.EXECUTABLE:
--                    linker = self.linker_exe[:]
-+                if target_lang == "c++":
-+                    if target_desc == CCompiler.EXECUTABLE:
-+                        linker = self.linker_exe_cxx[:]
-+                    else:
-+                        linker = self.linker_so_cxx[:]
-                 else:
--                    linker = self.linker_so[:]
--                if target_lang == "c++" and self.compiler_cxx:
--                    # skip over environment variable settings if /usr/bin/env
--                    # is used to set up the linker's environment.
--                    # This is needed on OSX. Note: this assumes that the
--                    # normal and C++ compiler have the same environment
--                    # settings.
--                    i = 0
--                    if os.path.basename(linker[0]) == "env":
--                        i = 1
--                        while '=' in linker[i]:
--                            i += 1
--                    linker[i] = self.compiler_cxx[i]
-+                    if target_desc == CCompiler.EXECUTABLE:
-+                        linker = self.linker_exe[:]
-+                    else:
-+                        linker = self.linker_so[:]
- 
-                 if sys.platform == 'darwin':
-                     linker = _osx_support.compiler_fixup(linker, ld_args)
--- 
-2.12.2
-

diff --git a/dev-python/pypy3/pypy3-6.0.0.ebuild b/dev-python/pypy3/pypy3-6.0.0.ebuild
deleted file mode 100644
index d32be15922b..00000000000
--- a/dev-python/pypy3/pypy3-6.0.0.ebuild
+++ /dev/null
@@ -1,245 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# pypy3 needs to be built using python 2
-PYTHON_COMPAT=( python2_7 pypy )
-inherit check-reqs pax-utils python-any-r1 toolchain-funcs versionator
-
-MY_P=pypy3-v${PV}
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (3.5) language"
-HOMEPAGE="http://pypy.org/"
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2"
-
-LICENSE="MIT"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-SLOT="0/60"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite tk"
-
-RDEPEND=">=sys-libs/zlib-1.1.3:0=
-	virtual/libffi:0=
-	virtual/libintl:0=
-	dev-libs/expat:0=
-	!libressl? ( dev-libs/openssl:0=[-bindist] )
-	libressl? ( dev-libs/libressl:0= )
-	bzip2? ( app-arch/bzip2:0= )
-	gdbm? ( sys-libs/gdbm:0= )
-	ncurses? ( sys-libs/ncurses:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!dev-python/pypy3-bin:0"
-DEPEND="${RDEPEND}
-	low-memory? ( virtual/pypy )
-	!low-memory? (
-		|| (
-			virtual/pypy
-			(
-				dev-lang/python:2.7
-				dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)]
-			)
-		)
-	)"
-
-S="${WORKDIR}/${MY_P}-src"
-
-check_env() {
-	if use low-memory; then
-		CHECKREQS_MEMORY="1750M"
-		use amd64 && CHECKREQS_MEMORY="3500M"
-	else
-		CHECKREQS_MEMORY="3G"
-		use amd64 && CHECKREQS_MEMORY="6G"
-	fi
-
-	check-reqs_pkg_pretend
-}
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} != binary ]] && check_env
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]]; then
-		check_env
-
-		# unset to allow forcing pypy below :)
-		use low-memory && local EPYTHON=
-		if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
-			einfo "Using PyPy to perform the translation."
-			local EPYTHON=pypy
-		else
-			einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
-			einfo "recommends using PyPy for that. If you wish to do so, please install"
-			einfo "virtual/pypy and ensure that EPYTHON variable is unset."
-		fi
-
-		python-any-r1_pkg_setup
-	fi
-}
-
-src_prepare() {
-	eapply "${FILESDIR}/4.0.0-gentoo-path.patch"
-	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
-	eapply "${FILESDIR}"/5.9.0-shared-lib.patch	# 517002
-
-	sed -e "s^@EPREFIX@^${EPREFIX}^" \
-		-e "s^@libdir@^$(get_libdir)^" \
-		-i lib-python/3/distutils/command/install.py || die
-
-	# apply CPython stdlib patches
-	pushd lib-python/3 > /dev/null || die
-	eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch
-	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
-	popd > /dev/null || die
-
-	eapply_user
-}
-
-src_configure() {
-	tc-export CC
-
-	local args=(
-		--shared
-		$(usex jit -Ojit -O2)
-		$(usex sandbox --sandbox '')
-
-		--jit-backend=auto
-
-		pypy/goal/targetpypystandalone
-	)
-
-	# Avoid linking against libraries disabled by use flags
-	local opts=(
-		bzip2:bz2
-		ncurses:_minimal_curses
-	)
-
-	local opt
-	for opt in "${opts[@]}"; do
-		local flag=${opt%:*}
-		local mod=${opt#*:}
-
-		args+=(
-			$(usex ${flag} --withmod --withoutmod)-${mod}
-		)
-	done
-
-	local interp=( "${PYTHON}" )
-	if use low-memory; then
-		interp=( env PYPY_GC_MAX_DELTA=200MB
-			"${PYTHON}" --jit loop_longevity=300 )
-	fi
-
-	# translate into the C sources
-	# we're going to make them ourselves since otherwise pypy does not
-	# free up the unneeded memory before spawning the compiler
-	set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
-	echo -e "\033[1m${@}\033[0m"
-	"${@}" || die "translation failed"
-}
-
-src_compile() {
-	emake -C "${T}"/usession*-0/testing_1
-
-	# copy back to make sys.prefix happy
-	cp -p "${T}"/usession*-0/testing_1/{pypy3-c,libpypy3-c.so} . || die
-	pax-mark m pypy3-c libpypy3-c.so
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy3-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,
-#    "lzma": "_lzma_build.py",
-#    "_decimal": "_decimal_build.py",
-#    "_ssl": "_ssl_build.py",
-	cffi_targets=( audioop syslog pwdgrp resource lzma decimal ssl )
-	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
-		../pypy3-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=
-
-	# Test runner requires Python 2 too. However, it spawns PyPy3
-	# internally so that we end up testing the correct interpreter.
-	"${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python || die
-}
-
-src_install() {
-	local dest=/usr/$(get_libdir)/pypy3
-	einfo "Installing PyPy ..."
-	exeinto "${dest}"
-	doexe pypy3-c libpypy3-c.so
-	pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so"
-	insinto "${dest}"
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r include lib_pypy lib-python
-	dosym ../$(get_libdir)/pypy3/pypy3-c /usr/bin/pypy3
-	dodoc README.rst
-
-	if ! use gdbm; then
-		rm -r "${ED%/}${dest}"/lib_pypy/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
-			"${ED%/}${dest}"/lib_pypy/_sqlite3* \
-			"${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED%/}${dest}"/lib-python/*3/{idlelib,tkinter} \
-			"${ED%/}${dest}"/lib_pypy/_tkinter \
-			"${ED%/}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
-	fi
-
-	einfo "Generating caches and byte-compiling ..."
-
-	local -x PYTHON=${ED%/}${dest}/pypy3-c
-	# we can't use eclass function since PyPy is dumb and always gives
-	# paths relative to the interpreter
-	local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages
-	python_export pypy3 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}"
-}

diff --git a/dev-python/pypy3/pypy3-7.0.0-r1.ebuild b/dev-python/pypy3/pypy3-7.0.0-r1.ebuild
deleted file mode 100644
index 87ce4dbc248..00000000000
--- a/dev-python/pypy3/pypy3-7.0.0-r1.ebuild
+++ /dev/null
@@ -1,244 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# pypy3 needs to be built using python 2
-PYTHON_COMPAT=( python2_7 pypy )
-inherit check-reqs pax-utils python-any-r1 toolchain-funcs
-
-MY_P=pypy3.5-v${PV}
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (3.5) language"
-HOMEPAGE="http://pypy.org/"
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2"
-
-LICENSE="MIT"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-SLOT="0/71"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite tk"
-
-RDEPEND=">=sys-libs/zlib-1.1.3:0=
-	virtual/libffi:0=
-	virtual/libintl:0=
-	dev-libs/expat:0=
-	!libressl? ( dev-libs/openssl:0=[-bindist] )
-	libressl? ( dev-libs/libressl:0= )
-	bzip2? ( app-arch/bzip2:0= )
-	gdbm? ( sys-libs/gdbm:0= )
-	ncurses? ( sys-libs/ncurses:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!dev-python/pypy3-bin:0"
-DEPEND="${RDEPEND}
-	low-memory? ( virtual/pypy )
-	!low-memory? (
-		|| (
-			virtual/pypy
-			(
-				dev-lang/python:2.7
-				dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)]
-			)
-		)
-	)"
-
-S="${WORKDIR}/${MY_P}-src"
-
-check_env() {
-	if use low-memory; then
-		CHECKREQS_MEMORY="1750M"
-		use amd64 && CHECKREQS_MEMORY="3500M"
-	else
-		CHECKREQS_MEMORY="3G"
-		use amd64 && CHECKREQS_MEMORY="6G"
-	fi
-
-	check-reqs_pkg_pretend
-}
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} != binary ]] && check_env
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]]; then
-		check_env
-
-		# unset to allow forcing pypy below :)
-		use low-memory && local EPYTHON=
-		if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
-			einfo "Using PyPy to perform the translation."
-			local EPYTHON=pypy
-		else
-			einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
-			einfo "recommends using PyPy for that. If you wish to do so, please install"
-			einfo "virtual/pypy and ensure that EPYTHON variable is unset."
-		fi
-
-		python-any-r1_pkg_setup
-	fi
-}
-
-src_prepare() {
-	eapply "${FILESDIR}/7.0.0-gentoo-path.patch"
-	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
-	eapply "${FILESDIR}"/5.9.0-shared-lib.patch	# 517002
-	eapply "${FILESDIR}"/7.0.0_all_distutils_cxx.patch
-
-	sed -e "s^@EPREFIX@^${EPREFIX}^" \
-		-i lib-python/3/distutils/command/install.py || die
-
-	# apply CPython stdlib patches
-	pushd lib-python/3 > /dev/null || die
-	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
-	popd > /dev/null || die
-
-	eapply_user
-}
-
-src_configure() {
-	tc-export CC
-
-	local args=(
-		--shared
-		$(usex jit -Ojit -O2)
-		$(usex sandbox --sandbox '')
-
-		--jit-backend=auto
-
-		pypy/goal/targetpypystandalone
-	)
-
-	# Avoid linking against libraries disabled by use flags
-	local opts=(
-		bzip2:bz2
-		ncurses:_minimal_curses
-	)
-
-	local opt
-	for opt in "${opts[@]}"; do
-		local flag=${opt%:*}
-		local mod=${opt#*:}
-
-		args+=(
-			$(usex ${flag} --withmod --withoutmod)-${mod}
-		)
-	done
-
-	local interp=( "${PYTHON}" )
-	if use low-memory; then
-		interp=( env PYPY_GC_MAX_DELTA=200MB
-			"${PYTHON}" --jit loop_longevity=300 )
-	fi
-
-	# translate into the C sources
-	# we're going to make them ourselves since otherwise pypy does not
-	# free up the unneeded memory before spawning the compiler
-	set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
-	echo -e "\033[1m${@}\033[0m"
-	"${@}" || die "translation failed"
-}
-
-src_compile() {
-	emake -C "${T}"/usession*-0/testing_1
-
-	# copy back to make sys.prefix happy
-	cp -p "${T}"/usession*-0/testing_1/{pypy3-c,libpypy3-c.so} . || die
-	pax-mark m pypy3-c libpypy3-c.so
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy3-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,
-#    "lzma": "_lzma_build.py",
-#    "_decimal": "_decimal_build.py",
-#    "_ssl": "_ssl_build.py",
-	cffi_targets=( audioop syslog pwdgrp resource lzma decimal ssl )
-	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
-		../pypy3-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=
-
-	# Test runner requires Python 2 too. However, it spawns PyPy3
-	# internally so that we end up testing the correct interpreter.
-	"${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python || die
-}
-
-src_install() {
-	local dest=/usr/lib/pypy3.5
-	einfo "Installing PyPy ..."
-	exeinto "${dest}"
-	doexe pypy3-c libpypy3-c.so
-	pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so"
-	insinto "${dest}"
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r include lib_pypy lib-python
-	dosym ../lib/pypy3.5/pypy3-c /usr/bin/pypy3
-	dodoc README.rst
-
-	if ! use gdbm; then
-		rm -r "${ED%/}${dest}"/lib_pypy/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
-			"${ED%/}${dest}"/lib_pypy/_sqlite3* \
-			"${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED%/}${dest}"/lib-python/*3/{idlelib,tkinter} \
-			"${ED%/}${dest}"/lib_pypy/_tkinter \
-			"${ED%/}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
-	fi
-
-	einfo "Generating caches and byte-compiling ..."
-
-	local -x PYTHON=${ED%/}${dest}/pypy3-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/pypy3.5/site-packages
-	python_export pypy3 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}"
-}

diff --git a/dev-python/pypy3/pypy3-7.1.0.ebuild b/dev-python/pypy3/pypy3-7.1.0.ebuild
deleted file mode 100644
index f0f7cdf74a2..00000000000
--- a/dev-python/pypy3/pypy3-7.1.0.ebuild
+++ /dev/null
@@ -1,250 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# pypy3 needs to be built using python 2
-PYTHON_COMPAT=( python2_7 pypy )
-inherit check-reqs pax-utils python-any-r1 toolchain-funcs
-
-MY_P=pypy3.6-v${PV}
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (3.6) language"
-HOMEPAGE="http://pypy.org/"
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2"
-
-LICENSE="MIT"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-SLOT="0/71-py36"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite tk"
-
-RDEPEND=">=sys-libs/zlib-1.1.3:0=
-	virtual/libffi:0=
-	virtual/libintl:0=
-	dev-libs/expat:0=
-	!libressl? ( dev-libs/openssl:0=[-bindist] )
-	libressl? ( dev-libs/libressl:0= )
-	bzip2? ( app-arch/bzip2:0= )
-	gdbm? ( sys-libs/gdbm:0= )
-	ncurses? ( sys-libs/ncurses:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!dev-python/pypy3-bin:0"
-DEPEND="${RDEPEND}
-	low-memory? ( virtual/pypy )
-	!low-memory? (
-		|| (
-			virtual/pypy
-			(
-				dev-lang/python:2.7
-				dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)]
-			)
-		)
-	)"
-
-S="${WORKDIR}/${MY_P}-src"
-
-check_env() {
-	if use low-memory; then
-		CHECKREQS_MEMORY="1750M"
-		use amd64 && CHECKREQS_MEMORY="3500M"
-	else
-		CHECKREQS_MEMORY="3G"
-		use amd64 && CHECKREQS_MEMORY="6G"
-	fi
-
-	check-reqs_pkg_pretend
-}
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} != binary ]] && check_env
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]]; then
-		check_env
-
-		# unset to allow forcing pypy below :)
-		use low-memory && local EPYTHON=
-		if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
-			einfo "Using PyPy to perform the translation."
-			local EPYTHON=pypy
-		else
-			einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
-			einfo "recommends using PyPy for that. If you wish to do so, please install"
-			einfo "virtual/pypy and ensure that EPYTHON variable is unset."
-		fi
-
-		python-any-r1_pkg_setup
-	fi
-}
-
-src_prepare() {
-	eapply "${FILESDIR}/7.0.0-gentoo-path.patch"
-	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
-	eapply "${FILESDIR}"/5.9.0-shared-lib.patch	# 517002
-	eapply "${FILESDIR}"/7.0.0_all_distutils_cxx.patch
-
-	sed -e "s^@EPREFIX@^${EPREFIX}^" \
-		-i lib-python/3/distutils/command/install.py || die
-
-	# apply CPython stdlib patches
-	pushd lib-python/3 > /dev/null || die
-	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
-	popd > /dev/null || die
-
-	eapply_user
-}
-
-src_configure() {
-	tc-export CC
-
-	local args=(
-		--shared
-		$(usex jit -Ojit -O2)
-		$(usex sandbox --sandbox '')
-
-		--jit-backend=auto
-
-		pypy/goal/targetpypystandalone
-	)
-
-	# Avoid linking against libraries disabled by use flags
-	local opts=(
-		bzip2:bz2
-		ncurses:_minimal_curses
-	)
-
-	local opt
-	for opt in "${opts[@]}"; do
-		local flag=${opt%:*}
-		local mod=${opt#*:}
-
-		args+=(
-			$(usex ${flag} --withmod --withoutmod)-${mod}
-		)
-	done
-
-	local interp=( "${PYTHON}" )
-	if use low-memory; then
-		interp=( env PYPY_GC_MAX_DELTA=200MB
-			"${PYTHON}" --jit loop_longevity=300 )
-	fi
-
-	# translate into the C sources
-	# we're going to make them ourselves since otherwise pypy does not
-	# free up the unneeded memory before spawning the compiler
-	set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
-	echo -e "\033[1m${@}\033[0m"
-	"${@}" || die "translation failed"
-}
-
-src_compile() {
-	emake -C "${T}"/usession*-0/testing_1
-
-	# copy back to make sys.prefix happy
-	cp -p "${T}"/usession*-0/testing_1/{pypy3-c,libpypy3-c.so} . || die
-	pax-mark m pypy3-c libpypy3-c.so
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy3-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,
-#    "lzma": "_lzma_build.py",
-#    "_decimal": "_decimal_build.py",
-#    "_ssl": "_ssl_build.py",
-#    "_blake2": "_blake2/_blake2_build.py",
-#    "_sha3": "_sha3/_sha3_build.py",
-	cffi_targets=( blake2/_blake2 sha3/_sha3 ssl
-		audioop syslog pwdgrp resource lzma decimal )
-	use gdbm && cffi_targets+=( gdbm )
-	use ncurses && cffi_targets+=( curses )
-	use sqlite && cffi_targets+=( sqlite3 )
-	use tk && cffi_targets+=( tkinter/tklib )
-
-	einfo "Please disregard the import errors during CFFI cache generation."
-	einfo "They come from modules not built yet."
-
-	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
-		../pypy3-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=
-
-	# Test runner requires Python 2 too. However, it spawns PyPy3
-	# internally so that we end up testing the correct interpreter.
-	"${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python || die
-}
-
-src_install() {
-	local dest=/usr/lib/pypy3.6
-	einfo "Installing PyPy ..."
-	exeinto "${dest}"
-	doexe pypy3-c libpypy3-c.so
-	pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so"
-	insinto "${dest}"
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r include lib_pypy lib-python
-	dosym ../lib/pypy3.6/pypy3-c /usr/bin/pypy3
-	dodoc README.rst
-
-	if ! use gdbm; then
-		rm -r "${ED%/}${dest}"/lib_pypy/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
-			"${ED%/}${dest}"/lib_pypy/_sqlite3* \
-			"${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED%/}${dest}"/lib-python/*3/{idlelib,tkinter} \
-			"${ED%/}${dest}"/lib_pypy/_tkinter \
-			"${ED%/}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
-	fi
-
-	einfo "Generating caches and byte-compiling ..."
-
-	local -x PYTHON=${ED%/}${dest}/pypy3-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/pypy3.6/site-packages
-	python_export pypy3 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}"
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/
@ 2020-09-11 21:05 Michał Górny
  0 siblings, 0 replies; 17+ messages in thread
From: Michał Górny @ 2020-09-11 21:05 UTC (permalink / raw
  To: gentoo-commits

commit:     0605937f45b2f636fd675e53367279e4c54e85e1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 11 10:42:56 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Sep 11 21:05:01 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0605937f

dev-python/pypy3: Add PyPy3.7 version

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

 dev-python/pypy3/Manifest                          |   1 +
 .../pypy3/files/7.3.2-py37-distutils-cxx.patch     | 314 ++++++++++++++++++
 dev-python/pypy3/pypy3-7.3.2_rc1-r100.ebuild       | 352 +++++++++++++++++++++
 3 files changed, 667 insertions(+)

diff --git a/dev-python/pypy3/Manifest b/dev-python/pypy3/Manifest
index 0b16f02d6f2..4d82772ad7b 100644
--- a/dev-python/pypy3/Manifest
+++ b/dev-python/pypy3/Manifest
@@ -1,3 +1,4 @@
 DIST pypy3.6-v7.3.0-src.tar.bz2 21937786 BLAKE2B c53ac32a9cca1c4624160eae9f11b5705a59613f1e5100fbb0ee86118de5a7845b8fa5087165d7f5a077d20337dfca14a1c7eadbe768995e20e249ec271ac10d SHA512 313a4254262dd8d8b995a50bddbc360cfb67add0818e51a3e9ce25bda6a9b639e9fea8efe7da6adda76dff0a86a364544a13faa516e51b9ea6c25ec99223b435
 DIST pypy3.6-v7.3.1-src.tar.bz2 22712809 BLAKE2B 4250b3fe98c611b9635319c106b80e88ab469eab5f883babb738e175e7b7adc22c85f8ef3fdce1cdc127b521beef8d6c7862e188d8c8889c39f90136d6bbe374 SHA512 f8e32aae7f01225e0e4d6763eaac40fc02dffc3d0b6a30f22d422147f9be4f3290ea78160a912ffae311dea3d503eb31a7a4f3999d3b541fbccd93d1cef4ca56
 DIST pypy3.6-v7.3.2rc1-src.tar.bz2 22730858 BLAKE2B 41a0702d0077c0f546998b858bc8b76226fe8903f4819497aa284231edcb32bc8b047b0a2a35bacfb18ea11fb85de98b95998276c22a3f0dc716b16871b35a3a SHA512 1a6f93f7e767b0db5c40c1e06cadd781c6ddfb02ec86aa61a37f649fe1aa5cd71f7857052e5b48092e3bf8b5cbef6d6401097bf4c4e80c62f7dbdffcd20b70c0
+DIST pypy3.7-v7.3.2rc1-src.tar.bz2 24805791 BLAKE2B 7b16ba9f0b33d572facdf009701712fe1b2c1eb5a4187c3a9197973ef4da140c7704b3409c7c336e1027f89df340fcefc9e52c6ccac75b251aa79d67c98e49c4 SHA512 d2a5c02a541c0ae79cf8c8e1a38299351f9dd81d1a17724d9fe346d8eb4311e2566a319cf1b8a90d393bffdc11657f6fa2f6475441634e57701b00e74899baa0

diff --git a/dev-python/pypy3/files/7.3.2-py37-distutils-cxx.patch b/dev-python/pypy3/files/7.3.2-py37-distutils-cxx.patch
new file mode 100644
index 00000000000..d126edacc6b
--- /dev/null
+++ b/dev-python/pypy3/files/7.3.2-py37-distutils-cxx.patch
@@ -0,0 +1,314 @@
+diff --git a/lib-python/3/distutils/cygwinccompiler.py b/lib-python/3/distutils/cygwinccompiler.py
+index 6c5d777..640fa2d 100644
+--- a/lib-python/3/distutils/cygwinccompiler.py
++++ b/lib-python/3/distutils/cygwinccompiler.py
+@@ -125,8 +125,10 @@ class CygwinCCompiler(UnixCCompiler):
+         # dllwrap 2.10.90 is buggy
+         if self.ld_version >= "2.10.90":
+             self.linker_dll = "gcc"
++            self.linker_dll_cxx = "g++"
+         else:
+             self.linker_dll = "dllwrap"
++            self.linker_dll_cxx = "dllwrap"
+ 
+         # ld_version >= "2.13" support -shared so use it instead of
+         # -mdll -static
+@@ -140,9 +142,13 @@ class CygwinCCompiler(UnixCCompiler):
+         self.set_executables(compiler='gcc -mcygwin -O -Wall',
+                              compiler_so='gcc -mcygwin -mdll -O -Wall',
+                              compiler_cxx='g++ -mcygwin -O -Wall',
++                             compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
+                              linker_exe='gcc -mcygwin',
+                              linker_so=('%s -mcygwin %s' %
+-                                        (self.linker_dll, shared_option)))
++                                        (self.linker_dll, shared_option)),
++                             linker_exe_cxx='g++ -mcygwin',
++                             linker_so_cxx=('%s -mcygwin %s' %
++                                            (self.linker_dll_cxx, shared_option)))
+ 
+         # cygwin and mingw32 need different sets of libraries
+         if self.gcc_version == "2.91.57":
+@@ -166,8 +172,12 @@ class CygwinCCompiler(UnixCCompiler):
+                 raise CompileError(msg)
+         else: # for other files use the C-compiler
+             try:
+-                self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
+-                           extra_postargs)
++                if self.detect_language(src) == 'c++':
++                    self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
++                               extra_postargs)
++                else:
++                    self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
++                               extra_postargs)
+             except DistutilsExecError as msg:
+                 raise CompileError(msg)
+ 
+@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler):
+         self.set_executables(compiler='gcc -O -Wall',
+                              compiler_so='gcc -mdll -O -Wall',
+                              compiler_cxx='g++ -O -Wall',
++                             compiler_so_cxx='g++ -mdll -O -Wall',
+                              linker_exe='gcc',
+                              linker_so='%s %s %s'
+                                         % (self.linker_dll, shared_option,
++                                           entry_point),
++                             linker_exe_cxx='g++',
++                             linker_so_cxx='%s %s %s'
++                                        % (self.linker_dll_cxx, shared_option,
+                                            entry_point))
+         # Maybe we should also append -mthreads, but then the finished
+         # dlls need another dll (mingwm10.dll see Mingw32 docs)
+diff --git a/lib-python/3/distutils/sysconfig_cpython.py b/lib-python/3/distutils/sysconfig_cpython.py
+index 484721f..0088dd4 100644
+--- a/lib-python/3/distutils/sysconfig_cpython.py
++++ b/lib-python/3/distutils/sysconfig_cpython.py
+@@ -188,9 +188,13 @@ def customize_compiler(compiler):
+                 _osx_support.customize_compiler(_config_vars)
+                 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
+ 
+-        (cc, cxx, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
+-            get_config_vars('CC', 'CXX', 'CFLAGS',
+-                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
++        (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
++            get_config_vars('CC', 'CXX',
++                            'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
++                            'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
++
++        cflags = ''
++        cxxflags = ''
+ 
+         if 'CC' in os.environ:
+             newcc = os.environ['CC']
+@@ -205,19 +209,27 @@ def customize_compiler(compiler):
+             cxx = os.environ['CXX']
+         if 'LDSHARED' in os.environ:
+             ldshared = os.environ['LDSHARED']
++        if 'LDCXXSHARED' in os.environ:
++            ldcxxshared = os.environ['LDCXXSHARED']
+         if 'CPP' in os.environ:
+             cpp = os.environ['CPP']
+         else:
+             cpp = cc + " -E"           # not always
+         if 'LDFLAGS' in os.environ:
+             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
+         if 'CFLAGS' in os.environ:
+-            cflags = cflags + ' ' + os.environ['CFLAGS']
++            cflags = os.environ['CFLAGS']
+             ldshared = ldshared + ' ' + os.environ['CFLAGS']
++        if 'CXXFLAGS' in os.environ:
++            cxxflags = os.environ['CXXFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
+         if 'CPPFLAGS' in os.environ:
+             cpp = cpp + ' ' + os.environ['CPPFLAGS']
+             cflags = cflags + ' ' + os.environ['CPPFLAGS']
++            cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
+             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
+         if 'AR' in os.environ:
+             ar = os.environ['AR']
+         if 'ARFLAGS' in os.environ:
+@@ -226,13 +238,17 @@ def customize_compiler(compiler):
+             archiver = ar + ' ' + ar_flags
+ 
+         cc_cmd = cc + ' ' + cflags
++        cxx_cmd = cxx + ' ' + cxxflags
+         compiler.set_executables(
+             preprocessor=cpp,
+             compiler=cc_cmd,
+             compiler_so=cc_cmd + ' ' + ccshared,
+-            compiler_cxx=cxx,
++            compiler_cxx=cxx_cmd,
++            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
+             linker_so=ldshared,
+             linker_exe=cc,
++            linker_so_cxx=ldcxxshared,
++            linker_exe_cxx=cxx,
+             archiver=archiver)
+ 
+         compiler.shared_lib_extension = shlib_suffix
+diff --git a/lib-python/3/distutils/sysconfig_pypy.py b/lib-python/3/distutils/sysconfig_pypy.py
+index bf1748e..70dfd72 100644
+--- a/lib-python/3/distutils/sysconfig_pypy.py
++++ b/lib-python/3/distutils/sysconfig_pypy.py
+@@ -145,36 +145,52 @@ def customize_compiler(compiler):
+                 _osx_support.customize_compiler(_config_vars)
+                 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
+ 
+-        (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
+-            get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
+-                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
++        (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
++            get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
++                            'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
++
++        cflags = ''
++        cxxflags = ''
+ 
+         if 'CC' in os.environ:
+             newcc = os.environ['CC']
+-            if (sys.platform == 'darwin'
++            if (True
+                     and 'LDSHARED' not in os.environ
+                     and ldshared.startswith(cc)):
+                 # On OS X, if CC is overridden, use that as the default
+                 #       command for LDSHARED as well
++                # Gentoo: s/OS X/every system/
+                 ldshared = newcc + ldshared[len(cc):]
+             cc = newcc
+         if 'CXX' in os.environ:
+-            cxx = os.environ['CXX']
++            newcxx = os.environ['CXX']
++            if ('LDCXXSHARED' not in os.environ
++                    and ldcxxshared.startswith(cxx)):
++                ldcxxshared = newcxx + ldcxxshared[len(cxx):]
++            cxx = newcxx
+         if 'LDSHARED' in os.environ:
+             ldshared = os.environ['LDSHARED']
++        if 'LDCXXSHARED' in os.environ:
++            ldcxxshared = os.environ['LDCXXSHARED']
+         if 'CPP' in os.environ:
+             cpp = os.environ['CPP']
+         else:
+             cpp = cc + " -E"           # not always
+         if 'LDFLAGS' in os.environ:
+             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
+         if 'CFLAGS' in os.environ:
+-            cflags = opt + ' ' + os.environ['CFLAGS']
++            cflags = os.environ['CFLAGS']
+             ldshared = ldshared + ' ' + os.environ['CFLAGS']
++        if 'CXXFLAGS' in os.environ:
++            cxxflags = os.environ['CXXFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
+         if 'CPPFLAGS' in os.environ:
+             cpp = cpp + ' ' + os.environ['CPPFLAGS']
+             cflags = cflags + ' ' + os.environ['CPPFLAGS']
++            cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
+             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
++            ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
+         if 'AR' in os.environ:
+             ar = os.environ['AR']
+         if 'ARFLAGS' in os.environ:
+@@ -183,13 +199,17 @@ def customize_compiler(compiler):
+             archiver = ar + ' ' + ar_flags
+ 
+         cc_cmd = cc + ' ' + cflags
++        cxx_cmd = cxx + ' ' + cxxflags
+         compiler.set_executables(
+             preprocessor=cpp,
+             compiler=cc_cmd,
+             compiler_so=cc_cmd + ' ' + ccshared,
+-            compiler_cxx=cxx,
++            compiler_cxx=cxx_cmd,
++            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
+             linker_so=ldshared,
+             linker_exe=cc,
++            linker_so_cxx=ldcxxshared,
++            linker_exe_cxx=cxx,
+             archiver=archiver)
+ 
+         compiler.shared_lib_extension = shlib_suffix
+diff --git a/lib-python/3/distutils/unixccompiler.py b/lib-python/3/distutils/unixccompiler.py
+index 06fc718..c3773f0 100644
+--- a/lib-python/3/distutils/unixccompiler.py
++++ b/lib-python/3/distutils/unixccompiler.py
+@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler):
+     # are pretty generic; they will probably have to be set by an outsider
+     # (eg. using information discovered by the sysconfig about building
+     # Python extensions).
+-    executables = {'preprocessor' : None,
+-                   'compiler'     : ["cc"],
+-                   'compiler_so'  : ["cc"],
+-                   'compiler_cxx' : ["c++"],  # pypy: changed, 'cc' is bogus
+-                   'linker_so'    : ["cc", "-shared"],
+-                   'linker_exe'   : ["cc"],
+-                   'archiver'     : ["ar", "-cr"],
+-                   'ranlib'       : None,
++    executables = {'preprocessor'    : None,
++                   'compiler'        : ["cc"],
++                   'compiler_so'     : ["cc"],
++                   'compiler_cxx'    : ["c++"],
++                   'compiler_so_cxx' : ["c++"],
++                   'linker_so'       : ["cc", "-shared"],
++                   'linker_exe'      : ["cc"],
++                   'linker_so_cxx'   : ["c++", "-shared"],
++                   'linker_exe_cxx'  : ["c++"],
++                   'archiver'        : ["ar", "-cr"],
++                   'ranlib'          : None,
+                   }
+ 
+     if sys.platform[:6] == "darwin":
+@@ -125,12 +128,19 @@ class UnixCCompiler(CCompiler):
+ 
+     def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
+         compiler_so = self.compiler_so
++        compiler_so_cxx = self.compiler_so_cxx
+         if sys.platform == 'darwin':
+             compiler_so = _osx_support.compiler_fixup(compiler_so,
+                                                     cc_args + extra_postargs)
++            compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
++                                                    cc_args + extra_postargs)
+         try:
+-            self.spawn(compiler_so + cc_args + [src, '-o', obj] +
+-                       extra_postargs)
++            if self.detect_language(src) == 'c++':
++                self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
++                           extra_postargs)
++            else:
++                self.spawn(compiler_so + cc_args + [src, '-o', obj] +
++                           extra_postargs)
+         except DistutilsExecError as msg:
+             raise CompileError(msg)
+ 
+@@ -188,30 +198,16 @@ class UnixCCompiler(CCompiler):
+                 ld_args.extend(extra_postargs)
+             self.mkpath(os.path.dirname(output_filename))
+             try:
+-                if target_desc == CCompiler.EXECUTABLE:
+-                    linker = self.linker_exe[:]
++                if target_lang == "c++":
++                    if target_desc == CCompiler.EXECUTABLE:
++                        linker = self.linker_exe_cxx[:]
++                    else:
++                        linker = self.linker_so_cxx[:]
+                 else:
+-                    linker = self.linker_so[:]
+-                if target_lang == "c++" and self.compiler_cxx:
+-                    # skip over environment variable settings if /usr/bin/env
+-                    # is used to set up the linker's environment.
+-                    # This is needed on OSX. Note: this assumes that the
+-                    # normal and C++ compiler have the same environment
+-                    # settings.
+-                    i = 0
+-                    if os.path.basename(linker[0]) == "env":
+-                        i = 1
+-                        while '=' in linker[i]:
+-                            i += 1
+-
+-                    if os.path.basename(linker[i]) == 'ld_so_aix':
+-                        # AIX platforms prefix the compiler with the ld_so_aix
+-                        # script, so we need to adjust our linker index
+-                        offset = 1
++                    if target_desc == CCompiler.EXECUTABLE:
++                        linker = self.linker_exe[:]
+                     else:
+-                        offset = 0
+-
+-                    linker[i+offset] = self.compiler_cxx[i]
++                        linker = self.linker_so[:]
+ 
+                 if sys.platform == 'darwin':
+                     linker = _osx_support.compiler_fixup(linker, ld_args)
+diff --git a/lib_pypy/_sysconfigdata.py b/lib_pypy/_sysconfigdata.py
+index f1cca41..3ec5b4c 100644
+--- a/lib_pypy/_sysconfigdata.py
++++ b/lib_pypy/_sysconfigdata.py
+@@ -20,6 +20,7 @@ build_time_vars = {
+     'CFLAGS': "-DNDEBUG -O2",
+     'CCSHARED': "-fPIC",
+     'LDSHARED': "cc -pthread -shared",
++    'LDCXXSHARED': "c++ -pthread -shared",
+     'EXT_SUFFIX': so_ext,
+     'SHLIB_SUFFIX': ".so",
+     'AR': "ar",

diff --git a/dev-python/pypy3/pypy3-7.3.2_rc1-r100.ebuild b/dev-python/pypy3/pypy3-7.3.2_rc1-r100.ebuild
new file mode 100644
index 00000000000..2ba33e2c40c
--- /dev/null
+++ b/dev-python/pypy3/pypy3-7.3.2_rc1-r100.ebuild
@@ -0,0 +1,352 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+inherit pax-utils python-any-r1 toolchain-funcs
+
+MY_P=pypy3.7-v${PV/_/}
+
+DESCRIPTION="A fast, compliant alternative implementation of the Python (3.7) language"
+HOMEPAGE="https://pypy.org/"
+SRC_URI="https://downloads.python.org/pypy/${MY_P}-src.tar.bz2"
+S="${WORKDIR}/${MY_P}-src"
+
+LICENSE="MIT"
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
+SLOT="0/pypy37-pp73"
+KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 gdbm +jit libressl ncurses sqlite test tk"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	|| (
+		dev-python/pypy3-exe:${PV}-py37[bzip2?,ncurses?]
+		dev-python/pypy3-exe-bin:${PV}-py37
+	)
+	!libressl? ( dev-libs/openssl:0= )
+	libressl? ( dev-libs/libressl:0= )
+	gdbm? ( sys-libs/gdbm:0= )
+	sqlite? ( dev-db/sqlite:3= )
+	tk? (
+		dev-lang/tk:0=
+		dev-tcltk/tix:0=
+	)
+	!<dev-python/pypy3-bin-7.3.0:0"
+DEPEND="${RDEPEND}
+	test? (
+		${PYTHON_DEPS}
+		!!dev-python/pytest-forked
+	)"
+
+pkg_setup() {
+	use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	eapply "${FILESDIR}/7.3.1-gentoo-path.patch"
+	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
+	eapply "${FILESDIR}/7.3.2-py37-distutils-cxx.patch"
+
+	sed -e "s^@EPREFIX@^${EPREFIX}^" \
+		-i lib-python/3/distutils/command/install.py || die
+
+	# apply CPython stdlib patches
+	pushd lib-python/3 > /dev/null || die
+	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
+	popd > /dev/null || die
+
+	# see http://buildbot.pypy.org/summary?branch=py3.7&builder=pypy-c-jit-linux-x86-64
+	sed -i -e 's:test_snippets(:_&:' \
+		lib-python/3/test/test_ast.py || die
+	sed -i -e 's:testConstructorErrorMessages(:_&:' \
+		lib-python/3/test/test_class.py || die
+	sed -i -e 's:test_pythonmalloc(:_&:' \
+		-e 's:test_sys_flags_set(:_&:' \
+		-e 's:test_unbuffered_output(:_&:' \
+		-e 's:test_xdev(:_&:' \
+		-e 's:test_ignore_PYTHONHASHSEED(:_&:' \
+		lib-python/3/test/test_cmd_line.py || die
+	sed -i -e 's:test_consistent_sys_path_for_module_execution(:_&:' \
+		-e 's:test_issue8202(:_&:' \
+		-e 's:test_issue8202_dash_m_file_ignored(:_&:' \
+		-e 's:test_module_in_package(:_&:' \
+		-e 's:test_module_in_package_in_zipfile(:_&:' \
+		-e 's:test_module_in_subpackage_in_zipfile(:_&:' \
+		-e 's:test_nonexisting_script(:_&:' \
+		-e 's:test_package(:_&:' \
+		-e 's:test_package_compiled(:_&:' \
+		-e 's:test_script_compiled(:_&:' \
+		lib-python/3/test/test_cmd_line_script.py || die
+	sed -i -e 's:test_incremental_errors(:_&:' \
+		lib-python/3/test/test_codecs.py || die
+	sed -i -e 's:test_ressources_gced_in_workers(:_&:' \
+		-e 's:test_submit_after_interpreter_shutdown(:_&:' \
+		lib-python/3/test/test_concurrent_futures.py || die
+	sed -i -e 's:test_for_3(:_&:' \
+		-e 's:test_func_4(:_&:' \
+		lib-python/3/test/test_coroutines.py || die
+	sed -i -e 's:test_strftime(:_&:' \
+		-e 's:test_more_strftime(:_&:' \
+		lib-python/3/test/datetimetester.py || die
+	sed -i -e 's:test_info(:_&:' \
+		-e 's:test_code_info(:_&:' \
+		-e 's:test_show_code(:_&:' \
+		-e 's:test_disassemble_recursive(:_&:' \
+		-e 's:test_disassemble_str(:_&:' \
+		-e 's:test_jumpy(:_&:' \
+		lib-python/3/test/test_dis.py || die
+	sed -i -e 's:test_generator_doesnt_retain_old_exc2(:_&:' \
+		-e 's:test_attributes(:_&:' \
+		lib-python/3/test/test_exceptions.py || die
+	sed -i -e 's:test_frozen(:_&:' \
+		lib-python/3/test/test_frozen.py || die
+	sed -i -e 's:test_ssl_raises(:_&:' \
+		-e 's:test_ssl_verified(:_&:' \
+		lib-python/3/test/test_imaplib.py || die
+	sed -i -e 's:test_script_compiled(:_&:' \
+		lib-python/3/test/test_multiprocessing_main_handling.py || die
+	sed -i -e 's:test_execve_invalid_env(:_&:' \
+		lib-python/3/test/test_os.py || die
+	sed -i -e 's:test_get_and_set_scheduler_and_param(:_&:' \
+		lib-python/3/test/test_posix.py || die
+	sed -i -e 's:test_copying(:_&:' \
+		-e 's:test_re_split(:_&:' \
+		-e 's:test_zerowidth(:_&:' \
+		-e 's:test_locale_caching(:_&:' \
+		-e 's:test_locale_compiled(:_&:' \
+		-e 's:test_match_repr(:_&:' \
+		-e 's:test_qualified_re_split(:_&:' \
+		-e 's:test_scoped_flags(:_&:' \
+		lib-python/3/test/test_re.py || die
+	sed -i -e 's:test_auto_history_disabled(:_&:' \
+		-e 's:test_auto_history_enabled(:_&:' \
+		-e 's:test_history_size(:_&:' \
+		lib-python/3/test/test_readline.py || die
+	sed -i -e 's:test_multiprocess(:_&:' \
+		lib-python/3/test/test_regrtest.py || die
+	sed -i -e 's:test_warn_on_full_buffer(:_&:' \
+		lib-python/3/test/test_signal.py || die
+	sed -i -e 's:test_get_path(:_&:' \
+		lib-python/3/test/test_site.py || die
+	sed -i -e 's:test_check_hostname(:_&:' \
+		-e 's:test_npn_protocols(:_&:' \
+		-e 's:test_sni_callback(:_&:' \
+		-e 's:test_sni_callback_raising(:_&:' \
+		lib-python/3/test/test_ssl.py || die
+	sed -i -e 's:test_invalid_placeholders(:_&:' \
+		lib-python/3/test/test_string.py || die
+	sed -i -e 's:test_eval_bytes_invalid_escape(:_&:' \
+		-e 's:test_eval_str_invalid_escape(:_&:' \
+		lib-python/3/test/test_string_literals.py || die
+	sed -i -e 's:test_boundary_error_message_with_large_offset(:_&:' \
+		lib-python/3/test/test_struct.py || die
+	sed -i -e 's:test_restore_signals(:_&:' \
+		lib-python/3/test/test_subprocess.py || die
+	sed -i -e 's:test_jump_out_of_async_for_block_backwards(:_&:' \
+		-e 's:test_jump_out_of_async_for_block_forwards(:_&:' \
+		-e 's:test_jump_over_async_for_block_before_else(:_&:' \
+		-e 's:test_no_jump_backwards_into_async_for_block(:_&:' \
+		-e 's:test_no_jump_forwards_into_async_for_block(:_&:' \
+		-e 's:test_no_jump_into_async_for_block_before_else(:_&:' \
+		-e 's:test_no_jump_from_yield(:_&:' \
+		lib-python/3/test/test_sys_settrace.py || die
+	sed -i -e 's:test_install_schemes(:_&:' \
+		lib-python/3/test/test_sysconfig_pypy.py || die
+	sed -i -e 's:test_circular_imports(:_&:' \
+		lib-python/3/test/test_threaded_import.py || die
+	sed -i -e 's:test_main_milliseconds(:_&:' \
+		-e 's:test_main_verbose(:_&:' \
+		-e 's:test_main_very_verbose(:_&:' \
+		-e 's:test_main_with_time_unit(:_&:' \
+		lib-python/3/test/test_timeit.py || die
+	sed -i -e 's:test_cannot_subclass(:_&:' \
+		lib-python/3/test/test_typing.py || die
+	sed -i -e 's:test_warnings(:_&:' \
+		lib-python/3/unittest/test/test_runner.py || die
+	sed -i -e 's:test_cmd_line(:_&:' \
+		-e 's:test_env_var(:_&:' \
+		-e 's:test_locale_getpreferredencoding(:_&:' \
+		-e 's:test_posix_locale(:_&:' \
+		-e 's:test_stdio(:_&:' \
+		-e 's:test_xoption(:_&:' \
+		lib-python/3/test/test_utf8_mode.py || die
+	sed -i -e 's:test_asyncgen_finalization_by_gc(:_&:' \
+		-e 's:test_asyncgen_finalization_by_gc_in_other_thread(:_&:' \
+		-e 's:test_create_connection_ipv6_scope(:_&:' \
+		lib-python/3/test/test_asyncio/test_base_events.py || die
+	sed -i -e 's:test_buffered_proto_create_connection(:_&:' \
+		lib-python/3/test/test_asyncio/test_buffered_proto.py || die
+	sed -i -e 's:test_create_connection_memory_leak(:_&:' \
+		-e 's:test_handshake_timeout(:_&:' \
+		-e 's:test_start_tls_client_reg_proto_1(:_&:' \
+		lib-python/3/test/test_asyncio/test_sslproto.py || die
+	sed -i -e 's:test_bare_create_task(:_&:' \
+		-e 's:test_current_task(:_&:' \
+		lib-python/3/test/test_asyncio/test_tasks.py || die
+	sed -i -e 's:test_asyncio_task_decimal_context(:_&:' \
+		lib-python/3/test/test_asyncio/test_context.py || die
+	sed -i -e 's:test_create_server_ssl_match_failed(:_&:' \
+		lib-python/3/test/test_asyncio/test_events.py || die
+	sed -i -e 's:test_binding(:_&:' \
+		-e 's:test_from_import_AttributeError(:_&:' \
+		-e 's:test_from_import_missing_attr_has_name_and_path(:_&:' \
+		-e 's:test_from_import_missing_attr_path_is_canonical(:_&:' \
+		lib-python/3/test/test_import/__init__.py || die
+	sed -i -e 's:test_unrelated_contents(:_&:' \
+		-e 's:test_contents(:_&:' \
+		-e 's:test_submodule_contents(:_&:' \
+		-e 's:test_submodule_contents_by_name(:_&:' \
+		-e 's:test_is_resource_good_path(:_&:' \
+		-e 's:test_is_submodule_resource(:_&:' \
+		-e 's:test_read_submodule_resource_by_name(:_&:' \
+		lib-python/3/test/test_importlib/test_resource.py || die
+	sed -i -e 's:test_non_string_keys_dict(:_&:' \
+		lib-python/3/test/test_json/test_fail.py || die
+	sed -i -e 's:test_module(:_&:' \
+		lib-python/3/test/test_warnings/__init__.py || die
+
+	# flaky
+	sed -i -e 's:test_2_join_in_forked_process(:_&:' \
+		lib-python/3/test/test_threading.py || die
+
+	# TODO
+	sed -i -e 's:test_external_target_locale_configuration(:_&:' \
+		lib-python/3/test/test_c_locale_coercion.py || die
+	sed -i -e 's:test_locale(:_&:' \
+		lib-python/3/test/test_format.py || die
+	sed -i -e 's:test_decompressor_bug_28275(:_&:' \
+		lib-python/3/test/test_lzma.py || die
+	sed -i -e 's:test_wrapped_exception:_&:' \
+		lib-python/3/test/_test_multiprocessing.py || die
+	sed -i -e 's:test_https_sni(:_&:' \
+		lib-python/3/test/test_urllib2_localnet.py || die
+
+	# the first one's broken by sandbox, the second by our env
+	sed -i -e 's:test_executable(:_&:' \
+		-e 's:test_executable_without_cwd(:_&:' \
+		lib-python/3/test/test_subprocess.py || die
+
+	eapply_user
+}
+
+src_configure() {
+	tc-export CC
+}
+
+src_compile() {
+	# copy over to make sys.prefix happy
+	cp -p "${BROOT}"/usr/lib/pypy3.7/pypy3-c-${PV} pypy3-c || die
+	cp -p "${BROOT}"/usr/lib/pypy3.7/include/${PV}/* 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 pypy3-c
+
+	einfo "Generating caches and CFFI modules ..."
+
+	# Generate Grammar and PatternGrammar pickles.
+	./pypy3-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 = {
+#    "_blake2": "_blake2/_blake2_build.py",
+#    "_ssl": "_ssl_build.py",
+#    "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,
+#    "lzma": "_lzma_build.py",
+#    "_decimal": "_decimal_build.py",
+#    "_sha3": "_sha3/_sha3_build.py",
+	cffi_targets=( blake2/_blake2 sha3/_sha3 ssl
+		audioop syslog pwdgrp resource lzma decimal )
+	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
+		../pypy3-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 -x COLUMNS=80
+
+	local ignore=(
+		# failing doctests
+		lib-python/3/test/test_extcall.py
+		lib-python/3/test/test_unpack_ex.py
+
+		# segfault
+		lib-python/3/test/test_capi.py
+	)
+
+	# Test runner requires Python 2 too. However, it spawns PyPy3
+	# internally so that we end up testing the correct interpreter.
+	# (--deselect for failing doctests)
+	"${EPYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python \
+		${ignore[@]/#/--ignore } || die
+}
+
+src_install() {
+	local dest=/usr/lib/pypy3.7
+	einfo "Installing PyPy ..."
+	dosym pypy3-c-${PV} "${dest}/pypy3-c"
+	insinto "${dest}"
+	# preserve mtimes to avoid obsoleting caches
+	insopts -p
+	doins -r include lib_pypy lib-python
+
+	# replace copied headers with symlinks
+	for x in "${BROOT}"/usr/lib/pypy3.7/include/${PV}/*; do
+		dosym "${PV}/${x##*/}" "${dest}/include/${x##*/}"
+	done
+
+	dosym ../lib/pypy3.7/pypy3-c /usr/bin/pypy3
+	dodoc README.rst
+
+	if ! use gdbm; then
+		rm -r "${ED}${dest}"/lib_pypy/_gdbm* || die
+	fi
+	if ! use sqlite; then
+		rm -r "${ED}${dest}"/lib-python/*3/sqlite3 \
+			"${ED}${dest}"/lib_pypy/_sqlite3* \
+			"${ED}${dest}"/lib-python/*3/test/test_sqlite.py || die
+	fi
+	if ! use tk; then
+		rm -r "${ED}${dest}"/lib-python/*3/{idlelib,tkinter} \
+			"${ED}${dest}"/lib_pypy/_tkinter \
+			"${ED}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
+	fi
+
+	local -x EPYTHON=pypy3
+	local -x PYTHON=${ED}${dest}/pypy3-c
+
+	echo "EPYTHON='${EPYTHON}'" > epython.py || die
+	python_moduleinto /usr/lib/pypy3.7/site-packages
+	python_domodule epython.py
+
+	einfo "Byte-compiling Python standard library..."
+	python_optimize "${ED}${dest}"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/
@ 2020-09-17 16:56 Michał Górny
  0 siblings, 0 replies; 17+ messages in thread
From: Michał Górny @ 2020-09-17 16:56 UTC (permalink / raw
  To: gentoo-commits

commit:     64acf094486c22d682426e56019c5f1cc8e3ec7f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 17 14:02:36 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Sep 17 16:56:16 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64acf094

dev-python/pypy3: Remove old

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

 dev-python/pypy3/Manifest                      |   3 -
 dev-python/pypy3/files/7.0.0-gentoo-path.patch |  52 ----
 dev-python/pypy3/pypy3-7.3.0.ebuild            | 219 ---------------
 dev-python/pypy3/pypy3-7.3.2_rc1-r100.ebuild   | 352 -------------------------
 dev-python/pypy3/pypy3-7.3.2_rc1.ebuild        | 202 --------------
 5 files changed, 828 deletions(-)

diff --git a/dev-python/pypy3/Manifest b/dev-python/pypy3/Manifest
index 45dd21d0c51..39001d40e36 100644
--- a/dev-python/pypy3/Manifest
+++ b/dev-python/pypy3/Manifest
@@ -1,6 +1,3 @@
-DIST pypy3.6-v7.3.0-src.tar.bz2 21937786 BLAKE2B c53ac32a9cca1c4624160eae9f11b5705a59613f1e5100fbb0ee86118de5a7845b8fa5087165d7f5a077d20337dfca14a1c7eadbe768995e20e249ec271ac10d SHA512 313a4254262dd8d8b995a50bddbc360cfb67add0818e51a3e9ce25bda6a9b639e9fea8efe7da6adda76dff0a86a364544a13faa516e51b9ea6c25ec99223b435
 DIST pypy3.6-v7.3.1-src.tar.bz2 22712809 BLAKE2B 4250b3fe98c611b9635319c106b80e88ab469eab5f883babb738e175e7b7adc22c85f8ef3fdce1cdc127b521beef8d6c7862e188d8c8889c39f90136d6bbe374 SHA512 f8e32aae7f01225e0e4d6763eaac40fc02dffc3d0b6a30f22d422147f9be4f3290ea78160a912ffae311dea3d503eb31a7a4f3999d3b541fbccd93d1cef4ca56
-DIST pypy3.6-v7.3.2rc1-src.tar.bz2 22730858 BLAKE2B 41a0702d0077c0f546998b858bc8b76226fe8903f4819497aa284231edcb32bc8b047b0a2a35bacfb18ea11fb85de98b95998276c22a3f0dc716b16871b35a3a SHA512 1a6f93f7e767b0db5c40c1e06cadd781c6ddfb02ec86aa61a37f649fe1aa5cd71f7857052e5b48092e3bf8b5cbef6d6401097bf4c4e80c62f7dbdffcd20b70c0
 DIST pypy3.6-v7.3.2rc2-src.tar.bz2 22750248 BLAKE2B 6a8a3c4306cb5c796ee89f3d9ece61f5d669515ae9edf4961f43c7779123554cda0f3b433f8264d3d08e531ef5fe660b494135321a11f441ae1de97ce0abb332 SHA512 a89184314d04bad646cf2e2151e2d5f27ca23a68f25e22b5c2e4f07745671e70c71d869be1c61248ee839632f7151b597fe79eb5af814967a1ae97f2c2cdb8ee
-DIST pypy3.7-v7.3.2rc1-src.tar.bz2 24805791 BLAKE2B 7b16ba9f0b33d572facdf009701712fe1b2c1eb5a4187c3a9197973ef4da140c7704b3409c7c336e1027f89df340fcefc9e52c6ccac75b251aa79d67c98e49c4 SHA512 d2a5c02a541c0ae79cf8c8e1a38299351f9dd81d1a17724d9fe346d8eb4311e2566a319cf1b8a90d393bffdc11657f6fa2f6475441634e57701b00e74899baa0
 DIST pypy3.7-v7.3.2rc2-src.tar.bz2 25066853 BLAKE2B 286ec0909d4b9ba9039cd9ca234a90832e99369f5e7e36a486d219661631efac186e02146dd5bc5a51521fcfdd0047c3fa5a6dbffd20cebe8ff7c209d02fec53 SHA512 c8e5dc5ded2989aa3a6b635e040c23bb8e2812101ce22a104f251e0abaa3320b61f2f611ece58d6b8a8ae9f1cbc8ca22c920f3491dd5653bcb0e05264fd54a4f

diff --git a/dev-python/pypy3/files/7.0.0-gentoo-path.patch b/dev-python/pypy3/files/7.0.0-gentoo-path.patch
deleted file mode 100644
index 135e496f253..00000000000
--- a/dev-python/pypy3/files/7.0.0-gentoo-path.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 44c16c344f137cc91a145294c4124174fc25ad16 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Fri, 27 Nov 2015 17:02:42 +0100
-Subject: [PATCH] Gentoo: override paths for system-wide install based on
- sys.prefix
-
-Override all default distutils install paths to ones suitable for
-system-wide install when sys.prefix indicates we're running the Gentoo
-system-wide install of PyPy with no prefix overrides (e.g. virtualenv).
-
-Fixes: https://bugs.gentoo.org/462306
-Fixes: https://bugs.gentoo.org/465546
-
-[updated for 7.0.0]
----
- lib-python/3/distutils/command/install.py | 13 ++++++++++++-
- 1 file changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/lib-python/3/distutils/command/install.py b/lib-python/3/distutils/command/install.py
-index 77a1827d4b..255603967f 100644
---- a/lib-python/3/distutils/command/install.py
-+++ b/lib-python/3/distutils/command/install.py
-@@ -50,6 +50,13 @@ INSTALL_SCHEMES = {
-         'scripts': '$base/bin',
-         'data'   : '$base',
-         },
-+    'gentoo': {
-+        'purelib': '$base/site-packages',
-+        'platlib': '$base/site-packages',
-+        'headers': '$base/include',
-+        'scripts': '@EPREFIX@/usr/bin',
-+        'data'   : '@EPREFIX@/usr',
-+        },
-     }
- 
- # user site schemes
-@@ -461,7 +468,11 @@ class install(Command):
-         # it's the caller's problem if they supply a bad name!
-         if (hasattr(sys, 'pypy_version_info') and
-             not name.endswith(('_user', '_home'))):
--            name = 'pypy'
-+            if self.install_base == os.path.normpath('@EPREFIX@/usr/lib/pypy3.6'):
-+                # override paths for system-wide install
-+                name = 'gentoo'
-+            else:
-+                name = 'pypy'
-         scheme = INSTALL_SCHEMES[name]
-         for key in SCHEME_KEYS:
-             attrname = 'install_' + key
--- 
-2.21.0.rc1
-

diff --git a/dev-python/pypy3/pypy3-7.3.0.ebuild b/dev-python/pypy3/pypy3-7.3.0.ebuild
deleted file mode 100644
index 83c31b2ebd9..00000000000
--- a/dev-python/pypy3/pypy3-7.3.0.ebuild
+++ /dev/null
@@ -1,219 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 )
-inherit pax-utils python-any-r1
-
-MY_P=pypy3.6-v${PV/_/}
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (3.6) language"
-HOMEPAGE="https://pypy.org/"
-SRC_URI="https://downloads.python.org/pypy/${MY_P}-src.tar.bz2"
-S="${WORKDIR}/${MY_P}-src"
-
-LICENSE="MIT"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-SLOT="0/pypy36-pp73"
-KEYWORDS="amd64 ~ppc64 x86 ~amd64-linux ~x86-linux"
-IUSE="bzip2 gdbm +jit libressl ncurses sqlite test tk"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	|| (
-		dev-python/pypy3-exe:${PV}[bzip2?,ncurses?]
-		dev-python/pypy3-exe-bin:${PV}
-	)
-	!libressl? ( dev-libs/openssl:0= )
-	libressl? ( dev-libs/libressl:0= )
-	gdbm? ( sys-libs/gdbm:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!<dev-python/pypy3-bin-7.3.0:0"
-DEPEND="${RDEPEND}
-	test? (
-		${PYTHON_DEPS}
-		!!dev-python/pytest-forked
-	)"
-
-pkg_setup() {
-	use test && python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	eapply "${FILESDIR}/7.0.0-gentoo-path.patch"
-	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
-	eapply "${FILESDIR}"/7.2.0-distutils-cxx.patch
-
-	sed -e "s^@EPREFIX@^${EPREFIX}^" \
-		-i lib-python/3/distutils/command/install.py || die
-
-	# apply CPython stdlib patches
-	pushd lib-python/3 > /dev/null || die
-	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
-	popd > /dev/null || die
-
-	# tests are copied from cpython and apparently not adjusted to pypy3
-	# or marked XFAIL
-	sed -i -e 's:test_runeval_step:_&:' \
-		lib-python/3/test/test_bdb.py || die
-	sed -i -e 's:test_set_nomemory:_&:' \
-		-e '/class PyMemDebugTests/i@unittest.skip("Broken on pypy3")' \
-		lib-python/3/test/test_capi.py || die
-	sed -i -e 's:test_crashing_decode_handler:_&:' \
-		lib-python/3/test/test_codeccallbacks.py || die
-	sed -i -e 's:test_unicode:_&:' \
-		lib-python/3/test/test_dbm_gnu.py || die
-	sed -i -e 's:test_jumpy:_&:' \
-		lib-python/3/test/test_dis.py || die
-	sed -i -e 's:test_generator_doesnt_retain_old_exc:_&:' \
-		-e 's:test_generator_finalizing_and_exc_info:_&:' \
-		-e 's:test_generator_leaking:_&:' \
-		lib-python/3/test/test_exceptions.py || die
-	sed -i -e 's:test_locale:_&:' \
-		lib-python/3/test/test_format.py || die
-	sed -i -e 's:test_ast_line_numbers:_&:' \
-		-e 's:test_backslashes_in_string_part:_&:' \
-		lib-python/3/test/test_fstring.py || die
-	sed -i -e 's:test_decompressor_bug_28275:_&:' \
-		lib-python/3/test/test_lzma.py || die
-	sed -i -e 's:test_listdir_bytes_like:_&:' \
-		-e 's:test_putenv:_&:' \
-		lib-python/3/test/test_posix.py || die
-	sed -i -e 's:test_auto_history:_&:' \
-		-e 's:test_history_size:_&:' \
-		lib-python/3/test/test_readline.py || die
-	sed -i -e 's:CheckDMLDoesNotAutoCommitBefore:_&:' \
-		-e 's:CheckImmediateTransactionalDDL:_&:' \
-		-e 's:CheckTransactionalDDL:_&:' \
-		lib-python/3/sqlite3/test/transactions.py || die
-	sed -i -e 's:test_pha_optional:_&:' \
-		-e 's:test_pha_required:_&:' \
-		lib-python/3/test/test_ssl.py || die
-	sed -i -e 's:test_eval_bytes_invalid_escape:_&:' \
-		-e 's:test_eval_str_invalid_escape:_&:' \
-		lib-python/3/test/test_string_literals.py || die
-	# the first one's broken by sandbox, the second by our env
-	sed -i -e 's:test_empty_env:_&:' \
-		-e 's:test_executable:_&:' \
-		lib-python/3/test/test_subprocess.py || die
-	sed -i -e 's:test_jump_out_of_async_for_block:_&:' \
-		-e 's:test_jump_over_async_for_block_before_else:_&:' \
-		-e 's:test_no_jump_.*wards_into_async_for_block:_&:' \
-		-e 's:test_no_jump_into_async_for_block_before_else:_&:' \
-		-e 's:test_no_jump_from_yield:_&:' \
-		lib-python/3/test/test_sys_settrace.py || die
-	sed -i -e 's:test_circular_imports:_&:' \
-		lib-python/3/test/test_threaded_import.py || die
-
-	eapply_user
-}
-
-src_compile() {
-	# copy over to make sys.prefix happy
-	cp -p "${BROOT}"/usr/lib/pypy3.6/pypy3-c-${PV} pypy3-c || die
-	cp -p "${BROOT}"/usr/lib/pypy3.6/include/${PV}/* 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 pypy3-c
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy3-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 = {
-#    "_blake2": "_blake2/_blake2_build.py",
-#    "_ssl": "_ssl_build.py",
-#    "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,
-#    "lzma": "_lzma_build.py",
-#    "_decimal": "_decimal_build.py",
-#    "_sha3": "_sha3/_sha3_build.py",
-	cffi_targets=( blake2/_blake2 sha3/_sha3 ssl
-		audioop syslog pwdgrp resource lzma decimal )
-	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
-		../pypy3-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 -x COLUMNS=80
-
-	# Test runner requires Python 2 too. However, it spawns PyPy3
-	# internally so that we end up testing the correct interpreter.
-	"${EPYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python || die
-}
-
-src_install() {
-	local dest=/usr/lib/pypy3.6
-	einfo "Installing PyPy ..."
-	dosym pypy3-c-${PV} "${dest}/pypy3-c"
-	insinto "${dest}"
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r include lib_pypy lib-python
-
-	# replace copied headers with symlinks
-	for x in "${BROOT}"/usr/lib/pypy3.6/include/${PV}/*; do
-		dosym "${PV}/${x##*/}" "${dest}/include/${x##*/}"
-	done
-
-	dosym ../lib/pypy3.6/pypy3-c /usr/bin/pypy3
-	dodoc README.rst
-
-	if ! use gdbm; then
-		rm -r "${ED}${dest}"/lib_pypy/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED}${dest}"/lib-python/*3/sqlite3 \
-			"${ED}${dest}"/lib_pypy/_sqlite3* \
-			"${ED}${dest}"/lib-python/*3/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED}${dest}"/lib-python/*3/{idlelib,tkinter} \
-			"${ED}${dest}"/lib_pypy/_tkinter \
-			"${ED}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
-	fi
-
-	local -x EPYTHON=pypy3
-	local -x PYTHON=${ED}${dest}/pypy3-c
-
-	echo "EPYTHON='${EPYTHON}'" > epython.py || die
-	python_moduleinto /usr/lib/pypy3.6/site-packages
-	python_domodule epython.py
-
-	einfo "Byte-compiling Python standard library..."
-	python_optimize "${ED}${dest}"
-}

diff --git a/dev-python/pypy3/pypy3-7.3.2_rc1-r100.ebuild b/dev-python/pypy3/pypy3-7.3.2_rc1-r100.ebuild
deleted file mode 100644
index 2ba33e2c40c..00000000000
--- a/dev-python/pypy3/pypy3-7.3.2_rc1-r100.ebuild
+++ /dev/null
@@ -1,352 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 )
-inherit pax-utils python-any-r1 toolchain-funcs
-
-MY_P=pypy3.7-v${PV/_/}
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (3.7) language"
-HOMEPAGE="https://pypy.org/"
-SRC_URI="https://downloads.python.org/pypy/${MY_P}-src.tar.bz2"
-S="${WORKDIR}/${MY_P}-src"
-
-LICENSE="MIT"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-SLOT="0/pypy37-pp73"
-KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="bzip2 gdbm +jit libressl ncurses sqlite test tk"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	|| (
-		dev-python/pypy3-exe:${PV}-py37[bzip2?,ncurses?]
-		dev-python/pypy3-exe-bin:${PV}-py37
-	)
-	!libressl? ( dev-libs/openssl:0= )
-	libressl? ( dev-libs/libressl:0= )
-	gdbm? ( sys-libs/gdbm:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!<dev-python/pypy3-bin-7.3.0:0"
-DEPEND="${RDEPEND}
-	test? (
-		${PYTHON_DEPS}
-		!!dev-python/pytest-forked
-	)"
-
-pkg_setup() {
-	use test && python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	eapply "${FILESDIR}/7.3.1-gentoo-path.patch"
-	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
-	eapply "${FILESDIR}/7.3.2-py37-distutils-cxx.patch"
-
-	sed -e "s^@EPREFIX@^${EPREFIX}^" \
-		-i lib-python/3/distutils/command/install.py || die
-
-	# apply CPython stdlib patches
-	pushd lib-python/3 > /dev/null || die
-	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
-	popd > /dev/null || die
-
-	# see http://buildbot.pypy.org/summary?branch=py3.7&builder=pypy-c-jit-linux-x86-64
-	sed -i -e 's:test_snippets(:_&:' \
-		lib-python/3/test/test_ast.py || die
-	sed -i -e 's:testConstructorErrorMessages(:_&:' \
-		lib-python/3/test/test_class.py || die
-	sed -i -e 's:test_pythonmalloc(:_&:' \
-		-e 's:test_sys_flags_set(:_&:' \
-		-e 's:test_unbuffered_output(:_&:' \
-		-e 's:test_xdev(:_&:' \
-		-e 's:test_ignore_PYTHONHASHSEED(:_&:' \
-		lib-python/3/test/test_cmd_line.py || die
-	sed -i -e 's:test_consistent_sys_path_for_module_execution(:_&:' \
-		-e 's:test_issue8202(:_&:' \
-		-e 's:test_issue8202_dash_m_file_ignored(:_&:' \
-		-e 's:test_module_in_package(:_&:' \
-		-e 's:test_module_in_package_in_zipfile(:_&:' \
-		-e 's:test_module_in_subpackage_in_zipfile(:_&:' \
-		-e 's:test_nonexisting_script(:_&:' \
-		-e 's:test_package(:_&:' \
-		-e 's:test_package_compiled(:_&:' \
-		-e 's:test_script_compiled(:_&:' \
-		lib-python/3/test/test_cmd_line_script.py || die
-	sed -i -e 's:test_incremental_errors(:_&:' \
-		lib-python/3/test/test_codecs.py || die
-	sed -i -e 's:test_ressources_gced_in_workers(:_&:' \
-		-e 's:test_submit_after_interpreter_shutdown(:_&:' \
-		lib-python/3/test/test_concurrent_futures.py || die
-	sed -i -e 's:test_for_3(:_&:' \
-		-e 's:test_func_4(:_&:' \
-		lib-python/3/test/test_coroutines.py || die
-	sed -i -e 's:test_strftime(:_&:' \
-		-e 's:test_more_strftime(:_&:' \
-		lib-python/3/test/datetimetester.py || die
-	sed -i -e 's:test_info(:_&:' \
-		-e 's:test_code_info(:_&:' \
-		-e 's:test_show_code(:_&:' \
-		-e 's:test_disassemble_recursive(:_&:' \
-		-e 's:test_disassemble_str(:_&:' \
-		-e 's:test_jumpy(:_&:' \
-		lib-python/3/test/test_dis.py || die
-	sed -i -e 's:test_generator_doesnt_retain_old_exc2(:_&:' \
-		-e 's:test_attributes(:_&:' \
-		lib-python/3/test/test_exceptions.py || die
-	sed -i -e 's:test_frozen(:_&:' \
-		lib-python/3/test/test_frozen.py || die
-	sed -i -e 's:test_ssl_raises(:_&:' \
-		-e 's:test_ssl_verified(:_&:' \
-		lib-python/3/test/test_imaplib.py || die
-	sed -i -e 's:test_script_compiled(:_&:' \
-		lib-python/3/test/test_multiprocessing_main_handling.py || die
-	sed -i -e 's:test_execve_invalid_env(:_&:' \
-		lib-python/3/test/test_os.py || die
-	sed -i -e 's:test_get_and_set_scheduler_and_param(:_&:' \
-		lib-python/3/test/test_posix.py || die
-	sed -i -e 's:test_copying(:_&:' \
-		-e 's:test_re_split(:_&:' \
-		-e 's:test_zerowidth(:_&:' \
-		-e 's:test_locale_caching(:_&:' \
-		-e 's:test_locale_compiled(:_&:' \
-		-e 's:test_match_repr(:_&:' \
-		-e 's:test_qualified_re_split(:_&:' \
-		-e 's:test_scoped_flags(:_&:' \
-		lib-python/3/test/test_re.py || die
-	sed -i -e 's:test_auto_history_disabled(:_&:' \
-		-e 's:test_auto_history_enabled(:_&:' \
-		-e 's:test_history_size(:_&:' \
-		lib-python/3/test/test_readline.py || die
-	sed -i -e 's:test_multiprocess(:_&:' \
-		lib-python/3/test/test_regrtest.py || die
-	sed -i -e 's:test_warn_on_full_buffer(:_&:' \
-		lib-python/3/test/test_signal.py || die
-	sed -i -e 's:test_get_path(:_&:' \
-		lib-python/3/test/test_site.py || die
-	sed -i -e 's:test_check_hostname(:_&:' \
-		-e 's:test_npn_protocols(:_&:' \
-		-e 's:test_sni_callback(:_&:' \
-		-e 's:test_sni_callback_raising(:_&:' \
-		lib-python/3/test/test_ssl.py || die
-	sed -i -e 's:test_invalid_placeholders(:_&:' \
-		lib-python/3/test/test_string.py || die
-	sed -i -e 's:test_eval_bytes_invalid_escape(:_&:' \
-		-e 's:test_eval_str_invalid_escape(:_&:' \
-		lib-python/3/test/test_string_literals.py || die
-	sed -i -e 's:test_boundary_error_message_with_large_offset(:_&:' \
-		lib-python/3/test/test_struct.py || die
-	sed -i -e 's:test_restore_signals(:_&:' \
-		lib-python/3/test/test_subprocess.py || die
-	sed -i -e 's:test_jump_out_of_async_for_block_backwards(:_&:' \
-		-e 's:test_jump_out_of_async_for_block_forwards(:_&:' \
-		-e 's:test_jump_over_async_for_block_before_else(:_&:' \
-		-e 's:test_no_jump_backwards_into_async_for_block(:_&:' \
-		-e 's:test_no_jump_forwards_into_async_for_block(:_&:' \
-		-e 's:test_no_jump_into_async_for_block_before_else(:_&:' \
-		-e 's:test_no_jump_from_yield(:_&:' \
-		lib-python/3/test/test_sys_settrace.py || die
-	sed -i -e 's:test_install_schemes(:_&:' \
-		lib-python/3/test/test_sysconfig_pypy.py || die
-	sed -i -e 's:test_circular_imports(:_&:' \
-		lib-python/3/test/test_threaded_import.py || die
-	sed -i -e 's:test_main_milliseconds(:_&:' \
-		-e 's:test_main_verbose(:_&:' \
-		-e 's:test_main_very_verbose(:_&:' \
-		-e 's:test_main_with_time_unit(:_&:' \
-		lib-python/3/test/test_timeit.py || die
-	sed -i -e 's:test_cannot_subclass(:_&:' \
-		lib-python/3/test/test_typing.py || die
-	sed -i -e 's:test_warnings(:_&:' \
-		lib-python/3/unittest/test/test_runner.py || die
-	sed -i -e 's:test_cmd_line(:_&:' \
-		-e 's:test_env_var(:_&:' \
-		-e 's:test_locale_getpreferredencoding(:_&:' \
-		-e 's:test_posix_locale(:_&:' \
-		-e 's:test_stdio(:_&:' \
-		-e 's:test_xoption(:_&:' \
-		lib-python/3/test/test_utf8_mode.py || die
-	sed -i -e 's:test_asyncgen_finalization_by_gc(:_&:' \
-		-e 's:test_asyncgen_finalization_by_gc_in_other_thread(:_&:' \
-		-e 's:test_create_connection_ipv6_scope(:_&:' \
-		lib-python/3/test/test_asyncio/test_base_events.py || die
-	sed -i -e 's:test_buffered_proto_create_connection(:_&:' \
-		lib-python/3/test/test_asyncio/test_buffered_proto.py || die
-	sed -i -e 's:test_create_connection_memory_leak(:_&:' \
-		-e 's:test_handshake_timeout(:_&:' \
-		-e 's:test_start_tls_client_reg_proto_1(:_&:' \
-		lib-python/3/test/test_asyncio/test_sslproto.py || die
-	sed -i -e 's:test_bare_create_task(:_&:' \
-		-e 's:test_current_task(:_&:' \
-		lib-python/3/test/test_asyncio/test_tasks.py || die
-	sed -i -e 's:test_asyncio_task_decimal_context(:_&:' \
-		lib-python/3/test/test_asyncio/test_context.py || die
-	sed -i -e 's:test_create_server_ssl_match_failed(:_&:' \
-		lib-python/3/test/test_asyncio/test_events.py || die
-	sed -i -e 's:test_binding(:_&:' \
-		-e 's:test_from_import_AttributeError(:_&:' \
-		-e 's:test_from_import_missing_attr_has_name_and_path(:_&:' \
-		-e 's:test_from_import_missing_attr_path_is_canonical(:_&:' \
-		lib-python/3/test/test_import/__init__.py || die
-	sed -i -e 's:test_unrelated_contents(:_&:' \
-		-e 's:test_contents(:_&:' \
-		-e 's:test_submodule_contents(:_&:' \
-		-e 's:test_submodule_contents_by_name(:_&:' \
-		-e 's:test_is_resource_good_path(:_&:' \
-		-e 's:test_is_submodule_resource(:_&:' \
-		-e 's:test_read_submodule_resource_by_name(:_&:' \
-		lib-python/3/test/test_importlib/test_resource.py || die
-	sed -i -e 's:test_non_string_keys_dict(:_&:' \
-		lib-python/3/test/test_json/test_fail.py || die
-	sed -i -e 's:test_module(:_&:' \
-		lib-python/3/test/test_warnings/__init__.py || die
-
-	# flaky
-	sed -i -e 's:test_2_join_in_forked_process(:_&:' \
-		lib-python/3/test/test_threading.py || die
-
-	# TODO
-	sed -i -e 's:test_external_target_locale_configuration(:_&:' \
-		lib-python/3/test/test_c_locale_coercion.py || die
-	sed -i -e 's:test_locale(:_&:' \
-		lib-python/3/test/test_format.py || die
-	sed -i -e 's:test_decompressor_bug_28275(:_&:' \
-		lib-python/3/test/test_lzma.py || die
-	sed -i -e 's:test_wrapped_exception:_&:' \
-		lib-python/3/test/_test_multiprocessing.py || die
-	sed -i -e 's:test_https_sni(:_&:' \
-		lib-python/3/test/test_urllib2_localnet.py || die
-
-	# the first one's broken by sandbox, the second by our env
-	sed -i -e 's:test_executable(:_&:' \
-		-e 's:test_executable_without_cwd(:_&:' \
-		lib-python/3/test/test_subprocess.py || die
-
-	eapply_user
-}
-
-src_configure() {
-	tc-export CC
-}
-
-src_compile() {
-	# copy over to make sys.prefix happy
-	cp -p "${BROOT}"/usr/lib/pypy3.7/pypy3-c-${PV} pypy3-c || die
-	cp -p "${BROOT}"/usr/lib/pypy3.7/include/${PV}/* 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 pypy3-c
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy3-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 = {
-#    "_blake2": "_blake2/_blake2_build.py",
-#    "_ssl": "_ssl_build.py",
-#    "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,
-#    "lzma": "_lzma_build.py",
-#    "_decimal": "_decimal_build.py",
-#    "_sha3": "_sha3/_sha3_build.py",
-	cffi_targets=( blake2/_blake2 sha3/_sha3 ssl
-		audioop syslog pwdgrp resource lzma decimal )
-	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
-		../pypy3-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 -x COLUMNS=80
-
-	local ignore=(
-		# failing doctests
-		lib-python/3/test/test_extcall.py
-		lib-python/3/test/test_unpack_ex.py
-
-		# segfault
-		lib-python/3/test/test_capi.py
-	)
-
-	# Test runner requires Python 2 too. However, it spawns PyPy3
-	# internally so that we end up testing the correct interpreter.
-	# (--deselect for failing doctests)
-	"${EPYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python \
-		${ignore[@]/#/--ignore } || die
-}
-
-src_install() {
-	local dest=/usr/lib/pypy3.7
-	einfo "Installing PyPy ..."
-	dosym pypy3-c-${PV} "${dest}/pypy3-c"
-	insinto "${dest}"
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r include lib_pypy lib-python
-
-	# replace copied headers with symlinks
-	for x in "${BROOT}"/usr/lib/pypy3.7/include/${PV}/*; do
-		dosym "${PV}/${x##*/}" "${dest}/include/${x##*/}"
-	done
-
-	dosym ../lib/pypy3.7/pypy3-c /usr/bin/pypy3
-	dodoc README.rst
-
-	if ! use gdbm; then
-		rm -r "${ED}${dest}"/lib_pypy/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED}${dest}"/lib-python/*3/sqlite3 \
-			"${ED}${dest}"/lib_pypy/_sqlite3* \
-			"${ED}${dest}"/lib-python/*3/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED}${dest}"/lib-python/*3/{idlelib,tkinter} \
-			"${ED}${dest}"/lib_pypy/_tkinter \
-			"${ED}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
-	fi
-
-	local -x EPYTHON=pypy3
-	local -x PYTHON=${ED}${dest}/pypy3-c
-
-	echo "EPYTHON='${EPYTHON}'" > epython.py || die
-	python_moduleinto /usr/lib/pypy3.7/site-packages
-	python_domodule epython.py
-
-	einfo "Byte-compiling Python standard library..."
-	python_optimize "${ED}${dest}"
-}

diff --git a/dev-python/pypy3/pypy3-7.3.2_rc1.ebuild b/dev-python/pypy3/pypy3-7.3.2_rc1.ebuild
deleted file mode 100644
index 45d2ebfd217..00000000000
--- a/dev-python/pypy3/pypy3-7.3.2_rc1.ebuild
+++ /dev/null
@@ -1,202 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 )
-inherit pax-utils python-any-r1 toolchain-funcs
-
-MY_P=pypy3.6-v${PV/_/}
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (3.6) language"
-HOMEPAGE="https://pypy.org/"
-SRC_URI="https://downloads.python.org/pypy/${MY_P}-src.tar.bz2"
-S="${WORKDIR}/${MY_P}-src"
-
-LICENSE="MIT"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-SLOT="0/pypy36-pp73"
-KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="bzip2 gdbm +jit libressl ncurses sqlite test tk"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	|| (
-		dev-python/pypy3-exe:${PV}[bzip2?,ncurses?]
-		dev-python/pypy3-exe-bin:${PV}
-	)
-	!libressl? ( dev-libs/openssl:0= )
-	libressl? ( dev-libs/libressl:0= )
-	gdbm? ( sys-libs/gdbm:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!<dev-python/pypy3-bin-7.3.0:0"
-DEPEND="${RDEPEND}
-	test? (
-		${PYTHON_DEPS}
-		!!dev-python/pytest-forked
-	)"
-
-pkg_setup() {
-	use test && python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	eapply "${FILESDIR}/7.3.1-gentoo-path.patch"
-	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
-	eapply "${FILESDIR}"/7.2.0-distutils-cxx.patch
-
-	sed -e "s^@EPREFIX@^${EPREFIX}^" \
-		-i lib-python/3/distutils/command/install.py || die
-
-	# apply CPython stdlib patches
-	pushd lib-python/3 > /dev/null || die
-	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
-	popd > /dev/null || die
-
-	# see http://buildbot.pypy.org/summary?branch=py3.6&builder=pypy-c-jit-linux-x86-64
-	sed -i -e 's:test_jumpy:_&:' \
-		lib-python/3/test/test_dis.py || die
-	sed -i -e 's:test_get_and_set_scheduler_and_param:_&:' \
-		lib-python/3/test/test_posix.py || die
-	sed -i -e 's:test_auto_history:_&:' \
-		-e 's:test_history_size:_&:' \
-		lib-python/3/test/test_readline.py || die
-	sed -i -e 's:test_eval_bytes_invalid_escape:_&:' \
-		-e 's:test_eval_str_invalid_escape:_&:' \
-		lib-python/3/test/test_string_literals.py || die
-	sed -i -e 's:test_jump_out_of_async_for_block:_&:' \
-		-e 's:test_jump_over_async_for_block_before_else:_&:' \
-		-e 's:test_no_jump_.*wards_into_async_for_block:_&:' \
-		-e 's:test_no_jump_into_async_for_block_before_else:_&:' \
-		-e 's:test_no_jump_from_yield:_&:' \
-		lib-python/3/test/test_sys_settrace.py || die
-	sed -i -e 's:test_circular_imports:_&:' \
-		lib-python/3/test/test_threaded_import.py || die
-
-	# the first one's broken by sandbox, the second by our env
-	sed -i -e 's:test_empty_env:_&:' \
-		-e 's:test_executable(:_&:' \
-		-e 's:test_executable_without_cwd:_&:' \
-		lib-python/3/test/test_subprocess.py || die
-
-	# XXX
-	sed -i -e 's:test_locale:_&:' \
-		lib-python/3/test/test_format.py || die
-	sed -i -e 's:test_decompressor_bug_28275:_&:' \
-		lib-python/3/test/test_lzma.py || die
-
-	eapply_user
-}
-
-src_configure() {
-	tc-export CC
-}
-
-src_compile() {
-	# copy over to make sys.prefix happy
-	cp -p "${BROOT}"/usr/lib/pypy3.6/pypy3-c-${PV} pypy3-c || die
-	cp -p "${BROOT}"/usr/lib/pypy3.6/include/${PV}/* 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 pypy3-c
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy3-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 = {
-#    "_blake2": "_blake2/_blake2_build.py",
-#    "_ssl": "_ssl_build.py",
-#    "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,
-#    "lzma": "_lzma_build.py",
-#    "_decimal": "_decimal_build.py",
-#    "_sha3": "_sha3/_sha3_build.py",
-	cffi_targets=( blake2/_blake2 sha3/_sha3 ssl
-		audioop syslog pwdgrp resource lzma decimal )
-	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
-		../pypy3-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 -x COLUMNS=80
-
-	# Test runner requires Python 2 too. However, it spawns PyPy3
-	# internally so that we end up testing the correct interpreter.
-	"${EPYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python || die
-}
-
-src_install() {
-	local dest=/usr/lib/pypy3.6
-	einfo "Installing PyPy ..."
-	dosym pypy3-c-${PV} "${dest}/pypy3-c"
-	insinto "${dest}"
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r include lib_pypy lib-python
-
-	# replace copied headers with symlinks
-	for x in "${BROOT}"/usr/lib/pypy3.6/include/${PV}/*; do
-		dosym "${PV}/${x##*/}" "${dest}/include/${x##*/}"
-	done
-
-	dosym ../lib/pypy3.6/pypy3-c /usr/bin/pypy3
-	dodoc README.rst
-
-	if ! use gdbm; then
-		rm -r "${ED}${dest}"/lib_pypy/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED}${dest}"/lib-python/*3/sqlite3 \
-			"${ED}${dest}"/lib_pypy/_sqlite3* \
-			"${ED}${dest}"/lib-python/*3/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED}${dest}"/lib-python/*3/{idlelib,tkinter} \
-			"${ED}${dest}"/lib_pypy/_tkinter \
-			"${ED}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
-	fi
-
-	local -x EPYTHON=pypy3
-	local -x PYTHON=${ED}${dest}/pypy3-c
-
-	echo "EPYTHON='${EPYTHON}'" > epython.py || die
-	python_moduleinto /usr/lib/pypy3.6/site-packages
-	python_domodule epython.py
-
-	einfo "Byte-compiling Python standard library..."
-	python_optimize "${ED}${dest}"
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/
@ 2021-02-09 23:38 Michał Górny
  0 siblings, 0 replies; 17+ messages in thread
From: Michał Górny @ 2021-02-09 23:38 UTC (permalink / raw
  To: gentoo-commits

commit:     ba21d61bf2fd7912252e10ecff3e03f735a78855
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  9 23:34:56 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Feb  9 23:38:41 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba21d61b

dev-python/pypy3: Backport servername_callback fix

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

 dev-python/pypy3/files/7.3.3_p37-sni-handle.patch  | 38 ++++++++++++++++++++++
 ...-7.3.3_p37.ebuild => pypy3-7.3.3_p37-r1.ebuild} |  4 ++-
 2 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/dev-python/pypy3/files/7.3.3_p37-sni-handle.patch b/dev-python/pypy3/files/7.3.3_p37-sni-handle.patch
new file mode 100644
index 00000000000..c4e377c3d8d
--- /dev/null
+++ b/dev-python/pypy3/files/7.3.3_p37-sni-handle.patch
@@ -0,0 +1,38 @@
+diff -dupr a/lib_pypy/_cffi_ssl/_stdssl/__init__.py b/lib_pypy/_cffi_ssl/_stdssl/__init__.py
+--- a/lib_pypy/_cffi_ssl/_stdssl/__init__.py	2021-02-10 00:15:40.815208732 +0100
++++ b/lib_pypy/_cffi_ssl/_stdssl/__init__.py	2021-02-10 00:19:27.963109365 +0100
+@@ -1008,10 +1008,10 @@ for name in SSL_CTX_STATS_NAMES:
+     SSL_CTX_STATS.append((name, getattr(lib, attr)))
+ 
+ class _SSLContext(object):
+-    __slots__ = ('ctx', '_check_hostname', 'servername_callback',
++    __slots__ = ('ctx', '_check_hostname',
+                  'alpn_protocols', '_alpn_protocols_handle', '_protocol'
+                  'npn_protocols', 'set_hostname', '_post_handshake_auth',
+-                 '_sni_cb', '_npn_protocols_handle')
++                 '_sni_cb', '_sni_cb_handle', '_npn_protocols_handle')
+     def __new__(cls, protocol):
+         self = object.__new__(cls)
+         self.ctx = ffi.NULL
+@@ -1451,15 +1451,17 @@ class _SSLContext(object):
+                     "is not in the current OpenSSL library.")
+         if cb is None:
+             lib.SSL_CTX_set_tlsext_servername_callback(self.ctx, ffi.NULL)
+-            self._sni_cb= None
++            self._sni_cb = None
++            lib.SSL_CTX_set_tlsext_servername_arg(self.ctx, ffi.NULL)
++            self._sni_cb_handle = None
+             return
+         if not callable(cb):
+             lib.SSL_CTX_set_tlsext_servername_callback(self.ctx, ffi.NULL)
+             raise TypeError("not a callable object")
+-        self.scb = ServernameCallback(cb, self)
+-        sni_cb = ffi.new_handle(self.scb)
++        self._sni_cb = ServernameCallback(cb, self)
++        self._sni_cb_handle = ffi.new_handle(self._sni_cb)
+         lib.SSL_CTX_set_tlsext_servername_callback(self.ctx, _servername_callback)
+-        lib.SSL_CTX_set_tlsext_servername_arg(self.ctx, sni_cb)
++        lib.SSL_CTX_set_tlsext_servername_arg(self.ctx, self._sni_cb_handle)
+ 
+     def cert_store_stats(self):
+         store = lib.SSL_CTX_get_cert_store(self.ctx)

diff --git a/dev-python/pypy3/pypy3-7.3.3_p37.ebuild b/dev-python/pypy3/pypy3-7.3.3_p37-r1.ebuild
similarity index 97%
rename from dev-python/pypy3/pypy3-7.3.3_p37.ebuild
rename to dev-python/pypy3/pypy3-7.3.3_p37-r1.ebuild
index 9c1fc7d860b..a5d9d3cf0aa 100644
--- a/dev-python/pypy3/pypy3-7.3.3_p37.ebuild
+++ b/dev-python/pypy3/pypy3-7.3.3_p37-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -50,6 +50,8 @@ src_prepare() {
 	eapply "${FILESDIR}/7.3.1-gentoo-path.patch"
 	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
 	eapply "${FILESDIR}/7.3.2-py37-distutils-cxx.patch"
+	# https://foss.heptapod.net/pypy/pypy/-/issues/3396
+	eapply "${FILESDIR}/7.3.3_p37-sni-handle.patch"
 
 	sed -e "s^@EPREFIX@^${EPREFIX}^" \
 		-i lib-python/3/distutils/command/install.py || die


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

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

commit:     37cca71d79c4a0137ffb5b7c532d3b9ef1d4932f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Mar  5 21:03:49 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Mar  5 21:06:21 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37cca71d

dev-python/pypy3: Remove old

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

 dev-python/pypy3/Manifest                          |   1 -
 ....UnixCCompiler.runtime_library_dir_option.patch |  11 -
 dev-python/pypy3/files/7.2.0-distutils-cxx.patch   | 306 --------------------
 dev-python/pypy3/files/7.3.1-gentoo-path.patch     |  42 ---
 .../pypy3/files/7.3.2-py37-distutils-cxx.patch     | 314 ---------------------
 dev-python/pypy3/files/7.3.3_p37-sni-handle.patch  |  38 ---
 .../files/python-3.5-distutils-OO-build.patch      |  80 ------
 dev-python/pypy3/pypy3-7.3.3.ebuild                | 207 --------------
 dev-python/pypy3/pypy3-7.3.3_p37-r1.ebuild         | 180 ------------
 9 files changed, 1179 deletions(-)

diff --git a/dev-python/pypy3/Manifest b/dev-python/pypy3/Manifest
index 64c074ac59d..8f103b863d6 100644
--- a/dev-python/pypy3/Manifest
+++ b/dev-python/pypy3/Manifest
@@ -1,3 +1,2 @@
-DIST pypy3.6-v7.3.3-src.tar.bz2 22484684 BLAKE2B a252e3070ec1c7cfd708cd694bd461d56241100463bac5ff7bbcf2d2667e01990ec8b4ceb947449ab1f620d0d5a8984bd8af3e2565555e5f73218e3c35ae1ebd SHA512 3bc9d9cc362f500e9e79c2694fc355706ac44d6dd5b8f5fb4d017d0997581472a9fdda08ccbe45469c7b52facdc0512be07843ba54d1d691fdb37f6628065879
 DIST pypy3.7-gentoo-patches-7.3.3_p1.tar.xz 13816 BLAKE2B 135a029e2d881ed5e43869fde391571285454b8612f2857fb5fe7aaf5b126f84d01293bd31e7a7746ad03fce1e14ace6a6f9cc2634269ec431b4aabfe70f9b4c SHA512 acf4938bc171e757196cf138358a298880792367ca5fff6b462d6971c8597e064777f99b687cb25003c6f25762a901ed482eebd791fdb008fa729ca9c9c300e8
 DIST pypy3.7-v7.3.3-src.tar.bz2 24633503 BLAKE2B 0fb9fbb8866cf661c5b1d8d029fb2bc50737fae097875d0dac86c9ec21dc907093173b350a4f89d2c5a1fbed4c92ca4919f047536b828d4ee35583d615e7ddce SHA512 c98955e72dc0bd0452e4e16e0fe0ab318a34d6d57217ea33349e98ed047597ba97be7d15b41edd4dc85028fcca0a6257a4bb98fe96ce876e41a04df012261f4a

diff --git a/dev-python/pypy3/files/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch b/dev-python/pypy3/files/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch
deleted file mode 100644
index 29d99dcfdb7..00000000000
--- a/dev-python/pypy3/files/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/lib-python/3/distutils/unixccompiler.py
-+++ b/lib-python/3/distutils/unixccompiler.py
-@@ -297,7 +297,7 @@
-         # this time, there's no way to determine this information from
-         # the configuration data stored in the Python installation, so
-         # we use this hack.
--        compiler = os.path.basename(sysconfig.get_config_var("CC"))
-+        compiler = os.path.basename(self.compiler[0])
-         if sys.platform[:6] == "darwin":
-             # MacOSX's linker doesn't understand the -R flag at all
-             return "-L" + dir

diff --git a/dev-python/pypy3/files/7.2.0-distutils-cxx.patch b/dev-python/pypy3/files/7.2.0-distutils-cxx.patch
deleted file mode 100644
index 89a38050c80..00000000000
--- a/dev-python/pypy3/files/7.2.0-distutils-cxx.patch
+++ /dev/null
@@ -1,306 +0,0 @@
-diff --git a/lib-python/3/distutils/cygwinccompiler.py b/lib-python/3/distutils/cygwinccompiler.py
-index 1c36990..ead3174 100644
---- a/lib-python/3/distutils/cygwinccompiler.py
-+++ b/lib-python/3/distutils/cygwinccompiler.py
-@@ -125,8 +125,10 @@ class CygwinCCompiler(UnixCCompiler):
-         # dllwrap 2.10.90 is buggy
-         if self.ld_version >= "2.10.90":
-             self.linker_dll = "gcc"
-+            self.linker_dll_cxx = "g++"
-         else:
-             self.linker_dll = "dllwrap"
-+            self.linker_dll_cxx = "dllwrap"
- 
-         # ld_version >= "2.13" support -shared so use it instead of
-         # -mdll -static
-@@ -140,9 +142,13 @@ class CygwinCCompiler(UnixCCompiler):
-         self.set_executables(compiler='gcc -mcygwin -O -Wall',
-                              compiler_so='gcc -mcygwin -mdll -O -Wall',
-                              compiler_cxx='g++ -mcygwin -O -Wall',
-+                             compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
-                              linker_exe='gcc -mcygwin',
-                              linker_so=('%s -mcygwin %s' %
--                                        (self.linker_dll, shared_option)))
-+                                        (self.linker_dll, shared_option)),
-+                             linker_exe_cxx='g++ -mcygwin',
-+                             linker_so_cxx=('%s -mcygwin %s' %
-+                                            (self.linker_dll_cxx, shared_option)))
- 
-         # cygwin and mingw32 need different sets of libraries
-         if self.gcc_version == "2.91.57":
-@@ -166,8 +172,12 @@ class CygwinCCompiler(UnixCCompiler):
-                 raise CompileError(msg)
-         else: # for other files use the C-compiler
-             try:
--                self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
--                           extra_postargs)
-+                if self.detect_language(src) == 'c++':
-+                    self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
-+                               extra_postargs)
-+                else:
-+                    self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-+                               extra_postargs)
-             except DistutilsExecError as msg:
-                 raise CompileError(msg)
- 
-@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler):
-         self.set_executables(compiler='gcc -O -Wall',
-                              compiler_so='gcc -mdll -O -Wall',
-                              compiler_cxx='g++ -O -Wall',
-+                             compiler_so_cxx='g++ -mdll -O -Wall',
-                              linker_exe='gcc',
-                              linker_so='%s %s %s'
-                                         % (self.linker_dll, shared_option,
-+                                           entry_point),
-+                             linker_exe_cxx='g++',
-+                             linker_so_cxx='%s %s %s'
-+                                        % (self.linker_dll_cxx, shared_option,
-                                            entry_point))
-         # Maybe we should also append -mthreads, but then the finished
-         # dlls need another dll (mingwm10.dll see Mingw32 docs)
-diff --git a/lib-python/3/distutils/sysconfig_cpython.py b/lib-python/3/distutils/sysconfig_cpython.py
-index b8340f1..a8c5473 100644
---- a/lib-python/3/distutils/sysconfig_cpython.py
-+++ b/lib-python/3/distutils/sysconfig_cpython.py
-@@ -170,9 +170,12 @@ def customize_compiler(compiler):
-                 _osx_support.customize_compiler(_config_vars)
-                 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
- 
--        (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
--            get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
--                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+        (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
-+            get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
-+                            'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+
-+        cflags = ''
-+        cxxflags = ''
- 
-         if 'CC' in os.environ:
-             newcc = os.environ['CC']
-@@ -187,19 +190,27 @@ def customize_compiler(compiler):
-             cxx = os.environ['CXX']
-         if 'LDSHARED' in os.environ:
-             ldshared = os.environ['LDSHARED']
-+        if 'LDCXXSHARED' in os.environ:
-+            ldcxxshared = os.environ['LDCXXSHARED']
-         if 'CPP' in os.environ:
-             cpp = os.environ['CPP']
-         else:
-             cpp = cc + " -E"           # not always
-         if 'LDFLAGS' in os.environ:
-             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
-         if 'CFLAGS' in os.environ:
--            cflags = opt + ' ' + os.environ['CFLAGS']
-+            cflags = os.environ['CFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CFLAGS']
-+        if 'CXXFLAGS' in os.environ:
-+            cxxflags = os.environ['CXXFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
-         if 'CPPFLAGS' in os.environ:
-             cpp = cpp + ' ' + os.environ['CPPFLAGS']
-             cflags = cflags + ' ' + os.environ['CPPFLAGS']
-+            cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
-         if 'AR' in os.environ:
-             ar = os.environ['AR']
-         if 'ARFLAGS' in os.environ:
-@@ -208,13 +219,17 @@ def customize_compiler(compiler):
-             archiver = ar + ' ' + ar_flags
- 
-         cc_cmd = cc + ' ' + cflags
-+        cxx_cmd = cxx + ' ' + cxxflags
-         compiler.set_executables(
-             preprocessor=cpp,
-             compiler=cc_cmd,
-             compiler_so=cc_cmd + ' ' + ccshared,
--            compiler_cxx=cxx,
-+            compiler_cxx=cxx_cmd,
-+            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
-             linker_so=ldshared,
-             linker_exe=cc,
-+            linker_so_cxx=ldcxxshared,
-+            linker_exe_cxx=cxx,
-             archiver=archiver)
- 
-         compiler.shared_lib_extension = shlib_suffix
-diff --git a/lib-python/3/distutils/sysconfig_pypy.py b/lib-python/3/distutils/sysconfig_pypy.py
-index bf1748e..70dfd72 100644
---- a/lib-python/3/distutils/sysconfig_pypy.py
-+++ b/lib-python/3/distutils/sysconfig_pypy.py
-@@ -145,36 +145,52 @@ def customize_compiler(compiler):
-                 _osx_support.customize_compiler(_config_vars)
-                 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
- 
--        (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
--            get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
--                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+        (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
-+            get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
-+                            'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+
-+        cflags = ''
-+        cxxflags = ''
- 
-         if 'CC' in os.environ:
-             newcc = os.environ['CC']
--            if (sys.platform == 'darwin'
-+            if (True
-                     and 'LDSHARED' not in os.environ
-                     and ldshared.startswith(cc)):
-                 # On OS X, if CC is overridden, use that as the default
-                 #       command for LDSHARED as well
-+                # Gentoo: s/OS X/every system/
-                 ldshared = newcc + ldshared[len(cc):]
-             cc = newcc
-         if 'CXX' in os.environ:
--            cxx = os.environ['CXX']
-+            newcxx = os.environ['CXX']
-+            if ('LDCXXSHARED' not in os.environ
-+                    and ldcxxshared.startswith(cxx)):
-+                ldcxxshared = newcxx + ldcxxshared[len(cxx):]
-+            cxx = newcxx
-         if 'LDSHARED' in os.environ:
-             ldshared = os.environ['LDSHARED']
-+        if 'LDCXXSHARED' in os.environ:
-+            ldcxxshared = os.environ['LDCXXSHARED']
-         if 'CPP' in os.environ:
-             cpp = os.environ['CPP']
-         else:
-             cpp = cc + " -E"           # not always
-         if 'LDFLAGS' in os.environ:
-             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
-         if 'CFLAGS' in os.environ:
--            cflags = opt + ' ' + os.environ['CFLAGS']
-+            cflags = os.environ['CFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CFLAGS']
-+        if 'CXXFLAGS' in os.environ:
-+            cxxflags = os.environ['CXXFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
-         if 'CPPFLAGS' in os.environ:
-             cpp = cpp + ' ' + os.environ['CPPFLAGS']
-             cflags = cflags + ' ' + os.environ['CPPFLAGS']
-+            cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
-         if 'AR' in os.environ:
-             ar = os.environ['AR']
-         if 'ARFLAGS' in os.environ:
-@@ -183,13 +199,17 @@ def customize_compiler(compiler):
-             archiver = ar + ' ' + ar_flags
- 
-         cc_cmd = cc + ' ' + cflags
-+        cxx_cmd = cxx + ' ' + cxxflags
-         compiler.set_executables(
-             preprocessor=cpp,
-             compiler=cc_cmd,
-             compiler_so=cc_cmd + ' ' + ccshared,
--            compiler_cxx=cxx,
-+            compiler_cxx=cxx_cmd,
-+            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
-             linker_so=ldshared,
-             linker_exe=cc,
-+            linker_so_cxx=ldcxxshared,
-+            linker_exe_cxx=cxx,
-             archiver=archiver)
- 
-         compiler.shared_lib_extension = shlib_suffix
-diff --git a/lib-python/3/distutils/unixccompiler.py b/lib-python/3/distutils/unixccompiler.py
-index 2944ceb..cf2f219 100644
---- a/lib-python/3/distutils/unixccompiler.py
-+++ b/lib-python/3/distutils/unixccompiler.py
-@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler):
-     # are pretty generic; they will probably have to be set by an outsider
-     # (eg. using information discovered by the sysconfig about building
-     # Python extensions).
--    executables = {'preprocessor' : None,
--                   'compiler'     : ["cc"],
--                   'compiler_so'  : ["cc"],
--                   'compiler_cxx' : ["c++"],  # pypy: changed, 'cc' is bogus
--                   'linker_so'    : ["cc", "-shared"],
--                   'linker_exe'   : ["cc"],
--                   'archiver'     : ["ar", "-cr"],
--                   'ranlib'       : None,
-+    executables = {'preprocessor'    : None,
-+                   'compiler'        : ["cc"],
-+                   'compiler_so'     : ["cc"],
-+                   'compiler_cxx'    : ["c++"],
-+                   'compiler_so_cxx' : ["c++"],
-+                   'linker_so'       : ["cc", "-shared"],
-+                   'linker_exe'      : ["cc"],
-+                   'linker_so_cxx'   : ["c++", "-shared"],
-+                   'linker_exe_cxx'  : ["c++"],
-+                   'archiver'        : ["ar", "-cr"],
-+                   'ranlib'          : None,
-                   }
- 
-     if sys.platform[:6] == "darwin":
-@@ -125,12 +128,19 @@ class UnixCCompiler(CCompiler):
- 
-     def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
-         compiler_so = self.compiler_so
-+        compiler_so_cxx = self.compiler_so_cxx
-         if sys.platform == 'darwin':
-             compiler_so = _osx_support.compiler_fixup(compiler_so,
-                                                     cc_args + extra_postargs)
-+            compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
-+                                                    cc_args + extra_postargs)
-         try:
--            self.spawn(compiler_so + cc_args + [src, '-o', obj] +
--                       extra_postargs)
-+            if self.detect_language(src) == 'c++':
-+                self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
-+                           extra_postargs)
-+            else:
-+                self.spawn(compiler_so + cc_args + [src, '-o', obj] +
-+                           extra_postargs)
-         except DistutilsExecError as msg:
-             raise CompileError(msg)
- 
-@@ -188,22 +198,16 @@ class UnixCCompiler(CCompiler):
-                 ld_args.extend(extra_postargs)
-             self.mkpath(os.path.dirname(output_filename))
-             try:
--                if target_desc == CCompiler.EXECUTABLE:
--                    linker = self.linker_exe[:]
-+                if target_lang == "c++":
-+                    if target_desc == CCompiler.EXECUTABLE:
-+                        linker = self.linker_exe_cxx[:]
-+                    else:
-+                        linker = self.linker_so_cxx[:]
-                 else:
--                    linker = self.linker_so[:]
--                if target_lang == "c++" and self.compiler_cxx:
--                    # skip over environment variable settings if /usr/bin/env
--                    # is used to set up the linker's environment.
--                    # This is needed on OSX. Note: this assumes that the
--                    # normal and C++ compiler have the same environment
--                    # settings.
--                    i = 0
--                    if os.path.basename(linker[0]) == "env":
--                        i = 1
--                        while '=' in linker[i]:
--                            i += 1
--                    linker[i] = self.compiler_cxx[i]
-+                    if target_desc == CCompiler.EXECUTABLE:
-+                        linker = self.linker_exe[:]
-+                    else:
-+                        linker = self.linker_so[:]
- 
-                 if sys.platform == 'darwin':
-                     linker = _osx_support.compiler_fixup(linker, ld_args)
-diff --git a/lib_pypy/_sysconfigdata.py b/lib_pypy/_sysconfigdata.py
-index 4d2b0bc..5ed9641 100644
---- a/lib_pypy/_sysconfigdata.py
-+++ b/lib_pypy/_sysconfigdata.py
-@@ -15,6 +15,7 @@ build_time_vars = {
-     'CFLAGS': "-DNDEBUG -O2",
-     'CCSHARED': "-fPIC",
-     'LDSHARED': "cc -pthread -shared",
-+    'LDCXXSHARED': "c++ -pthread -shared",
-     'EXT_SUFFIX': so_ext,
-     'SHLIB_SUFFIX': ".so",
-     'AR': "ar",

diff --git a/dev-python/pypy3/files/7.3.1-gentoo-path.patch b/dev-python/pypy3/files/7.3.1-gentoo-path.patch
deleted file mode 100644
index fba00b9fcac..00000000000
--- a/dev-python/pypy3/files/7.3.1-gentoo-path.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 6d439c6718625bb7dce32b0afdc6a3d5168a21e5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sat, 11 Apr 2020 07:01:27 +0200
-Subject: [PATCH] Support Gentoo install scheme
-
----
- lib-python/3/distutils/command/install.py | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/lib-python/3/distutils/command/install.py b/lib-python/3/distutils/command/install.py
-index 6fe62be..a4e9f0d 100644
---- a/lib-python/3/distutils/command/install.py
-+++ b/lib-python/3/distutils/command/install.py
-@@ -97,6 +97,13 @@ INSTALL_SCHEMES = {
-         'scripts': '$base/Scripts',
-         'data'   : '$base',
-         },
-+    'gentoo': {
-+        'purelib': '$base/site-packages',
-+        'platlib': '$base/site-packages',
-+        'headers': '$base/include/$dist_name',
-+        'scripts': '@EPREFIX@/usr/bin',
-+        'data'   : '@EPREFIX@/usr',
-+        },
-     }
- 
- # The keys to an installation scheme; if any new types of files are to be
-@@ -483,7 +490,10 @@ class install (Command):
-         # it's the caller's problem if they supply a bad name!
-         if (hasattr(sys, 'pypy_version_info') and
-                 not name.endswith(('_user', '_home'))):
--            if os.name == 'nt':
-+            if self.install_base.startswith(os.path.normpath('@EPREFIX@/usr/lib/pypy')):
-+                # override paths for system-wide install
-+                name = 'gentoo'
-+            elif os.name == 'nt':
-                 name = 'pypy_nt'
-             else:
-                 name = 'pypy'
--- 
-2.26.0
-

diff --git a/dev-python/pypy3/files/7.3.2-py37-distutils-cxx.patch b/dev-python/pypy3/files/7.3.2-py37-distutils-cxx.patch
deleted file mode 100644
index d126edacc6b..00000000000
--- a/dev-python/pypy3/files/7.3.2-py37-distutils-cxx.patch
+++ /dev/null
@@ -1,314 +0,0 @@
-diff --git a/lib-python/3/distutils/cygwinccompiler.py b/lib-python/3/distutils/cygwinccompiler.py
-index 6c5d777..640fa2d 100644
---- a/lib-python/3/distutils/cygwinccompiler.py
-+++ b/lib-python/3/distutils/cygwinccompiler.py
-@@ -125,8 +125,10 @@ class CygwinCCompiler(UnixCCompiler):
-         # dllwrap 2.10.90 is buggy
-         if self.ld_version >= "2.10.90":
-             self.linker_dll = "gcc"
-+            self.linker_dll_cxx = "g++"
-         else:
-             self.linker_dll = "dllwrap"
-+            self.linker_dll_cxx = "dllwrap"
- 
-         # ld_version >= "2.13" support -shared so use it instead of
-         # -mdll -static
-@@ -140,9 +142,13 @@ class CygwinCCompiler(UnixCCompiler):
-         self.set_executables(compiler='gcc -mcygwin -O -Wall',
-                              compiler_so='gcc -mcygwin -mdll -O -Wall',
-                              compiler_cxx='g++ -mcygwin -O -Wall',
-+                             compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
-                              linker_exe='gcc -mcygwin',
-                              linker_so=('%s -mcygwin %s' %
--                                        (self.linker_dll, shared_option)))
-+                                        (self.linker_dll, shared_option)),
-+                             linker_exe_cxx='g++ -mcygwin',
-+                             linker_so_cxx=('%s -mcygwin %s' %
-+                                            (self.linker_dll_cxx, shared_option)))
- 
-         # cygwin and mingw32 need different sets of libraries
-         if self.gcc_version == "2.91.57":
-@@ -166,8 +172,12 @@ class CygwinCCompiler(UnixCCompiler):
-                 raise CompileError(msg)
-         else: # for other files use the C-compiler
-             try:
--                self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
--                           extra_postargs)
-+                if self.detect_language(src) == 'c++':
-+                    self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
-+                               extra_postargs)
-+                else:
-+                    self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-+                               extra_postargs)
-             except DistutilsExecError as msg:
-                 raise CompileError(msg)
- 
-@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler):
-         self.set_executables(compiler='gcc -O -Wall',
-                              compiler_so='gcc -mdll -O -Wall',
-                              compiler_cxx='g++ -O -Wall',
-+                             compiler_so_cxx='g++ -mdll -O -Wall',
-                              linker_exe='gcc',
-                              linker_so='%s %s %s'
-                                         % (self.linker_dll, shared_option,
-+                                           entry_point),
-+                             linker_exe_cxx='g++',
-+                             linker_so_cxx='%s %s %s'
-+                                        % (self.linker_dll_cxx, shared_option,
-                                            entry_point))
-         # Maybe we should also append -mthreads, but then the finished
-         # dlls need another dll (mingwm10.dll see Mingw32 docs)
-diff --git a/lib-python/3/distutils/sysconfig_cpython.py b/lib-python/3/distutils/sysconfig_cpython.py
-index 484721f..0088dd4 100644
---- a/lib-python/3/distutils/sysconfig_cpython.py
-+++ b/lib-python/3/distutils/sysconfig_cpython.py
-@@ -188,9 +188,13 @@ def customize_compiler(compiler):
-                 _osx_support.customize_compiler(_config_vars)
-                 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
- 
--        (cc, cxx, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
--            get_config_vars('CC', 'CXX', 'CFLAGS',
--                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+        (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
-+            get_config_vars('CC', 'CXX',
-+                            'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
-+                            'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+
-+        cflags = ''
-+        cxxflags = ''
- 
-         if 'CC' in os.environ:
-             newcc = os.environ['CC']
-@@ -205,19 +209,27 @@ def customize_compiler(compiler):
-             cxx = os.environ['CXX']
-         if 'LDSHARED' in os.environ:
-             ldshared = os.environ['LDSHARED']
-+        if 'LDCXXSHARED' in os.environ:
-+            ldcxxshared = os.environ['LDCXXSHARED']
-         if 'CPP' in os.environ:
-             cpp = os.environ['CPP']
-         else:
-             cpp = cc + " -E"           # not always
-         if 'LDFLAGS' in os.environ:
-             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
-         if 'CFLAGS' in os.environ:
--            cflags = cflags + ' ' + os.environ['CFLAGS']
-+            cflags = os.environ['CFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CFLAGS']
-+        if 'CXXFLAGS' in os.environ:
-+            cxxflags = os.environ['CXXFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
-         if 'CPPFLAGS' in os.environ:
-             cpp = cpp + ' ' + os.environ['CPPFLAGS']
-             cflags = cflags + ' ' + os.environ['CPPFLAGS']
-+            cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
-         if 'AR' in os.environ:
-             ar = os.environ['AR']
-         if 'ARFLAGS' in os.environ:
-@@ -226,13 +238,17 @@ def customize_compiler(compiler):
-             archiver = ar + ' ' + ar_flags
- 
-         cc_cmd = cc + ' ' + cflags
-+        cxx_cmd = cxx + ' ' + cxxflags
-         compiler.set_executables(
-             preprocessor=cpp,
-             compiler=cc_cmd,
-             compiler_so=cc_cmd + ' ' + ccshared,
--            compiler_cxx=cxx,
-+            compiler_cxx=cxx_cmd,
-+            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
-             linker_so=ldshared,
-             linker_exe=cc,
-+            linker_so_cxx=ldcxxshared,
-+            linker_exe_cxx=cxx,
-             archiver=archiver)
- 
-         compiler.shared_lib_extension = shlib_suffix
-diff --git a/lib-python/3/distutils/sysconfig_pypy.py b/lib-python/3/distutils/sysconfig_pypy.py
-index bf1748e..70dfd72 100644
---- a/lib-python/3/distutils/sysconfig_pypy.py
-+++ b/lib-python/3/distutils/sysconfig_pypy.py
-@@ -145,36 +145,52 @@ def customize_compiler(compiler):
-                 _osx_support.customize_compiler(_config_vars)
-                 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
- 
--        (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
--            get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
--                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+        (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
-+            get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
-+                            'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+
-+        cflags = ''
-+        cxxflags = ''
- 
-         if 'CC' in os.environ:
-             newcc = os.environ['CC']
--            if (sys.platform == 'darwin'
-+            if (True
-                     and 'LDSHARED' not in os.environ
-                     and ldshared.startswith(cc)):
-                 # On OS X, if CC is overridden, use that as the default
-                 #       command for LDSHARED as well
-+                # Gentoo: s/OS X/every system/
-                 ldshared = newcc + ldshared[len(cc):]
-             cc = newcc
-         if 'CXX' in os.environ:
--            cxx = os.environ['CXX']
-+            newcxx = os.environ['CXX']
-+            if ('LDCXXSHARED' not in os.environ
-+                    and ldcxxshared.startswith(cxx)):
-+                ldcxxshared = newcxx + ldcxxshared[len(cxx):]
-+            cxx = newcxx
-         if 'LDSHARED' in os.environ:
-             ldshared = os.environ['LDSHARED']
-+        if 'LDCXXSHARED' in os.environ:
-+            ldcxxshared = os.environ['LDCXXSHARED']
-         if 'CPP' in os.environ:
-             cpp = os.environ['CPP']
-         else:
-             cpp = cc + " -E"           # not always
-         if 'LDFLAGS' in os.environ:
-             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
-         if 'CFLAGS' in os.environ:
--            cflags = opt + ' ' + os.environ['CFLAGS']
-+            cflags = os.environ['CFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CFLAGS']
-+        if 'CXXFLAGS' in os.environ:
-+            cxxflags = os.environ['CXXFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
-         if 'CPPFLAGS' in os.environ:
-             cpp = cpp + ' ' + os.environ['CPPFLAGS']
-             cflags = cflags + ' ' + os.environ['CPPFLAGS']
-+            cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
-             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
-+            ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
-         if 'AR' in os.environ:
-             ar = os.environ['AR']
-         if 'ARFLAGS' in os.environ:
-@@ -183,13 +199,17 @@ def customize_compiler(compiler):
-             archiver = ar + ' ' + ar_flags
- 
-         cc_cmd = cc + ' ' + cflags
-+        cxx_cmd = cxx + ' ' + cxxflags
-         compiler.set_executables(
-             preprocessor=cpp,
-             compiler=cc_cmd,
-             compiler_so=cc_cmd + ' ' + ccshared,
--            compiler_cxx=cxx,
-+            compiler_cxx=cxx_cmd,
-+            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
-             linker_so=ldshared,
-             linker_exe=cc,
-+            linker_so_cxx=ldcxxshared,
-+            linker_exe_cxx=cxx,
-             archiver=archiver)
- 
-         compiler.shared_lib_extension = shlib_suffix
-diff --git a/lib-python/3/distutils/unixccompiler.py b/lib-python/3/distutils/unixccompiler.py
-index 06fc718..c3773f0 100644
---- a/lib-python/3/distutils/unixccompiler.py
-+++ b/lib-python/3/distutils/unixccompiler.py
-@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler):
-     # are pretty generic; they will probably have to be set by an outsider
-     # (eg. using information discovered by the sysconfig about building
-     # Python extensions).
--    executables = {'preprocessor' : None,
--                   'compiler'     : ["cc"],
--                   'compiler_so'  : ["cc"],
--                   'compiler_cxx' : ["c++"],  # pypy: changed, 'cc' is bogus
--                   'linker_so'    : ["cc", "-shared"],
--                   'linker_exe'   : ["cc"],
--                   'archiver'     : ["ar", "-cr"],
--                   'ranlib'       : None,
-+    executables = {'preprocessor'    : None,
-+                   'compiler'        : ["cc"],
-+                   'compiler_so'     : ["cc"],
-+                   'compiler_cxx'    : ["c++"],
-+                   'compiler_so_cxx' : ["c++"],
-+                   'linker_so'       : ["cc", "-shared"],
-+                   'linker_exe'      : ["cc"],
-+                   'linker_so_cxx'   : ["c++", "-shared"],
-+                   'linker_exe_cxx'  : ["c++"],
-+                   'archiver'        : ["ar", "-cr"],
-+                   'ranlib'          : None,
-                   }
- 
-     if sys.platform[:6] == "darwin":
-@@ -125,12 +128,19 @@ class UnixCCompiler(CCompiler):
- 
-     def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
-         compiler_so = self.compiler_so
-+        compiler_so_cxx = self.compiler_so_cxx
-         if sys.platform == 'darwin':
-             compiler_so = _osx_support.compiler_fixup(compiler_so,
-                                                     cc_args + extra_postargs)
-+            compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
-+                                                    cc_args + extra_postargs)
-         try:
--            self.spawn(compiler_so + cc_args + [src, '-o', obj] +
--                       extra_postargs)
-+            if self.detect_language(src) == 'c++':
-+                self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
-+                           extra_postargs)
-+            else:
-+                self.spawn(compiler_so + cc_args + [src, '-o', obj] +
-+                           extra_postargs)
-         except DistutilsExecError as msg:
-             raise CompileError(msg)
- 
-@@ -188,30 +198,16 @@ class UnixCCompiler(CCompiler):
-                 ld_args.extend(extra_postargs)
-             self.mkpath(os.path.dirname(output_filename))
-             try:
--                if target_desc == CCompiler.EXECUTABLE:
--                    linker = self.linker_exe[:]
-+                if target_lang == "c++":
-+                    if target_desc == CCompiler.EXECUTABLE:
-+                        linker = self.linker_exe_cxx[:]
-+                    else:
-+                        linker = self.linker_so_cxx[:]
-                 else:
--                    linker = self.linker_so[:]
--                if target_lang == "c++" and self.compiler_cxx:
--                    # skip over environment variable settings if /usr/bin/env
--                    # is used to set up the linker's environment.
--                    # This is needed on OSX. Note: this assumes that the
--                    # normal and C++ compiler have the same environment
--                    # settings.
--                    i = 0
--                    if os.path.basename(linker[0]) == "env":
--                        i = 1
--                        while '=' in linker[i]:
--                            i += 1
--
--                    if os.path.basename(linker[i]) == 'ld_so_aix':
--                        # AIX platforms prefix the compiler with the ld_so_aix
--                        # script, so we need to adjust our linker index
--                        offset = 1
-+                    if target_desc == CCompiler.EXECUTABLE:
-+                        linker = self.linker_exe[:]
-                     else:
--                        offset = 0
--
--                    linker[i+offset] = self.compiler_cxx[i]
-+                        linker = self.linker_so[:]
- 
-                 if sys.platform == 'darwin':
-                     linker = _osx_support.compiler_fixup(linker, ld_args)
-diff --git a/lib_pypy/_sysconfigdata.py b/lib_pypy/_sysconfigdata.py
-index f1cca41..3ec5b4c 100644
---- a/lib_pypy/_sysconfigdata.py
-+++ b/lib_pypy/_sysconfigdata.py
-@@ -20,6 +20,7 @@ build_time_vars = {
-     'CFLAGS': "-DNDEBUG -O2",
-     'CCSHARED': "-fPIC",
-     'LDSHARED': "cc -pthread -shared",
-+    'LDCXXSHARED': "c++ -pthread -shared",
-     'EXT_SUFFIX': so_ext,
-     'SHLIB_SUFFIX': ".so",
-     'AR': "ar",

diff --git a/dev-python/pypy3/files/7.3.3_p37-sni-handle.patch b/dev-python/pypy3/files/7.3.3_p37-sni-handle.patch
deleted file mode 100644
index c4e377c3d8d..00000000000
--- a/dev-python/pypy3/files/7.3.3_p37-sni-handle.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -dupr a/lib_pypy/_cffi_ssl/_stdssl/__init__.py b/lib_pypy/_cffi_ssl/_stdssl/__init__.py
---- a/lib_pypy/_cffi_ssl/_stdssl/__init__.py	2021-02-10 00:15:40.815208732 +0100
-+++ b/lib_pypy/_cffi_ssl/_stdssl/__init__.py	2021-02-10 00:19:27.963109365 +0100
-@@ -1008,10 +1008,10 @@ for name in SSL_CTX_STATS_NAMES:
-     SSL_CTX_STATS.append((name, getattr(lib, attr)))
- 
- class _SSLContext(object):
--    __slots__ = ('ctx', '_check_hostname', 'servername_callback',
-+    __slots__ = ('ctx', '_check_hostname',
-                  'alpn_protocols', '_alpn_protocols_handle', '_protocol'
-                  'npn_protocols', 'set_hostname', '_post_handshake_auth',
--                 '_sni_cb', '_npn_protocols_handle')
-+                 '_sni_cb', '_sni_cb_handle', '_npn_protocols_handle')
-     def __new__(cls, protocol):
-         self = object.__new__(cls)
-         self.ctx = ffi.NULL
-@@ -1451,15 +1451,17 @@ class _SSLContext(object):
-                     "is not in the current OpenSSL library.")
-         if cb is None:
-             lib.SSL_CTX_set_tlsext_servername_callback(self.ctx, ffi.NULL)
--            self._sni_cb= None
-+            self._sni_cb = None
-+            lib.SSL_CTX_set_tlsext_servername_arg(self.ctx, ffi.NULL)
-+            self._sni_cb_handle = None
-             return
-         if not callable(cb):
-             lib.SSL_CTX_set_tlsext_servername_callback(self.ctx, ffi.NULL)
-             raise TypeError("not a callable object")
--        self.scb = ServernameCallback(cb, self)
--        sni_cb = ffi.new_handle(self.scb)
-+        self._sni_cb = ServernameCallback(cb, self)
-+        self._sni_cb_handle = ffi.new_handle(self._sni_cb)
-         lib.SSL_CTX_set_tlsext_servername_callback(self.ctx, _servername_callback)
--        lib.SSL_CTX_set_tlsext_servername_arg(self.ctx, sni_cb)
-+        lib.SSL_CTX_set_tlsext_servername_arg(self.ctx, self._sni_cb_handle)
- 
-     def cert_store_stats(self):
-         store = lib.SSL_CTX_get_cert_store(self.ctx)

diff --git a/dev-python/pypy3/files/python-3.5-distutils-OO-build.patch b/dev-python/pypy3/files/python-3.5-distutils-OO-build.patch
deleted file mode 100644
index ff4446662a9..00000000000
--- a/dev-python/pypy3/files/python-3.5-distutils-OO-build.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 90507018442f9adabb586fd3d0a0206b9c2f2f50 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sun, 5 Jun 2016 08:18:01 +0200
-Subject: [PATCH] distutils: make -OO enable both opt-1 and opt-2 optimization
-
-Bug: http://bugs.python.org/issue27226
-Bug: https://bugs.gentoo.org/585060
----
- distutils/command/build_py.py    |  8 ++++----
- distutils/command/install_lib.py | 12 ++++++------
- 2 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/distutils/command/build_py.py b/distutils/command/build_py.py
-index cf0ca57..838d4e4 100644
---- a/distutils/command/build_py.py
-+++ b/distutils/command/build_py.py
-@@ -315,9 +315,9 @@ class build_py (Command):
-                 if self.compile:
-                     outputs.append(importlib.util.cache_from_source(
-                         filename, optimization=''))
--                if self.optimize > 0:
-+                for opt in range(1, self.optimize + 1):
-                     outputs.append(importlib.util.cache_from_source(
--                        filename, optimization=self.optimize))
-+                        filename, optimization=opt))
- 
-         outputs += [
-             os.path.join(build_dir, filename)
-@@ -387,8 +387,8 @@ class build_py (Command):
-         if self.compile:
-             byte_compile(files, optimize=0,
-                          force=self.force, prefix=prefix, dry_run=self.dry_run)
--        if self.optimize > 0:
--            byte_compile(files, optimize=self.optimize,
-+        for opt in range(1, self.optimize + 1):
-+            byte_compile(files, optimize=opt,
-                          force=self.force, prefix=prefix, dry_run=self.dry_run)
- 
- class build_py_2to3(build_py, Mixin2to3):
-diff --git a/distutils/command/install_lib.py b/distutils/command/install_lib.py
-index 6154cf0..049b662 100644
---- a/distutils/command/install_lib.py
-+++ b/distutils/command/install_lib.py
-@@ -24,8 +24,8 @@ class install_lib(Command):
-     #   2) compile .pyc only (--compile --no-optimize; default)
-     #   3) compile .pyc and "opt-1" .pyc (--compile --optimize)
-     #   4) compile "opt-1" .pyc only (--no-compile --optimize)
--    #   5) compile .pyc and "opt-2" .pyc (--compile --optimize-more)
--    #   6) compile "opt-2" .pyc only (--no-compile --optimize-more)
-+    #   5) compile .pyc, "opt-1" and "opt-2" .pyc (--compile --optimize-more)
-+    #   6) compile "opt-1" and "opt-2" .pyc (--no-compile --optimize-more)
-     #
-     # The UI for this is two options, 'compile' and 'optimize'.
-     # 'compile' is strictly boolean, and only decides whether to
-@@ -132,8 +132,8 @@ class install_lib(Command):
-             byte_compile(files, optimize=0,
-                          force=self.force, prefix=install_root,
-                          dry_run=self.dry_run)
--        if self.optimize > 0:
--            byte_compile(files, optimize=self.optimize,
-+        for opt in range(1, self.optimize + 1):
-+            byte_compile(files, optimize=opt,
-                          force=self.force, prefix=install_root,
-                          verbose=self.verbose, dry_run=self.dry_run)
- 
-@@ -167,9 +167,9 @@ class install_lib(Command):
-             if self.compile:
-                 bytecode_files.append(importlib.util.cache_from_source(
-                     py_file, optimization=''))
--            if self.optimize > 0:
-+            for opt in range(1, self.optimize + 1):
-                 bytecode_files.append(importlib.util.cache_from_source(
--                    py_file, optimization=self.optimize))
-+                    py_file, optimization=opt))
- 
-         return bytecode_files
- 
--- 
-2.8.3
-

diff --git a/dev-python/pypy3/pypy3-7.3.3.ebuild b/dev-python/pypy3/pypy3-7.3.3.ebuild
deleted file mode 100644
index 1de8b40bb88..00000000000
--- a/dev-python/pypy3/pypy3-7.3.3.ebuild
+++ /dev/null
@@ -1,207 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 )
-inherit pax-utils python-any-r1 toolchain-funcs
-
-MY_P=pypy3.6-v${PV/_/}
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (3.6) language"
-HOMEPAGE="https://www.pypy.org/"
-SRC_URI="https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2"
-S="${WORKDIR}/${MY_P}-src"
-
-LICENSE="MIT"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-SLOT="0/pypy36-pp73"
-KEYWORDS="amd64 ~arm64 ~ppc64 x86 ~amd64-linux ~x86-linux"
-IUSE="bzip2 gdbm +jit libressl ncurses sqlite test tk"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	|| (
-		dev-python/pypy3-exe:${PV}[bzip2?,ncurses?]
-		dev-python/pypy3-exe-bin:${PV}
-	)
-	!libressl? ( dev-libs/openssl:0= )
-	libressl? ( dev-libs/libressl:0= )
-	gdbm? ( sys-libs/gdbm:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!<dev-python/pypy3-bin-7.3.0:0"
-DEPEND="${RDEPEND}
-	test? (
-		${PYTHON_DEPS}
-		!!dev-python/pytest-forked
-	)"
-
-pkg_setup() {
-	use test && python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	eapply "${FILESDIR}/7.3.1-gentoo-path.patch"
-	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
-	eapply "${FILESDIR}"/7.2.0-distutils-cxx.patch
-
-	sed -e "s^@EPREFIX@^${EPREFIX}^" \
-		-i lib-python/3/distutils/command/install.py || die
-
-	# apply CPython stdlib patches
-	pushd lib-python/3 > /dev/null || die
-	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
-	popd > /dev/null || die
-
-	# see http://buildbot.pypy.org/summary?branch=py3.6&builder=pypy-c-jit-linux-x86-64
-	sed -i -e 's:test_jumpy:_&:' \
-		lib-python/3/test/test_dis.py || die
-	sed -i -e 's:test_get_and_set_scheduler_and_param:_&:' \
-		lib-python/3/test/test_posix.py || die
-	sed -i -e 's:test_auto_history:_&:' \
-		-e 's:test_history_size:_&:' \
-		lib-python/3/test/test_readline.py || die
-	sed -i -e 's:test_eval_bytes_invalid_escape:_&:' \
-		-e 's:test_eval_str_invalid_escape:_&:' \
-		lib-python/3/test/test_string_literals.py || die
-	sed -i -e 's:test_jump_out_of_async_for_block:_&:' \
-		-e 's:test_jump_over_async_for_block_before_else:_&:' \
-		-e 's:test_no_jump_.*wards_into_async_for_block:_&:' \
-		-e 's:test_no_jump_into_async_for_block_before_else:_&:' \
-		-e 's:test_no_jump_from_yield:_&:' \
-		lib-python/3/test/test_sys_settrace.py || die
-	sed -i -e 's:test_circular_imports:_&:' \
-		lib-python/3/test/test_threaded_import.py || die
-
-	# the first one's broken by sandbox, the second by our env
-	sed -i -e 's:test_empty_env:_&:' \
-		-e 's:test_executable(:_&:' \
-		-e 's:test_executable_without_cwd:_&:' \
-		lib-python/3/test/test_subprocess.py || die
-
-	# XXX
-	sed -i -e 's:test_locale:_&:' \
-		lib-python/3/test/test_format.py || die
-	sed -i -e 's:test_decompressor_bug_28275:_&:' \
-		lib-python/3/test/test_lzma.py || die
-
-	eapply_user
-}
-
-src_configure() {
-	tc-export CC
-}
-
-src_compile() {
-	# copy over to make sys.prefix happy
-	cp -p "${BROOT}"/usr/lib/pypy3.6/pypy3-c-${PV} pypy3-c || die
-	cp -p "${BROOT}"/usr/lib/pypy3.6/include/${PV}/* 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 pypy3-c
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy3-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 = {
-#    "_blake2": "_blake2/_blake2_build.py",
-#    "_ssl": "_ssl_build.py",
-#    "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,
-#    "lzma": "_lzma_build.py",
-#    "_decimal": "_decimal_build.py",
-#    "_sha3": "_sha3/_sha3_build.py",
-	cffi_targets=( blake2/_blake2 sha3/_sha3 ssl
-		audioop syslog pwdgrp resource lzma decimal )
-	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
-		../pypy3-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 -x COLUMNS=80
-
-	# Test runner requires Python 2 too. However, it spawns PyPy3
-	# internally so that we end up testing the correct interpreter.
-	"${EPYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python || die
-}
-
-src_install() {
-	local dest=/usr/lib/pypy3.6
-	einfo "Installing PyPy ..."
-	dosym pypy3-c-${PV} "${dest}/pypy3-c"
-	insinto "${dest}"
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r include lib_pypy lib-python
-
-	# replace copied headers with symlinks
-	for x in "${BROOT}"/usr/lib/pypy3.6/include/${PV}/*; do
-		dosym "${PV}/${x##*/}" "${dest}/include/${x##*/}"
-	done
-
-	dosym ../lib/pypy3.6/pypy3-c /usr/bin/pypy3
-	dodoc README.rst
-
-	if ! use gdbm; then
-		rm -r "${ED}${dest}"/lib_pypy/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED}${dest}"/lib-python/*3/sqlite3 \
-			"${ED}${dest}"/lib_pypy/_sqlite3* \
-			"${ED}${dest}"/lib-python/*3/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED}${dest}"/lib-python/*3/{idlelib,tkinter} \
-			"${ED}${dest}"/lib_pypy/_tkinter \
-			"${ED}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
-	fi
-
-	local -x EPYTHON=pypy3
-	local -x PYTHON=${ED}${dest}/pypy3-c-${PV}
-	# temporarily copy to build tree to facilitate module builds
-	cp -p "${BROOT}${dest}/pypy3-c-${PV}" "${PYTHON}" || die
-
-	echo "EPYTHON='${EPYTHON}'" > epython.py || die
-	python_moduleinto /usr/lib/pypy3.6/site-packages
-	python_domodule epython.py
-
-	einfo "Byte-compiling Python standard library..."
-	python_optimize "${ED}${dest}"
-
-	# remove to avoid collisions
-	rm "${PYTHON}" || die
-}

diff --git a/dev-python/pypy3/pypy3-7.3.3_p37-r1.ebuild b/dev-python/pypy3/pypy3-7.3.3_p37-r1.ebuild
deleted file mode 100644
index 235d4e09f2d..00000000000
--- a/dev-python/pypy3/pypy3-7.3.3_p37-r1.ebuild
+++ /dev/null
@@ -1,180 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 )
-inherit pax-utils python-any-r1 toolchain-funcs
-
-PYPY_PV=${PV%_p37}
-MY_P=pypy3.7-v${PYPY_PV/_/}
-
-DESCRIPTION="A fast, compliant alternative implementation of the Python (3.7) language"
-HOMEPAGE="https://www.pypy.org/"
-SRC_URI="https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2"
-S="${WORKDIR}/${MY_P}-src"
-
-LICENSE="MIT"
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
-SLOT="0/pypy37-pp73"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="bzip2 gdbm +jit libressl ncurses sqlite test tk"
-# pypy3.7 is in alpha state and a lot of tests are failing
-RESTRICT="test"
-
-RDEPEND="
-	|| (
-		dev-python/pypy3-exe:${PV}[bzip2?,ncurses?]
-		dev-python/pypy3-exe-bin:${PV}
-	)
-	!libressl? ( dev-libs/openssl:0= )
-	libressl? ( dev-libs/libressl:0= )
-	gdbm? ( sys-libs/gdbm:0= )
-	sqlite? ( dev-db/sqlite:3= )
-	tk? (
-		dev-lang/tk:0=
-		dev-tcltk/tix:0=
-	)
-	!<dev-python/pypy3-bin-7.3.0:0"
-DEPEND="${RDEPEND}
-	test? (
-		${PYTHON_DEPS}
-		!!dev-python/pytest-forked
-	)"
-
-pkg_setup() {
-	use test && python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	eapply "${FILESDIR}/7.3.1-gentoo-path.patch"
-	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
-	eapply "${FILESDIR}/7.3.2-py37-distutils-cxx.patch"
-	# https://foss.heptapod.net/pypy/pypy/-/issues/3396
-	eapply "${FILESDIR}/7.3.3_p37-sni-handle.patch"
-
-	sed -e "s^@EPREFIX@^${EPREFIX}^" \
-		-i lib-python/3/distutils/command/install.py || die
-
-	# apply CPython stdlib patches
-	pushd lib-python/3 > /dev/null || die
-	eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
-	popd > /dev/null || die
-
-	eapply_user
-}
-
-src_configure() {
-	tc-export CC
-}
-
-src_compile() {
-	# copy over to make sys.prefix happy
-	cp -p "${BROOT}"/usr/lib/pypy3.7/pypy3-c-${PYPY_PV} pypy3-c || die
-	cp -p "${BROOT}"/usr/lib/pypy3.7/include/${PYPY_PV}/* 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 pypy3-c
-
-	einfo "Generating caches and CFFI modules ..."
-
-	# Generate Grammar and PatternGrammar pickles.
-	./pypy3-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 = {
-#    "_blake2": "_blake2/_blake2_build.py",
-#    "_ssl": "_ssl_build.py",
-#    "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,
-#    "lzma": "_lzma_build.py",
-#    "_decimal": "_decimal_build.py",
-#    "_sha3": "_sha3/_sha3_build.py",
-	cffi_targets=( blake2/_blake2 sha3/_sha3 ssl
-		audioop syslog pwdgrp resource lzma decimal )
-	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
-		../pypy3-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 -x COLUMNS=80
-
-	# Test runner requires Python 2 too. However, it spawns PyPy3
-	# internally so that we end up testing the correct interpreter.
-	# (--deselect for failing doctests)
-	"${EPYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python || die
-}
-
-src_install() {
-	local dest=/usr/lib/pypy3.7
-	einfo "Installing PyPy ..."
-	dosym pypy3-c-${PYPY_PV} "${dest}/pypy3-c"
-	insinto "${dest}"
-	# preserve mtimes to avoid obsoleting caches
-	insopts -p
-	doins -r include lib_pypy lib-python
-
-	# replace copied headers with symlinks
-	for x in "${BROOT}"/usr/lib/pypy3.7/include/${PYPY_PV}/*; do
-		dosym "${PYPY_PV}/${x##*/}" "${dest}/include/${x##*/}"
-	done
-
-	dosym ../lib/pypy3.7/pypy3-c /usr/bin/pypy3
-	dodoc README.rst
-
-	if ! use gdbm; then
-		rm -r "${ED}${dest}"/lib_pypy/_gdbm* || die
-	fi
-	if ! use sqlite; then
-		rm -r "${ED}${dest}"/lib-python/*3/sqlite3 \
-			"${ED}${dest}"/lib_pypy/_sqlite3* \
-			"${ED}${dest}"/lib-python/*3/test/test_sqlite.py || die
-	fi
-	if ! use tk; then
-		rm -r "${ED}${dest}"/lib-python/*3/{idlelib,tkinter} \
-			"${ED}${dest}"/lib_pypy/_tkinter \
-			"${ED}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
-	fi
-
-	local -x EPYTHON=pypy3
-	local -x PYTHON=${ED}${dest}/pypy3-c-${PYPY_PV}
-	# temporarily copy to build tree to facilitate module builds
-	cp -p "${BROOT}${dest}/pypy3-c-${PYPY_PV}" "${PYTHON}" || die
-
-	echo "EPYTHON='${EPYTHON}'" > epython.py || die
-	python_moduleinto /usr/lib/pypy3.7/site-packages
-	python_domodule epython.py
-
-	einfo "Byte-compiling Python standard library..."
-	python_optimize "${ED}${dest}"
-
-	# remove to avoid collisions
-	rm "${PYTHON}" || die
-}


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

end of thread, other threads:[~2021-03-05 21:06 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-14 22:07 [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2021-03-05 21:06 Michał Górny
2021-02-09 23:38 Michał Górny
2020-09-17 16:56 Michał Górny
2020-09-11 21:05 Michał Górny
2019-05-24 14:21 Michał Górny
2019-02-16 15:08 Michał Górny
2018-01-05 23:19 Michał Górny
2017-10-15  9:38 Michał Górny
2017-10-09 18:58 Michał Górny
2017-04-25 21:49 Michał Górny
2017-04-25 21:49 Michał Górny
2016-05-05  9:14 Patrice Clement
2016-03-03 10:47 Michał Górny
2016-02-06 22:45 Michał Górny
2015-12-20 21:13 Michał Górny
2015-08-18 16:34 Justin Lecher

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