From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A6EAD139694 for ; Sun, 30 Apr 2017 19:22:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 32550E0E1A; Sun, 30 Apr 2017 19:22:10 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F20C7E0CF3 for ; Sun, 30 Apr 2017 19:22:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 738C333BE32 for ; Sun, 30 Apr 2017 19:22:08 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D39AB2494 for ; Sun, 30 Apr 2017 19:22:06 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1493580124.aaa4898d90218cac82b60a5a33df716e06a3976b.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/, dev-python/pypy3/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pypy3/files/python-3.5-distutils-OO-build.patch dev-python/pypy3/pypy3-5.7.1-r1.ebuild dev-python/pypy3/pypy3-5.7.1.ebuild X-VCS-Directories: dev-python/pypy3/ dev-python/pypy3/files/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: aaa4898d90218cac82b60a5a33df716e06a3976b X-VCS-Branch: master Date: Sun, 30 Apr 2017 19:22:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: cd5f70bc-ac21-4fae-bfa0-0c1170e537ce X-Archives-Hash: d46038f6413072ae16349200f214628a commit: aaa4898d90218cac82b60a5a33df716e06a3976b Author: Michał Górny gentoo org> AuthorDate: Sun Apr 30 16:21:43 2017 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Apr 30 19:22:04 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aaa4898d dev-python/pypy3: Port -OO builds patch from python3.5 .../files/python-3.5-distutils-OO-build.patch | 80 ++++++++++++++++++++++ .../{pypy3-5.7.1.ebuild => pypy3-5.7.1-r1.ebuild} | 1 + 2 files changed, 81 insertions(+) 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 new file mode 100644 index 00000000000..ff4446662a9 --- /dev/null +++ b/dev-python/pypy3/files/python-3.5-distutils-OO-build.patch @@ -0,0 +1,80 @@ +From 90507018442f9adabb586fd3d0a0206b9c2f2f50 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +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-5.7.1.ebuild b/dev-python/pypy3/pypy3-5.7.1-r1.ebuild similarity index 99% rename from dev-python/pypy3/pypy3-5.7.1.ebuild rename to dev-python/pypy3/pypy3-5.7.1-r1.ebuild index 9a1165e12a1..7633d4b3dcc 100644 --- a/dev-python/pypy3/pypy3-5.7.1.ebuild +++ b/dev-python/pypy3/pypy3-5.7.1-r1.ebuild @@ -88,6 +88,7 @@ src_prepare() { # 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