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 B1569158020 for ; Wed, 23 Nov 2022 06:53:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DC9EDE0996; Wed, 23 Nov 2022 06:53:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 C55A0E0996 for ; Wed, 23 Nov 2022 06:53:48 +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 B3C21341084 for ; Wed, 23 Nov 2022 06:53:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E30CF731 for ; Wed, 23 Nov 2022 06:53:45 +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: <1669186422.3b7ae26f65794fed2d6b90b85d6a81a96b326702.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/python/metadata.xml dev-lang/python/python-2.7.18_p16.ebuild dev-lang/python/python-3.10.8_p3.ebuild dev-lang/python/python-3.11.0_p2.ebuild dev-lang/python/python-3.12.0_alpha2.ebuild dev-lang/python/python-3.8.15_p3.ebuild dev-lang/python/python-3.9.15_p3.ebuild X-VCS-Directories: dev-lang/python/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 3b7ae26f65794fed2d6b90b85d6a81a96b326702 X-VCS-Branch: master Date: Wed, 23 Nov 2022 06:53:45 +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: 0368061f-b126-4e78-b291-a8177fd3bd34 X-Archives-Hash: 7ef4afed594c1c420cc932ff88a7bc00 commit: 3b7ae26f65794fed2d6b90b85d6a81a96b326702 Author: Jonas Jelten sft lol> AuthorDate: Tue Nov 22 19:11:50 2022 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed Nov 23 06:53:42 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b7ae26f dev-lang/python: add valgrind support When the valgrind useflag is enabled, Python performs a runtime check if it is run in the Valgrind VM, and adjusts its memory allocator to not use pymalloc. Valgrind then does a much better job in tracking the memory reachability. Closes: https://bugs.gentoo.org/610816 Signed-off-by: Jonas Jelten sft.lol> Closes: https://github.com/gentoo/gentoo/pull/11012 Signed-off-by: Michał Górny gentoo.org> dev-lang/python/metadata.xml | 5 +++++ dev-lang/python/python-2.7.18_p16.ebuild | 6 +++++- dev-lang/python/python-3.10.8_p3.ebuild | 4 +++- dev-lang/python/python-3.11.0_p2.ebuild | 4 +++- dev-lang/python/python-3.12.0_alpha2.ebuild | 4 +++- dev-lang/python/python-3.8.15_p3.ebuild | 5 ++++- dev-lang/python/python-3.9.15_p3.ebuild | 4 +++- 7 files changed, 26 insertions(+), 6 deletions(-) diff --git a/dev-lang/python/metadata.xml b/dev-lang/python/metadata.xml index c123a9ef4e61..648562ff2106 100644 --- a/dev-lang/python/metadata.xml +++ b/dev-lang/python/metadata.xml @@ -24,6 +24,11 @@ Optimize the build using Link Time Optimization (LTO) + + Disable pymalloc when running under + dev-util/valgrind is detected (may incur minor + performance penalty even when valgrind is not used) + Install Windows executables required to create an executable installer for MS Windows diff --git a/dev-lang/python/python-2.7.18_p16.ebuild b/dev-lang/python/python-2.7.18_p16.ebuild index 051f660f8f9b..ee49cd0dfcda 100644 --- a/dev-lang/python/python-2.7.18_p16.ebuild +++ b/dev-lang/python/python-2.7.18_p16.ebuild @@ -30,8 +30,9 @@ SLOT="${PYVER}" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE=" berkdb bluetooth build examples gdbm hardened +ncurses +readline - +sqlite +ssl tk wininst +xml + +sqlite +ssl tk valgrind wininst +xml " +RESTRICT="test" # Do not add a dependency on dev-lang/python to this ebuild. # If you need to apply a patch which requires python for bootstrapping, please @@ -65,6 +66,7 @@ RDEPEND=" DEPEND=" ${RDEPEND} bluetooth? ( net-wireless/bluez ) + valgrind? ( dev-util/valgrind ) " BDEPEND=" virtual/awk @@ -196,6 +198,8 @@ src_configure() { --without-ensurepip --with-system-expat --with-system-ffi + + $(use_with valgrind) ) # disable implicit optimization/debugging flags diff --git a/dev-lang/python/python-3.10.8_p3.ebuild b/dev-lang/python/python-3.10.8_p3.ebuild index f7df03edfe54..ca2055bc531c 100644 --- a/dev-lang/python/python-3.10.8_p3.ebuild +++ b/dev-lang/python/python-3.10.8_p3.ebuild @@ -31,7 +31,7 @@ SLOT="${PYVER}" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE=" bluetooth build +ensurepip examples gdbm hardened libedit lto - +ncurses pgo +readline +sqlite +ssl test tk +xml + +ncurses pgo +readline +sqlite +ssl test tk valgrind +xml " RESTRICT="!test? ( test )" @@ -71,6 +71,7 @@ RDEPEND=" DEPEND=" ${RDEPEND} bluetooth? ( net-wireless/bluez ) + valgrind? ( dev-util/valgrind ) test? ( app-arch/xz-utils[extra-filters(+)] ) " # autoconf-archive needed to eautoreconf @@ -222,6 +223,7 @@ src_configure() { $(use_with lto) $(use_enable pgo optimizations) $(use_with readline readline "$(usex libedit editline readline)") + $(use_with valgrind) ) # disable implicit optimization/debugging flags diff --git a/dev-lang/python/python-3.11.0_p2.ebuild b/dev-lang/python/python-3.11.0_p2.ebuild index 34cae611b846..eedf9c768a85 100644 --- a/dev-lang/python/python-3.11.0_p2.ebuild +++ b/dev-lang/python/python-3.11.0_p2.ebuild @@ -31,7 +31,7 @@ SLOT="${PYVER}" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE=" bluetooth build +ensurepip examples gdbm hardened libedit lto - +ncurses pgo +readline +sqlite +ssl test tk + +ncurses pgo +readline +sqlite +ssl test tk valgrind " RESTRICT="!test? ( test )" @@ -72,6 +72,7 @@ DEPEND=" ${RDEPEND} bluetooth? ( net-wireless/bluez ) test? ( app-arch/xz-utils[extra-filters(+)] ) + valgrind? ( dev-util/valgrind ) " # autoconf-archive needed to eautoreconf BDEPEND=" @@ -211,6 +212,7 @@ src_configure() { $(use_with lto) $(use_enable pgo optimizations) $(use_with readline readline "$(usex libedit editline readline)") + $(use_with valgrind) ) # disable implicit optimization/debugging flags diff --git a/dev-lang/python/python-3.12.0_alpha2.ebuild b/dev-lang/python/python-3.12.0_alpha2.ebuild index e10b1c493b27..9d0d10adab0b 100644 --- a/dev-lang/python/python-3.12.0_alpha2.ebuild +++ b/dev-lang/python/python-3.12.0_alpha2.ebuild @@ -31,7 +31,7 @@ SLOT="${PYVER}" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" IUSE=" bluetooth build +ensurepip examples gdbm hardened libedit lto - +ncurses pgo +readline +sqlite +ssl test tk + +ncurses pgo +readline +sqlite +ssl test tk valgrind " RESTRICT="!test? ( test )" @@ -72,6 +72,7 @@ DEPEND=" ${RDEPEND} bluetooth? ( net-wireless/bluez ) test? ( app-arch/xz-utils[extra-filters(+)] ) + valgrind? ( dev-util/valgrind ) " # autoconf-archive needed to eautoreconf BDEPEND=" @@ -207,6 +208,7 @@ src_configure() { $(use_with lto) $(use_enable pgo optimizations) $(use_with readline readline "$(usex libedit editline readline)") + $(use_with valgrind) ) # disable implicit optimization/debugging flags diff --git a/dev-lang/python/python-3.8.15_p3.ebuild b/dev-lang/python/python-3.8.15_p3.ebuild index d2a1816f893b..1c522eb3b332 100644 --- a/dev-lang/python/python-3.8.15_p3.ebuild +++ b/dev-lang/python/python-3.8.15_p3.ebuild @@ -31,7 +31,7 @@ SLOT="${PYVER}" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE=" bluetooth build +ensurepip examples gdbm hardened lto +ncurses pgo - +readline +sqlite +ssl test tk wininst +xml + +readline +sqlite +ssl test tk valgrind wininst +xml " RESTRICT="!test? ( test )" @@ -68,6 +68,7 @@ DEPEND=" ${RDEPEND} bluetooth? ( net-wireless/bluez ) test? ( app-arch/xz-utils[extra-filters(+)] ) + valgrind? ( dev-util/valgrind ) " # autoconf-archive needed to eautoreconf BDEPEND=" @@ -175,6 +176,8 @@ src_configure() { --with-system-expat --with-system-ffi --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip + + $(use_with valgrind) ) # disable implicit optimization/debugging flags diff --git a/dev-lang/python/python-3.9.15_p3.ebuild b/dev-lang/python/python-3.9.15_p3.ebuild index 7b5a4be382ea..65e32a706fd5 100644 --- a/dev-lang/python/python-3.9.15_p3.ebuild +++ b/dev-lang/python/python-3.9.15_p3.ebuild @@ -31,7 +31,7 @@ SLOT="${PYVER}" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE=" bluetooth build +ensurepip examples gdbm hardened lto +ncurses pgo - +readline +sqlite +ssl test tk +xml + +readline +sqlite +ssl test tk valgrind +xml " RESTRICT="!test? ( test )" @@ -68,6 +68,7 @@ DEPEND=" ${RDEPEND} bluetooth? ( net-wireless/bluez ) test? ( app-arch/xz-utils[extra-filters(+)] ) + valgrind? ( dev-util/valgrind ) " # autoconf-archive needed to eautoreconf BDEPEND=" @@ -216,6 +217,7 @@ src_configure() { $(use_with lto) $(use_enable pgo optimizations) + $(use_with valgrind) ) # disable implicit optimization/debugging flags