From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id F399315808B for ; Sat, 19 Mar 2022 00:06:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 160BBE07B2; Sat, 19 Mar 2022 00:06:09 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4768AE07B2 for ; Sat, 19 Mar 2022 00:06:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 252F33432B7 for ; Sat, 19 Mar 2022 00:06:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 95020320 for ; Sat, 19 Mar 2022 00:06:05 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1647648346.d5d4b491db81d7cfc47093f66dfbd097fc4a2dc2.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/python/python-3.10.3.ebuild dev-lang/python/python-3.11.0_alpha6.ebuild dev-lang/python/python-3.9.11.ebuild X-VCS-Directories: dev-lang/python/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: d5d4b491db81d7cfc47093f66dfbd097fc4a2dc2 X-VCS-Branch: master Date: Sat, 19 Mar 2022 00:06:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2401f7fb-ace7-4487-bfee-3862163a9ad2 X-Archives-Hash: 52fb1ad6bdde46a5dc0379fca68c5365 commit: d5d4b491db81d7cfc47093f66dfbd097fc4a2dc2 Author: Sam James gentoo org> AuthorDate: Fri Mar 18 19:31:21 2022 +0000 Commit: Sam James gentoo org> CommitDate: Sat Mar 19 00:05:46 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5d4b491 dev-lang/python: save/restore PYTHONDONTWRITEBYTECODE for USE=pgo This avoids writing bytecode when we call has_version (or make any other calls). But we do need it on for the 'emake' call when building w/ USE=pgo. Save & restore the value from the environment before/after emake if building with PGO. Closes: https://bugs.gentoo.org/831897 Signed-off-by: Sam James gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/24642 Signed-off-by: Sam James gentoo.org> dev-lang/python/python-3.10.3.ebuild | 8 ++++++++ dev-lang/python/python-3.11.0_alpha6.ebuild | 8 ++++++++ dev-lang/python/python-3.9.11.ebuild | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/dev-lang/python/python-3.10.3.ebuild b/dev-lang/python/python-3.10.3.ebuild index 478b5c1af9db..8378f90040c5 100644 --- a/dev-lang/python/python-3.10.3.ebuild +++ b/dev-lang/python/python-3.10.3.ebuild @@ -236,6 +236,11 @@ src_compile() { # https://bugs.gentoo.org/823728 export SETUPTOOLS_USE_DISTUTILS=stdlib + # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't + # end up writing bytecode & violating sandbox. + # bug #831897 + local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} + if use pgo ; then # bug 660358 local -x COLUMNS=80 @@ -248,6 +253,9 @@ src_compile() { # in _sysconfigdata* emake CPPFLAGS= CFLAGS= LDFLAGS= + # Restore saved value from above. + local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} + # Work around bug 329499. See also bug 413751 and 457194. if has_version dev-libs/libffi[pax-kernel]; then pax-mark E python diff --git a/dev-lang/python/python-3.11.0_alpha6.ebuild b/dev-lang/python/python-3.11.0_alpha6.ebuild index ffe6244b6927..ee3604d253a3 100644 --- a/dev-lang/python/python-3.11.0_alpha6.ebuild +++ b/dev-lang/python/python-3.11.0_alpha6.ebuild @@ -226,6 +226,11 @@ src_compile() { export SETUPTOOLS_USE_DISTUTILS=stdlib export PYTHONSTRICTEXTENSIONBUILD=1 + # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't + # end up writing bytecode & violating sandbox. + # bug #831897 + local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} + if use pgo ; then # bug 660358 local -x COLUMNS=80 @@ -238,6 +243,9 @@ src_compile() { # in _sysconfigdata* emake CPPFLAGS= CFLAGS= LDFLAGS= + # Restore saved value from above. + local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} + # Work around bug 329499. See also bug 413751 and 457194. if has_version dev-libs/libffi[pax-kernel]; then pax-mark E python diff --git a/dev-lang/python/python-3.9.11.ebuild b/dev-lang/python/python-3.9.11.ebuild index a71a3caa791d..418a21b762a8 100644 --- a/dev-lang/python/python-3.9.11.ebuild +++ b/dev-lang/python/python-3.9.11.ebuild @@ -221,6 +221,11 @@ src_compile() { # https://bugs.gentoo.org/823728 export SETUPTOOLS_USE_DISTUTILS=stdlib + # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't + # end up writing bytecode & violating sandbox. + # bug #831897 + local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} + if use pgo ; then # bug 660358 local -x COLUMNS=80 @@ -233,6 +238,9 @@ src_compile() { # in _sysconfigdata* emake CPPFLAGS= CFLAGS= LDFLAGS= + # Restore saved value from above. + local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} + # Work around bug 329499. See also bug 413751 and 457194. if has_version dev-libs/libffi[pax-kernel]; then pax-mark E python