From patchwork Tue Aug 8 18:50:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1818861 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RL2NK08Djz1yfM for ; Wed, 9 Aug 2023 04:51:45 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 1E15182072; Tue, 8 Aug 2023 18:51:43 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 1E15182072 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F8SBz0wd9OFI; Tue, 8 Aug 2023 18:51:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 6A5F5820EE; Tue, 8 Aug 2023 18:51:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 6A5F5820EE X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 00ADB1BF330 for ; Tue, 8 Aug 2023 18:51:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id CF00C8204E for ; Tue, 8 Aug 2023 18:51:38 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org CF00C8204E X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qURCuZyLW4HE for ; Tue, 8 Aug 2023 18:51:38 +0000 (UTC) Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp1.osuosl.org (Postfix) with ESMTPS id 141768204C for ; Tue, 8 Aug 2023 18:51:36 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 141768204C Received: from fli4l.lan.fli4l (p4fd6c649.dip0.t-ipconnect.de [79.214.198.73]) by dd20012.kasserver.com (Postfix) with ESMTPSA id 0AF59A4C0F6B; Tue, 8 Aug 2023 20:51:09 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:48850) by fli4l.lan.fli4l with esmtp (Exim 4.96) (envelope-from ) id 1qTRnQ-0005AS-1N; Tue, 08 Aug 2023 20:51:08 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 8 Aug 2023 20:50:53 +0200 Message-Id: <20230808185108.3787835-2-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808185108.3787835-1-bernd@kuhls.net> References: <20230808185108.3787835-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: ++++ X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202306131828; t=1691520669; bh=YpeMm5kTNYhqcWV8Tcy8qhROaw/96PfnsSRBkf5cHR0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h4OjJpjkK8loOgXPR4LV3X3v4DxMDBKXnHCoeOMy1vOFbM9aQnUNITysvAUu51Rgz Ij51+DEdQgRnW71djNKZT74v77ji3q3ibpTcStkiLTq5A7UlcMYtttfkln4urrOLYk 1UzrhPaKMV8ioxJMx5DQnmCyBj6nLhaoff3Gf7xYA6U8zSD9m/GwgbmYZirx91SELq 8NI+Enxun5DdkDq4ISxj5BCnAFjTeUeObTNjaVbrnI9SeDuY5PBXBuNSbAWjqCq6x6 kzg7/fIKxj0jD3PVyg/8EX2w9rIYU4z/1uuf2uAmjOoYFDLyMjoV5j7LWHLYeJlQOt 9clXdr/OHfVqQ== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202306131828 header.b=h4OjJpjk Subject: [Buildroot] [PATCH/next 01/16] package/berkeleydb: add option for historic dbm interface X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Berkeley DB support in python depends on dbm, when missing python fails to detect libdb: https://github.com/python/cpython/blob/d2340ef25721b6a72d45d4508c672c4be38c67d3/configure.ac#L4002 quoting python configure log: checking for libdb... no quoting python config.log: conftest.c:(.text.startup+0x8): undefined reference to `__db_ndbm_open' This patch provides a configure option for the historic dbm interface to be used by the python package. Signed-off-by: Bernd Kuhls --- package/berkeleydb/Config.in | 5 +++++ package/berkeleydb/berkeleydb.mk | 1 + 2 files changed, 6 insertions(+) diff --git a/package/berkeleydb/Config.in b/package/berkeleydb/Config.in index f32d13ab17..f8fbb5cc09 100644 --- a/package/berkeleydb/Config.in +++ b/package/berkeleydb/Config.in @@ -13,6 +13,11 @@ config BR2_PACKAGE_BERKELEYDB_COMPAT185 help Build and install DB 1.85 compatibility API. +config BR2_PACKAGE_BERKELEYDB_DBM + bool "historic dbm interface" + help + Enable the historic dbm interface. + config BR2_PACKAGE_BERKELEYDB_TOOLS bool "install tools" help diff --git a/package/berkeleydb/berkeleydb.mk b/package/berkeleydb/berkeleydb.mk index 36b1894f34..1c121370db 100644 --- a/package/berkeleydb/berkeleydb.mk +++ b/package/berkeleydb/berkeleydb.mk @@ -39,6 +39,7 @@ define BERKELEYDB_CONFIGURE_CMDS --disable-java \ --disable-tcl \ $(if $(BR2_PACKAGE_BERKELEYDB_COMPAT185),--enable-compat185,--disable-compat185) \ + $(if $(BR2_PACKAGE_BERKELEYDB_DBM),--enable-dbm,--disable-dbm) \ $(SHARED_STATIC_LIBS_OPTS) \ --with-pic \ --enable-o_direct \ From patchwork Tue Aug 8 18:50:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1818863 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RL2Nn5RRGz1yfM for ; Wed, 9 Aug 2023 04:52:09 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id F152B8210B; Tue, 8 Aug 2023 18:52:07 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org F152B8210B X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ndOCOC8UVTXo; Tue, 8 Aug 2023 18:52:07 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 3FD3E820F8; Tue, 8 Aug 2023 18:52:06 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 3FD3E820F8 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id AC8FC1BF330 for ; Tue, 8 Aug 2023 18:52:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7998582055 for ; Tue, 8 Aug 2023 18:52:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7998582055 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x8ZwmX5EBDQm for ; Tue, 8 Aug 2023 18:52:01 +0000 (UTC) Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp1.osuosl.org (Postfix) with ESMTPS id 718978208A for ; Tue, 8 Aug 2023 18:52:01 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 718978208A Received: from fli4l.lan.fli4l (p4fd6c649.dip0.t-ipconnect.de [79.214.198.73]) by dd20012.kasserver.com (Postfix) with ESMTPSA id 2FE6EA4C10ED; Tue, 8 Aug 2023 20:51:09 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:48850) by fli4l.lan.fli4l with esmtp (Exim 4.96) (envelope-from ) id 1qTRnQ-0005AS-1Y; Tue, 08 Aug 2023 20:51:08 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 8 Aug 2023 20:50:54 +0200 Message-Id: <20230808185108.3787835-3-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808185108.3787835-1-bernd@kuhls.net> References: <20230808185108.3787835-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: + X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202306131828; t=1691520669; bh=g+dGJxdu+mAijCbjqvNf1JquKNPu01koxG+NNJiAGlo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yYiImry1AMooOfr2JBG5HO1xY3+JLTsmH72BgMB5t/CECWzb4KymJUFw58pnx1Tti PsxLwRKAu8ZKqWhnWSuEAjsWPhXKK72Epiji8MYfnq+kPdFes2p8scKYXXT2y5OeLB PxjyuKJ4pPXLEvOiuU5GrBArZigtVrNZwehUcTTc7gbrzwYrgHRG8Z/mhrtG2ZGpU9 GfY3M1zHr9tWAviynNg9dGT3uV6iwTXahfYkL9V/sIXu04w/5DoJBUSGAFlGBa44gq 26cl2/D/BEz8WqZJ56vKgIaLbk6ug+cJn8GPe0aqN2QcbL3eykWxGVvU+Q0e0AmzWN IPFnIJ8vFH3dw== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202306131828 header.b=yYiImry1 Subject: [Buildroot] [PATCH/next 02/16] package/python3: berkeleydb support needs the dbm interface X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Berkeley DB support in python depends on dbm, when missing python fails to detect libdb: https://github.com/python/cpython/blob/d2340ef25721b6a72d45d4508c672c4be38c67d3/configure.ac#L4002 quoting configure log: checking for libdb... no quoting python config.log: conftest.c:(.text.startup+0x8): undefined reference to `__db_ndbm_open' With this patch berkeleydb produces a working module: output/build/python3-3.11.4$ find -iname *dbm*.so ./build/lib.linux-x86_64-3.11/_dbm.cpython-311-x86_64-linux-gnu.so Signed-off-by: Bernd Kuhls --- package/python3/Config.in | 1 + 1 file changed, 1 insertion(+) diff --git a/package/python3/Config.in b/package/python3/Config.in index 761c38c850..38f0580aa4 100644 --- a/package/python3/Config.in +++ b/package/python3/Config.in @@ -48,6 +48,7 @@ config BR2_PACKAGE_PYTHON3_2TO3 config BR2_PACKAGE_PYTHON3_BERKELEYDB bool "berkeleydb" select BR2_PACKAGE_BERKELEYDB + select BR2_PACKAGE_BERKELEYDB_DBM help berkeleydb module for Python3 From patchwork Tue Aug 8 18:50:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1818860 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RL2N40sKmz1yfM for ; Wed, 9 Aug 2023 04:51:32 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 253748206A; Tue, 8 Aug 2023 18:51:30 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 253748206A X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EBD7wiBGZIld; Tue, 8 Aug 2023 18:51:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id D69F1820D3; Tue, 8 Aug 2023 18:51:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org D69F1820D3 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id B7F371BF330 for ; Tue, 8 Aug 2023 18:51:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 9D26C416D4 for ; Tue, 8 Aug 2023 18:51:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 9D26C416D4 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uGcx80o31v2P for ; Tue, 8 Aug 2023 18:51:24 +0000 (UTC) Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp4.osuosl.org (Postfix) with ESMTPS id 3A8EA416D0 for ; Tue, 8 Aug 2023 18:51:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3A8EA416D0 Received: from fli4l.lan.fli4l (p4fd6c649.dip0.t-ipconnect.de [79.214.198.73]) by dd20012.kasserver.com (Postfix) with ESMTPSA id 079DFA4C0366; Tue, 8 Aug 2023 20:51:09 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:48850) by fli4l.lan.fli4l with esmtp (Exim 4.96) (envelope-from ) id 1qTRnQ-0005AS-1i; Tue, 08 Aug 2023 20:51:08 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 8 Aug 2023 20:50:55 +0200 Message-Id: <20230808185108.3787835-4-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808185108.3787835-1-bernd@kuhls.net> References: <20230808185108.3787835-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: -- X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202306131828; t=1691520669; bh=llRVRwK7m8d6sBqPXUvwteSA2OTooG52fffIUiU137U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RlGblSpPwg2w1Y8tFFZIMIcRIC7LjU6QZzICdxSh/T0tOo70J2LcHmDNST86w5x3A BzwCtUewLpqYcSUuS/ily19hHuQFErO5waNlvNMijgLgT61rIho9JBaR1iA0ljrwlI zfFfcERgJ/CCHeaGTS7Oh4e5f2JtUUxS8GF1Ynea1wpBebEhaH8yUTYskwgpcksh2j jhTQGiRpwNtcaBAOcmHNG7/URHFN+AeRCdfZNrHC6ua5wDOUv/yTU9foZUI8EbGl4+ URJsWsq7nUAUy7oD21aO3jjmF8yrI7RjjnCadyjKzw7woO8/m1aYVchivbkQvGYV2y y/W/ksWVIiAmg== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202306131828 header.b=RlGblSpP Subject: [Buildroot] [PATCH/next 03/16] package/python3: use upstream build system to disable berkeleydb module X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Backport patch 0017 from python 3.12 to enhance build system. Signed-off-by: Bernd Kuhls --- ...17-Port-_dbm-module-to-PY_STDLIB_MOD.patch | 293 ++++++++++++++++++ ...ion-to-disable-the-berkeleydb-module.patch | 30 -- package/python3/python3.mk | 2 +- 3 files changed, 294 insertions(+), 31 deletions(-) create mode 100644 package/python3/0017-Port-_dbm-module-to-PY_STDLIB_MOD.patch delete mode 100644 package/python3/0030-Add-an-option-to-disable-the-berkeleydb-module.patch diff --git a/package/python3/0017-Port-_dbm-module-to-PY_STDLIB_MOD.patch b/package/python3/0017-Port-_dbm-module-to-PY_STDLIB_MOD.patch new file mode 100644 index 0000000000..92d2594eef --- /dev/null +++ b/package/python3/0017-Port-_dbm-module-to-PY_STDLIB_MOD.patch @@ -0,0 +1,293 @@ +From ec5e253556875640b1ac514e85c545346ac3f1e0 Mon Sep 17 00:00:00 2001 +From: Christian Heimes +Date: Fri, 1 Jul 2022 21:48:38 +0200 +Subject: [PATCH] gh-90005: Port _dbm module to PY_STDLIB_MOD (GH-94433) + +Upstream: https://github.com/python/cpython/commit/ec5e253556875640b1ac514e85c545346ac3f1e0 + +[Bernd: backported to 3.11.4] +Signed-off-by: Bernd Kuhls +--- + ...2-06-30-09-57-39.gh-issue-90005.9-pQyR.rst | 1 + + Modules/Setup.stdlib.in | 2 +- + configure | 295 ++++++++++++------ + configure.ac | 100 ++++-- + pyconfig.h.in | 6 - + setup.py | 72 +---- + 6 files changed, 278 insertions(+), 198 deletions(-) + create mode 100644 Misc/NEWS.d/next/Build/2022-06-30-09-57-39.gh-issue-90005.9-pQyR.rst + +diff --git a/Misc/NEWS.d/next/Build/2022-06-30-09-57-39.gh-issue-90005.9-pQyR.rst b/Misc/NEWS.d/next/Build/2022-06-30-09-57-39.gh-issue-90005.9-pQyR.rst +new file mode 100644 +index 0000000000000..9b14f767847da +--- /dev/null ++++ b/Misc/NEWS.d/next/Build/2022-06-30-09-57-39.gh-issue-90005.9-pQyR.rst +@@ -0,0 +1 @@ ++``_dbm`` module dependencies are now detected by configure. +diff --git a/Modules/Setup.stdlib.in b/Modules/Setup.stdlib.in +index a199aefc51011..ad34f85e25451 100644 +--- a/Modules/Setup.stdlib.in ++++ b/Modules/Setup.stdlib.in +@@ -68,7 +68,7 @@ + + # dbm/gdbm + # dbm needs either libndbm, libgdbm_compat, or libdb 5.x +-#@MODULE__DBM_TRUE@_dbm _dbmmodule.c ++@MODULE__DBM_TRUE@_dbm _dbmmodule.c + # gdbm module needs -lgdbm + @MODULE__GDBM_TRUE@_gdbm _gdbmmodule.c + +diff --git a/configure.ac b/configure.ac +index 12ae2ae8d87eb..b03ead3bdefa0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3956,17 +3956,30 @@ WITH_SAVE_ENV([ + ], [have_gdbm=no]) + ]) + +-# check for _dbmmodule.c dependencies ++dnl check for _dbmmodule.c dependencies ++dnl ndbm, gdbm_compat, libdb + AC_CHECK_HEADERS([ndbm.h], [ +- LIBS_SAVE="$LIBS" +- AC_CHECK_LIB([ndbm], [dbm_open]) +- LIBS="$LIBS_SAVE" +- AC_CHECK_LIB([gdbm_compat], [dbm_open]) +- LIBS="$LIBS_SAVE" ++ WITH_SAVE_ENV([ ++ AC_SEARCH_LIBS([dbm_open], [ndbm gdbm_compat]) ++ ]) + ]) + +-# "gdbm-ndbm.h" and "gdbm/ndbm.h" are both normalized to "gdbm_ndbm_h" +-# unset ac_cv_header_gdbm_ndbm_h to prevent false positive cache hits. ++AC_MSG_CHECKING([for ndbm presence and linker args]) ++AS_CASE([$ac_cv_search_dbm_open], ++ [*ndbm*|*gdbm_compat*], [ ++ dbm_ndbm="$ac_cv_search_dbm_open" ++ have_ndbm=yes ++ ], ++ [none*], [ ++ dbm_ndbm="" ++ have_ndbm=yes ++ ], ++ [no], [have_ndbm=no] ++) ++AC_MSG_RESULT([$have_ndbm ($dbm_ndbm)]) ++ ++dnl "gdbm-ndbm.h" and "gdbm/ndbm.h" are both normalized to "gdbm_ndbm_h" ++dnl unset ac_cv_header_gdbm_ndbm_h to prevent false positive cache hits. + AS_UNSET([ac_cv_header_gdbm_ndbm_h]) + AC_CACHE_VAL([ac_cv_header_gdbm_slash_ndbm_h], [ + AC_CHECK_HEADER( +@@ -3991,26 +4004,26 @@ AS_VAR_IF([ac_cv_header_gdbm_dash_ndbm_h], [yes], [ + AS_UNSET([ac_cv_header_gdbm_ndbm_h]) + + if test "$ac_cv_header_gdbm_slash_ndbm_h" = yes -o "$ac_cv_header_gdbm_dash_ndbm_h" = yes; then +- LIBS_SAVE="$LIBS" +- AC_CHECK_LIB([gdbm_compat], [dbm_open]) +- LIBS="$LIBS_SAVE" ++ WITH_SAVE_ENV([ ++ AC_SEARCH_LIBS([dbm_open], [gdbm_compat]) ++ ]) + fi + + # Check for libdb >= 5 with dbm_open() + # db.h re-defines the name of the function + AC_CHECK_HEADERS([db.h], [ + AC_CACHE_CHECK([for libdb], [ac_cv_have_libdb], [ +- LIBS_SAVE="$LIBS" +- LIBS="$LIBS -ldb" +- AC_LINK_IFELSE([AC_LANG_PROGRAM([ +- #define DB_DBM_HSEARCH 1 +- #include +- #if DB_VERSION_MAJOR < 5 +- #error "dh.h: DB_VERSION_MAJOR < 5 is not supported." +- #endif +- ], [DBM *dbm = dbm_open(NULL, 0, 0)]) +- ], [ac_cv_have_libdb=yes], [ac_cv_have_libdb=no]) +- LIBS="$LIBS_SAVE" ++ WITH_SAVE_ENV([ ++ LIBS="$LIBS -ldb" ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([ ++ #define DB_DBM_HSEARCH 1 ++ #include ++ #if DB_VERSION_MAJOR < 5 ++ #error "dh.h: DB_VERSION_MAJOR < 5 is not supported." ++ #endif ++ ], [DBM *dbm = dbm_open(NULL, 0, 0)]) ++ ], [ac_cv_have_libdb=yes], [ac_cv_have_libdb=no]) ++ ]) + ]) + AS_VAR_IF([ac_cv_have_libdb], [yes], [ + AC_DEFINE([HAVE_LIBDB], [1], [Define to 1 if you have the `db' library (-ldb).]) +@@ -4018,7 +4031,7 @@ AC_CHECK_HEADERS([db.h], [ + ]) + + # Check for --with-dbmliborder +-AC_MSG_CHECKING(for --with-dbmliborder) ++AC_MSG_CHECKING([for --with-dbmliborder]) + AC_ARG_WITH(dbmliborder, + AS_HELP_STRING([--with-dbmliborder=db1:db2:...], [override order to check db backends for dbm; a valid value is a colon separated string with the backend names `ndbm', `gdbm' and `bdb'.]), + [], [with_dbmliborder=gdbm:ndbm:bdb]) +@@ -4038,7 +4051,42 @@ IFS=$as_save_IFS + AS_VAR_IF([with_dbmliborder], [error], [ + AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:... (gdbm:ndbm:bdb)]) + ]) +-AC_MSG_RESULT($with_dbmliborder) ++AC_MSG_RESULT([$with_dbmliborder]) ++ ++AC_MSG_CHECKING([for _dbm module CFLAGS and LIBS]) ++have_dbm=no ++as_save_IFS=$IFS ++IFS=: ++for db in $with_dbmliborder; do ++ case "$db" in ++ ndbm) ++ if test "$have_ndbm" = yes; then ++ DBM_CFLAGS="-DUSE_NDBM" ++ DBM_LIBS="$dbm_ndbm" ++ have_dbm=yes ++ break ++ fi ++ ;; ++ gdbm) ++ if test "$have_gdbm_compat" = yes; then ++ DBM_CFLAGS="-DUSE_GDBM_COMPAT" ++ DBM_LIBS="-lgdbm_compat" ++ have_dbm=yes ++ break ++ fi ++ ;; ++ bdb) ++ if test "$ac_cv_have_libdb" = yes; then ++ DBM_CFLAGS="-DUSE_BERKDB" ++ DBM_LIBS="-ldb" ++ have_dbm=yes ++ break ++ fi ++ ;; ++ esac ++done ++IFS=$as_save_IFS ++AC_MSG_RESULT([$DBM_CFLAGS $DBM_LIBS]) + + # Templates for things AC_DEFINEd more than once. + # For a single AC_DEFINE, no template is needed. +@@ -6940,7 +6988,9 @@ PY_STDLIB_MOD([_ctypes], + dnl PY_STDLIB_MOD([_curses], [], [], [], []) + dnl PY_STDLIB_MOD([_curses_panel], [], [], [], []) + PY_STDLIB_MOD([_decimal], [], [], [$LIBMPDEC_CFLAGS], [$LIBMPDEC_LDFLAGS]) +-dnl PY_STDLIB_MOD([_dbm], [], [], [], []) ++PY_STDLIB_MOD([_dbm], ++ [test -n "$with_dbmliborder"], [test "$have_dbm" != "no"], ++ [$DBM_CFLAGS], [$DBM_LIBS]) + PY_STDLIB_MOD([_gdbm], + [test "$have_gdbm_dbmliborder" = yes], [test "$have_gdbm" = yes], + [$GDBM_CFLAGS], [$GDBM_LIBS]) +diff --git a/pyconfig.h.in b/pyconfig.h.in +index 15933e75b1b07..b05ddd41c2bba 100644 +--- a/pyconfig.h.in ++++ b/pyconfig.h.in +@@ -640,18 +640,12 @@ + /* Define to 1 if you have the `dld' library (-ldld). */ + #undef HAVE_LIBDLD + +-/* Define to 1 if you have the `gdbm_compat' library (-lgdbm_compat). */ +-#undef HAVE_LIBGDBM_COMPAT +- + /* Define to 1 if you have the `ieee' library (-lieee). */ + #undef HAVE_LIBIEEE + + /* Define to 1 if you have the header file. */ + #undef HAVE_LIBINTL_H + +-/* Define to 1 if you have the `ndbm' library (-lndbm). */ +-#undef HAVE_LIBNDBM +- + /* Define to build the readline module. */ + #undef HAVE_LIBREADLINE + +diff --git a/setup.py b/setup.py +index 843ec35effe10..cc11dedee1b2e 100644 +--- a/setup.py ++++ b/setup.py +@@ -1163,77 +1163,7 @@ def detect_crypt(self): + self.addext(Extension('_crypt', ['_cryptmodule.c'])) + + def detect_dbm_gdbm(self): +- # Modules that provide persistent dictionary-like semantics. You will +- # probably want to arrange for at least one of them to be available on +- # your machine, though none are defined by default because of library +- # dependencies. The Python module dbm/__init__.py provides an +- # implementation independent wrapper for these; dbm/dumb.py provides +- # similar functionality (but slower of course) implemented in Python. +- +- dbm_setup_debug = False # verbose debug prints from this script? +- dbm_order = ['gdbm'] +- +- # libdb, gdbm and ndbm headers and libraries +- have_ndbm_h = sysconfig.get_config_var("HAVE_NDBM_H") +- have_gdbm_ndbm_h = sysconfig.get_config_var("HAVE_GDBM_NDBM_H") +- have_gdbm_dash_ndbm_h = sysconfig.get_config_var("HAVE_GDBM_DASH_NDBM_H") +- have_libndbm = sysconfig.get_config_var("HAVE_LIBNDBM") +- have_libgdbm_compat = sysconfig.get_config_var("HAVE_LIBGDBM_COMPAT") +- have_libdb = sysconfig.get_config_var("HAVE_LIBDB") +- +- # The standard Unix dbm module: +- if not CYGWIN: +- config_args = [arg.strip("'") +- for arg in sysconfig.get_config_var("CONFIG_ARGS").split()] +- dbm_args = [arg for arg in config_args +- if arg.startswith('--with-dbmliborder=')] +- if dbm_args: +- dbm_order = [arg.split('=')[-1] for arg in dbm_args][-1].split(":") +- else: +- dbm_order = "gdbm:ndbm:bdb".split(":") +- dbmext = None +- for cand in dbm_order: +- if cand == "ndbm": +- if have_ndbm_h: +- # Some systems have -lndbm, others have -lgdbm_compat, +- # others don't have either +- if have_libndbm: +- ndbm_libs = ['ndbm'] +- elif have_libgdbm_compat: +- ndbm_libs = ['gdbm_compat'] +- else: +- ndbm_libs = [] +- if dbm_setup_debug: print("building dbm using ndbm") +- dbmext = Extension( +- '_dbm', ['_dbmmodule.c'], +- define_macros=[('USE_NDBM', None)], +- libraries=ndbm_libs +- ) +- break +- elif cand == "gdbm": +- # dbm_open() is provided by libgdbm_compat, which wraps libgdbm +- if have_libgdbm_compat and (have_gdbm_ndbm_h or have_gdbm_dash_ndbm_h): +- if dbm_setup_debug: print("building dbm using gdbm") +- dbmext = Extension( +- '_dbm', ['_dbmmodule.c'], +- define_macros=[('USE_GDBM_COMPAT', None)], +- libraries=['gdbm_compat'] +- ) +- break +- elif cand == "bdb": +- if have_libdb: +- if dbm_setup_debug: print("building dbm using bdb") +- dbmext = Extension( +- '_dbm', ['_dbmmodule.c'], +- define_macros=[('USE_BERKDB', None)], +- libraries=['db'] +- ) +- break +- if dbmext is not None: +- self.add(dbmext) +- else: +- self.missing.append('_dbm') +- ++ self.addext(Extension('_dbm', ['_dbmmodule.c'])) + # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: + self.addext(Extension('_gdbm', ['_gdbmmodule.c'])) + diff --git a/package/python3/0030-Add-an-option-to-disable-the-berkeleydb-module.patch b/package/python3/0030-Add-an-option-to-disable-the-berkeleydb-module.patch deleted file mode 100644 index 5fb436db59..0000000000 --- a/package/python3/0030-Add-an-option-to-disable-the-berkeleydb-module.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 67e9793d070ac5c8e83abbe95b9208533ffeadd0 Mon Sep 17 00:00:00 2001 -From: Bernd Kuhls -Date: Sat, 11 Apr 2020 22:01:40 +0200 -Subject: [PATCH] Add an option to disable the berkeleydb module - -Signed-off-by: Bernd Kuhls ---- - configure.ac | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 841fd6732c..06c9a81f95 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4280,6 +4280,12 @@ if test "$UUID" = "no"; then - DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _uuid" - fi - -+AC_ARG_ENABLE(berkeleydb, -+ AS_HELP_STRING([--disable-berkeleydb], [disable berkeleydb]), -+ [ if test "$enableval" = "no"; then -+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _dbm" -+ fi]) -+ - AC_SUBST(PYDOC) - - AC_ARG_ENABLE(pydoc, --- -2.34.1 - diff --git a/package/python3/python3.mk b/package/python3/python3.mk index bdb7cfd22f..494c66c0b1 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -75,7 +75,7 @@ endif ifeq ($(BR2_PACKAGE_PYTHON3_BERKELEYDB),y) PYTHON3_DEPENDENCIES += berkeleydb else -PYTHON3_CONF_OPTS += --disable-berkeleydb +PYTHON3_CONF_ENV += py_cv_module__dbm=n/a endif ifeq ($(BR2_PACKAGE_PYTHON3_READLINE),y) From patchwork Tue Aug 8 18:50:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1818859 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RL2Mp5t03z1yfM for ; Wed, 9 Aug 2023 04:51:18 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 28E9182081; Tue, 8 Aug 2023 18:51:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 28E9182081 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HCZ_IHCgXrbO; Tue, 8 Aug 2023 18:51:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 5ADF58206A; Tue, 8 Aug 2023 18:51:15 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 5ADF58206A X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 1310F1BF330 for ; Tue, 8 Aug 2023 18:51:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id E06F88206A for ; Tue, 8 Aug 2023 18:51:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org E06F88206A X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tq0BBEg3QY1R for ; Tue, 8 Aug 2023 18:51:12 +0000 (UTC) Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp1.osuosl.org (Postfix) with ESMTPS id 2492682055 for ; Tue, 8 Aug 2023 18:51:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 2492682055 Received: from fli4l.lan.fli4l (p4fd6c649.dip0.t-ipconnect.de [79.214.198.73]) by dd20012.kasserver.com (Postfix) with ESMTPSA id 15701A4C10DA; Tue, 8 Aug 2023 20:51:09 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:48850) by fli4l.lan.fli4l with esmtp (Exim 4.96) (envelope-from ) id 1qTRnQ-0005AS-2V; Tue, 08 Aug 2023 20:51:08 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 8 Aug 2023 20:50:56 +0200 Message-Id: <20230808185108.3787835-5-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808185108.3787835-1-bernd@kuhls.net> References: <20230808185108.3787835-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: + X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202306131828; t=1691520669; bh=XEYmUQfzVkK7ywe+ptQdxM1lauxTjcchhyyaYZo+HIo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yzmee3fASozgxpTiBy3L28wptH7RV3J3LFl6gE7eBXzwQM4ylmBwJEEBB/vj4VHna SngPq4XsdDil3E7lgUb/aky7EmciFNfbAu2pnKO9IYCz9vzxcd/hDpXHZxkttq/9po gQVM39+q+VPKRR6wDGJtiKtPwQetV0dPVHAQZUvW0XTUrkWswmP4BVT2KIypW/NOey kzq0TV+wzReTwAIc/4wDsdK/DaLQ7Cb3scjyc3oeZf2ux5qxAWbBgzCgV1I1iOn7HM ZrfvSJ1ExsZaW0LbcYuAx/L5oMZE78ja9V4ibT8YHWhiGVdzdMw9GCkl42K1/s5BzV Q9rhUlAOSTjyA== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202306131828 header.b=Yzmee3fA Subject: [Buildroot] [PATCH/next 04/16] package/python3: use upstream build system to disable uuid module X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Signed-off-by: Bernd Kuhls --- ...Add-an-option-to-disable-uuid-module.patch | 33 ------------------- package/python3/python3.mk | 4 +-- 2 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 package/python3/0027-Add-an-option-to-disable-uuid-module.patch diff --git a/package/python3/0027-Add-an-option-to-disable-uuid-module.patch b/package/python3/0027-Add-an-option-to-disable-uuid-module.patch deleted file mode 100644 index a9501ec189..0000000000 --- a/package/python3/0027-Add-an-option-to-disable-uuid-module.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 58027d25c3cabcf654cb0b31a61d7cbd53dc68c0 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Sat, 18 Aug 2018 10:54:56 +0200 -Subject: [PATCH] Add an option to disable uuid module - -Signed-off-by: Thomas Petazzoni ---- - configure.ac | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/configure.ac b/configure.ac -index ca6c16491a..ed03b27fb1 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4267,6 +4267,15 @@ if test "$CURSES" = "no"; then - DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel" - fi - -+AC_SUBST(UUID) -+AC_ARG_ENABLE(uuid, -+ AS_HELP_STRING([--disable-uuid], [disable uuid]), -+ [ UUID="${enableval}" ], [ UUID=yes ]) -+ -+if test "$UUID" = "no"; then -+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _uuid" -+fi -+ - AC_SUBST(PYDOC) - - AC_ARG_ENABLE(pydoc, --- -2.34.1 - diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 494c66c0b1..5d36917817 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -31,7 +31,6 @@ HOST_PYTHON3_CONF_OPTS += \ --enable-unicodedata \ --disable-test-modules \ --disable-idle3 \ - --disable-uuid \ --disable-ossaudiodev # Make sure that LD_LIBRARY_PATH overrides -rpath. @@ -41,6 +40,7 @@ HOST_PYTHON3_CONF_OPTS += \ # communicate over the network during the build. HOST_PYTHON3_CONF_ENV += \ LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags" \ + py_cv_module__uuid=n/a \ ac_cv_prog_HAS_HG=/bin/false PYTHON3_DEPENDENCIES = host-python3 libffi @@ -128,7 +128,7 @@ endif # Disable auto-detection of uuid.h (util-linux) # which would add _uuid module support, instead # default to the pure python implementation -PYTHON3_CONF_OPTS += --disable-uuid +PYTHON3_CONF_ENV += py_cv_module__uuid=n/a ifeq ($(BR2_PACKAGE_PYTHON3_BZIP2),y) PYTHON3_DEPENDENCIES += bzip2 From patchwork Tue Aug 8 18:50:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1818862 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RL2NY1tCHz1yfM for ; Wed, 9 Aug 2023 04:51:57 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8A4A98204E; Tue, 8 Aug 2023 18:51:55 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8A4A98204E X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ut0D5VwLK2yp; Tue, 8 Aug 2023 18:51:54 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id B5F8C820F2; Tue, 8 Aug 2023 18:51:53 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B5F8C820F2 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 4C8961BF330 for ; Tue, 8 Aug 2023 18:51:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 255C1416D4 for ; Tue, 8 Aug 2023 18:51:50 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 255C1416D4 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id poWAwuJ25VXF for ; Tue, 8 Aug 2023 18:51:49 +0000 (UTC) Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp4.osuosl.org (Postfix) with ESMTPS id 1FF43416D0 for ; Tue, 8 Aug 2023 18:51:49 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 1FF43416D0 Received: from fli4l.lan.fli4l (p4fd6c649.dip0.t-ipconnect.de [79.214.198.73]) by dd20012.kasserver.com (Postfix) with ESMTPSA id 3AF22A4C10F8; Tue, 8 Aug 2023 20:51:09 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:48850) by fli4l.lan.fli4l with esmtp (Exim 4.96) (envelope-from ) id 1qTRnQ-0005AS-2l; Tue, 08 Aug 2023 20:51:08 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 8 Aug 2023 20:50:57 +0200 Message-Id: <20230808185108.3787835-6-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808185108.3787835-1-bernd@kuhls.net> References: <20230808185108.3787835-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: / X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202306131828; t=1691520669; bh=qBUG0C0lu03826KYdRDq5S4rQGRCBbxus/RLRoYrG9c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AutkKhfOU2SIr6LsE5E0uORCXu2VJgA3aHw4p+xZ0avktbBvDKBWcx9BVEvLa/zuU wgW1QFjqzDVnDc/1pz76bPXN6idq+zc/LJdqqeBm4w+GSFNVkECSSqzRUBJ6H73B1H fYS+/XTrXUD4AgTBDG09OERXJktp9ZwJXVgJEWxRuMcr/iQA/1yqFXT7pYXxl8AFzu jLYEeIM8zIv95+lbUP4ENFHhiZE9Bh1dmhkljIgIqHKyMlr9LK5EiK2o+bV/HnvNi5 z5Jwd8NExCDc8f6N76/IPYy5+XhYSphgHjf0FKTzhklTRdw/V8ryAfkODMh66zswL/ uvq4MRpe1kFbA== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202306131828 header.b=AutkKhfO Subject: [Buildroot] [PATCH/next 05/16] package/python3: use upstream build system to disable bzip2/zlib/xz modules X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Signed-off-by: Bernd Kuhls --- ...to-disable-zlib-bzip2-and-xz-modules.patch | 42 ------------------- package/python3/python3.mk | 8 ++-- 2 files changed, 4 insertions(+), 46 deletions(-) delete mode 100644 package/python3/0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch diff --git a/package/python3/0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch b/package/python3/0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch deleted file mode 100644 index 70a0d6cd15..0000000000 --- a/package/python3/0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 988a335cb34b5fc25ea345ba04ff5ddffe2e946c Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Tue, 7 Mar 2017 23:31:11 +0100 -Subject: [PATCH] Add options to disable zlib, bzip2 and xz modules - -Signed-off-by: Thomas Petazzoni ---- - configure.ac | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 19875d7d30..ca6c16491a 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4231,6 +4231,24 @@ AC_ARG_ENABLE(readline, - DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} readline" - fi]) - -+AC_ARG_ENABLE(bzip2, -+ AS_HELP_STRING([--disable-bzip2], [disable bzip2]), -+ [ if test "$enableval" = "no"; then -+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _bz2" -+ fi]) -+ -+AC_ARG_ENABLE(zlib, -+ AS_HELP_STRING([--disable-zlib], [disable zlib]), -+ [ if test "$enableval" = "no"; then -+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} zlib" -+ fi]) -+ -+AC_ARG_ENABLE(xz, -+ AS_HELP_STRING([--disable-xz], [disable xz]), -+ [ if test "$enableval" = "no"; then -+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _lzma" -+ fi]) -+ - AC_SUBST(TK) - AC_ARG_ENABLE(tk, - AS_HELP_STRING([--disable-tk], [disable tk]), --- -2.34.1 - diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 5d36917817..2a552cd0f4 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -55,7 +55,7 @@ HOST_PYTHON3_DEPENDENCIES = \ ifeq ($(BR2_PACKAGE_HOST_PYTHON3_BZIP2),y) HOST_PYTHON3_DEPENDENCIES += host-bzip2 else -HOST_PYTHON3_CONF_OPTS += --disable-bzip2 +HOST_PYTHON3_CONF_ENV += py_cv_module__bz2=n/a endif ifeq ($(BR2_PACKAGE_HOST_PYTHON3_SSL),y) @@ -133,19 +133,19 @@ PYTHON3_CONF_ENV += py_cv_module__uuid=n/a ifeq ($(BR2_PACKAGE_PYTHON3_BZIP2),y) PYTHON3_DEPENDENCIES += bzip2 else -PYTHON3_CONF_OPTS += --disable-bzip2 +PYTHON3_CONF_ENV += py_cv_module__bz2=n/a endif ifeq ($(BR2_PACKAGE_PYTHON3_XZ),y) PYTHON3_DEPENDENCIES += xz else -PYTHON3_CONF_OPTS += --disable-xz +PYTHON3_CONF_ENV += py_cv_module__lzma=n/a endif ifeq ($(BR2_PACKAGE_PYTHON3_ZLIB),y) PYTHON3_DEPENDENCIES += zlib else -PYTHON3_CONF_OPTS += --disable-zlib +PYTHON3_CONF_ENV += py_cv_module_zlib=n/a endif ifeq ($(BR2_PACKAGE_PYTHON3_OSSAUDIODEV),y) From patchwork Tue Aug 8 18:50:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1818865 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RL2PJ4BbLz1yfM for ; Wed, 9 Aug 2023 04:52:36 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id C93D9820D5; Tue, 8 Aug 2023 18:52:34 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org C93D9820D5 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VQve1ghaUnUJ; Tue, 8 Aug 2023 18:52:32 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 5A05A82102; Tue, 8 Aug 2023 18:52:31 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 5A05A82102 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 721001BF330 for ; Tue, 8 Aug 2023 18:52:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 4B649401AD for ; Tue, 8 Aug 2023 18:52:28 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 4B649401AD X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OUiuJJQmKamr for ; Tue, 8 Aug 2023 18:52:25 +0000 (UTC) Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp2.osuosl.org (Postfix) with ESMTPS id 00150405E0 for ; Tue, 8 Aug 2023 18:52:24 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 00150405E0 Received: from fli4l.lan.fli4l (p4fd6c649.dip0.t-ipconnect.de [79.214.198.73]) by dd20012.kasserver.com (Postfix) with ESMTPSA id E2304A4C10FA; Tue, 8 Aug 2023 20:51:09 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:48850) by fli4l.lan.fli4l with esmtp (Exim 4.96) (envelope-from ) id 1qTRnQ-0005AS-3B; Tue, 08 Aug 2023 20:51:09 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 8 Aug 2023 20:50:58 +0200 Message-Id: <20230808185108.3787835-7-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808185108.3787835-1-bernd@kuhls.net> References: <20230808185108.3787835-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: + X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202306131828; t=1691520669; bh=iDK7eXGGexmZcJF6C1b94JJ055EGn0m62AmA3knG3vA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vhLkKZhURYo2+B/Xwc2wzaoRZA5DRy6X0yqcHaZ4Ay0SDMoOZqhIYtfe5dOG7VJtv 1smGK2oXbmrKfxyI81TIrxY0OOyPi+d9W8DMWxigrZGxpA2gtOJo/wKDw70bMz9mlD br3LPtscAB20JOYPEL8q69P2fbwJ+E40bRqaPFK4ouEROPoMkVqRupycEXCP07stDt oh5rlA9FxrXGkNGTzJN3RYXHiktQF5u4y5LT8OUp4zq8w9ZZGSxzD1K3SFIk8Iap8y 1oXRwMdow+611Axd0gy3iUPQru5Ld6spVBWD7VubjN9Llxn6FCF2MJduPfZFmPru78 lyW4B5Zx+tI1A== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202306131828 header.b=vhLkKZhU Subject: [Buildroot] [PATCH/next 06/16] package/python3: use upstream build system to disable curses/readline modules X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Backport patch 0019 from python 3.12 to enhance build system, for easier backporting backported patch 0018 as well which was applied upstream before patch 0019. Signed-off-by: Bernd Kuhls --- ...-option-to-disable-the-curses-module.patch | 61 -- .../0018-Port-_ctypes-to-PY_STDLIB_MOD.patch | 441 +++++++++++ ...readline-and-curses-to-PY_STDLIB_MOD.patch | 718 ++++++++++++++++++ ...ption-to-disable-the-readline-module.patch | 30 - package/python3/python3.mk | 10 +- 5 files changed, 1166 insertions(+), 94 deletions(-) delete mode 100644 package/python3/0015-Add-an-option-to-disable-the-curses-module.patch create mode 100644 package/python3/0018-Port-_ctypes-to-PY_STDLIB_MOD.patch create mode 100644 package/python3/0019-Port-readline-and-curses-to-PY_STDLIB_MOD.patch delete mode 100644 package/python3/0024-Add-an-option-to-disable-the-readline-module.patch diff --git a/package/python3/0015-Add-an-option-to-disable-the-curses-module.patch b/package/python3/0015-Add-an-option-to-disable-the-curses-module.patch deleted file mode 100644 index da6f891104..0000000000 --- a/package/python3/0015-Add-an-option-to-disable-the-curses-module.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 03e28cdd46dac1b7e4e9c8bbd2ea44b09e514205 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Wed, 22 Feb 2017 17:31:51 -0800 -Subject: [PATCH] Add an option to disable the curses module - -Signed-off-by: Thomas Petazzoni -Signed-off-by: Samuel Martin -[ Andrey Smirnov: ported to Python 3.6 ] -Signed-off-by: Andrey Smirnov -[ Adam Duskett: ported to Python 3.10.0 ] -Signed-off-by: Adam Duskett ---- - Makefile.pre.in | 4 +++- - configure.ac | 9 +++++++++ - 2 files changed, 12 insertions(+), 1 deletion(-) - -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 4f83911200..8e879b35c6 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -1905,7 +1905,6 @@ LIBSUBDIRS= asyncio \ - concurrent concurrent/futures \ - csv \ - ctypes ctypes/macholib \ -- curses \ - dbm \ - distutils distutils/command \ - email email/mime \ -@@ -2024,6 +2023,9 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \ - tkinter/test/test_ttk - endif - -+ifeq (@CURSES@,yes) -+LIBSUBDIRS += curses -+endif - - TEST_MODULES=@TEST_MODULES@ - libinstall: all $(srcdir)/Modules/xxmodule.c -diff --git a/configure.ac b/configure.ac -index f4ce506801..0ae9863cd6 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4189,6 +4189,15 @@ if test "$TK" = "no"; then - DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter" - fi - -+AC_SUBST(CURSES) -+AC_ARG_ENABLE(curses, -+ AS_HELP_STRING([--disable-curses], [disable curses]), -+ [ CURSES="${enableval}" ], [ CURSES=yes ]) -+ -+if test "$CURSES" = "no"; then -+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel" -+fi -+ - AC_SUBST(PYDOC) - - AC_ARG_ENABLE(pydoc, --- -2.34.1 - diff --git a/package/python3/0018-Port-_ctypes-to-PY_STDLIB_MOD.patch b/package/python3/0018-Port-_ctypes-to-PY_STDLIB_MOD.patch new file mode 100644 index 0000000000..f8e3e43927 --- /dev/null +++ b/package/python3/0018-Port-_ctypes-to-PY_STDLIB_MOD.patch @@ -0,0 +1,441 @@ +From bb8b931385ba9df4e01f7dd3ce4575d49f60efdf Mon Sep 17 00:00:00 2001 +From: Christian Heimes +Date: Sun, 26 Jun 2022 13:04:43 +0200 +Subject: [PATCH] gh-90005: Port _ctypes to PY_STDLIB_MOD (GH-32229) + +Co-authored-by: Erlend Egeberg Aasland + +Automerge-Triggered-By: GH:tiran + +Upstream: https://github.com/python/cpython/commit/bb8b931385ba9df4e01f7dd3ce4575d49f60efdf + +[Bernd: backported to 3.11.4] +Signed-off-by: Bernd Kuhls +--- + Makefile.pre.in | 9 +- + ...2-04-01-12-35-44.gh-issue-90005.pvaLHQ.rst | 1 + + Modules/Setup.stdlib.in | 2 +- + Modules/_ctypes/callproc.c | 3 + + Modules/_ctypes/malloc_closure.c | 3 + + configure | 540 +++++++++++++++++- + configure.ac | 125 +++- + pyconfig.h.in | 9 + + setup.py | 115 +--- + 9 files changed, 660 insertions(+), 147 deletions(-) + create mode 100644 Misc/NEWS.d/next/Library/2022-04-01-12-35-44.gh-issue-90005.pvaLHQ.rst + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 102cd752c39cd..c0333cea48cd7 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -340,10 +340,6 @@ IO_OBJS= \ + Modules/_io/bytesio.o \ + Modules/_io/stringio.o + +-########################################################################## +- +-LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ +- + ########################################################################## + # Parser + +@@ -2595,7 +2595,8 @@ + MODULE_PYEXPAT_DEPS=@LIBEXPAT_INTERNAL@ + MODULE_UNICODEDATA_DEPS=$(srcdir)/Modules/unicodedata_db.h $(srcdir)/Modules/unicodename_db.h + MODULE__BLAKE2_DEPS=$(srcdir)/Modules/_blake2/impl/blake2-config.h $(srcdir)/Modules/_blake2/impl/blake2-impl.h $(srcdir)/Modules/_blake2/impl/blake2.h $(srcdir)/Modules/_blake2/impl/blake2b-load-sse2.h $(srcdir)/Modules/_blake2/impl/blake2b-load-sse41.h $(srcdir)/Modules/_blake2/impl/blake2b-ref.c $(srcdir)/Modules/_blake2/impl/blake2b-round.h $(srcdir)/Modules/_blake2/impl/blake2b.c $(srcdir)/Modules/_blake2/impl/blake2s-load-sse2.h $(srcdir)/Modules/_blake2/impl/blake2s-load-sse41.h $(srcdir)/Modules/_blake2/impl/blake2s-load-xop.h $(srcdir)/Modules/_blake2/impl/blake2s-ref.c $(srcdir)/Modules/_blake2/impl/blake2s-round.h $(srcdir)/Modules/_blake2/impl/blake2s.c $(srcdir)/Modules/_blake2/blake2module.h $(srcdir)/Modules/hashlib.h +-MODULE__CTYPES_DEPS=$(srcdir)/Modules/_ctypes/ctypes.h ++MODULE__CTYPES_DEPS=$(srcdir)/Modules/_ctypes/ctypes.h $(srcdir)/Modules/_ctypes/darwin/dlfcn.h ++MODULE__CTYPES_MALLOC_CLOSURE=@MODULE__CTYPES_MALLOC_CLOSURE@ + MODULE__DECIMAL_DEPS=$(srcdir)/Modules/_decimal/docstrings.h @LIBMPDEC_INTERNAL@ + MODULE__ELEMENTTREE_DEPS=$(srcdir)/Modules/pyexpat.c @LIBEXPAT_INTERNAL@ + MODULE__HASHLIB_DEPS=$(srcdir)/Modules/hashlib.h +diff --git a/Misc/NEWS.d/next/Library/2022-04-01-12-35-44.gh-issue-90005.pvaLHQ.rst b/Misc/NEWS.d/next/Library/2022-04-01-12-35-44.gh-issue-90005.pvaLHQ.rst +new file mode 100644 +index 0000000000000..ef6a881a4d094 +--- /dev/null ++++ b/Misc/NEWS.d/next/Library/2022-04-01-12-35-44.gh-issue-90005.pvaLHQ.rst +@@ -0,0 +1 @@ ++:mod:`ctypes` dependency ``libffi`` is now detected with ``pkg-config``. +diff --git a/Modules/Setup.stdlib.in b/Modules/Setup.stdlib.in +index 2730030a15650..a199aefc51011 100644 +--- a/Modules/Setup.stdlib.in ++++ b/Modules/Setup.stdlib.in +@@ -136,7 +136,7 @@ + # + + # needs -lffi and -ldl +-#@MODULE__CTYPES_TRUE@_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c ++@MODULE__CTYPES_TRUE@_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c @MODULE__CTYPES_MALLOC_CLOSURE@ + + # needs -lncurses, -lncursesw or -lcurses, sometimes -ltermcap + #@MODULE__CURSES_TRUE@_curses _cursesmodule.c +diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c +index 3fab9ad0c1e7b..fa1dfac6c7d94 100644 +--- a/Modules/_ctypes/callproc.c ++++ b/Modules/_ctypes/callproc.c +@@ -54,6 +54,9 @@ + + */ + ++#ifndef Py_BUILD_CORE_BUILTIN ++# define Py_BUILD_CORE_MODULE 1 ++#endif + #define NEEDS_PY_IDENTIFIER + + #include "Python.h" +diff --git a/Modules/_ctypes/malloc_closure.c b/Modules/_ctypes/malloc_closure.c +index 38edc90e70763..d47153f1d7f3e 100644 +--- a/Modules/_ctypes/malloc_closure.c ++++ b/Modules/_ctypes/malloc_closure.c +@@ -1,3 +1,6 @@ ++#ifndef Py_BUILD_CORE_BUILTIN ++# define Py_BUILD_CORE_MODULE 1 ++#endif + #include + #include + #ifdef MS_WIN32 +diff --git a/configure.ac b/configure.ac +index f9abd851ea5cb..6a8a0a963afa2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -49,6 +49,26 @@ AC_DEFUN([WITH_SAVE_ENV], + [RESTORE_ENV] + )dnl + ++dnl PY_CHECK_FUNC(FUNCTION, [INCLUDES], [AC_DEFINE-VAR]) ++AC_DEFUN([PY_CHECK_FUNC], ++[ AS_VAR_PUSHDEF([py_var], [ac_cv_func_$1]) ++ AS_VAR_PUSHDEF([py_define], m4_ifblank([$3], [[HAVE_]m4_toupper($1)], [$3])) ++ AC_CACHE_CHECK( ++ [for $1], ++ [py_var], ++ [AC_COMPILE_IFELSE( ++ [AC_LANG_PROGRAM([$2], [void *x=$1])], ++ [AS_VAR_SET([py_var], [yes])], ++ [AS_VAR_SET([py_var], [no])])] ++ ) ++ AS_VAR_IF( ++ [py_var], ++ [yes], ++ [AC_DEFINE([py_define], [1], [Define if you have the '$1' function.])]) ++ AS_VAR_POPDEF([py_var]) ++ AS_VAR_POPDEF([py_define]) ++]) ++ + AC_SUBST(BASECPPFLAGS) + if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then + # If we're building out-of-tree, we need to make sure the following +@@ -713,6 +733,21 @@ fi + + if test "$ac_sys_system" = "Darwin" + then ++ dnl look for SDKROOT ++ AC_CHECK_PROG([HAS_XCRUN], [xcrun], [yes], [missing]) ++ AC_MSG_CHECKING([macOS SDKROOT]) ++ if test -z "$SDKROOT"; then ++ dnl SDKROOT not set ++ if test "$HAS_XCRUN" = "yes"; then ++ dnl detect with Xcode ++ SDKROOT=$(xcrun --show-sdk-path) ++ else ++ dnl default to root ++ SDKROOT="/" ++ fi ++ fi ++ AC_MSG_RESULT([$SDKROOT]) ++ + # Compiler selection on MacOSX is more complicated than + # AC_PROG_CC can handle, see Mac/README for more + # information +@@ -1101,7 +1136,7 @@ AC_DEFINE_UNQUOTED([PY_SUPPORT_TIER], [$PY_SUPPORT_TIER], [PEP 11 Support tier ( + + AC_CACHE_CHECK([for -Wl,--no-as-needed], [ac_cv_wl_no_as_needed], [ + save_LDFLAGS="$LDFLAGS" +- AS_VAR_APPEND([LDFLAGS], [-Wl,--no-as-needed]) ++ AS_VAR_APPEND([LDFLAGS], [" -Wl,--no-as-needed"]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])], + [NO_AS_NEEDED="-Wl,--no-as-needed" + ac_cv_wl_no_as_needed=yes], +@@ -3564,12 +3599,60 @@ else + with_system_ffi="yes" + fi + +-if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then +- LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`" +-else +- LIBFFI_INCLUDEDIR="" +-fi +-AC_SUBST(LIBFFI_INCLUDEDIR) ++dnl detect libffi ++have_libffi=missing ++AS_VAR_IF([with_system_ffi], [yes], [ ++ PKG_CHECK_MODULES([LIBFFI], [libffi], [have_libffi=yes], [ ++ AC_CHECK_HEADER([ffi.h], [ ++ WITH_SAVE_ENV([ ++ AC_CHECK_LIB([ffi], [ffi_call], [have_libffi=yes], [have_libffi=no]) ++ ]) ++ ]) ++ ]) ++], [ ++ AS_VAR_IF([ac_sys_system], [Darwin], [ ++ WITH_SAVE_ENV([ ++ CFLAGS="-I${SDKROOT}/usr/include/ffi $CFLAGS" ++ AC_CHECK_HEADER([ffi.h], [ ++ AC_CHECK_LIB([ffi], [ffi_call], [ ++ dnl use ffi from SDK root ++ have_libffi=yes ++ LIBFFI_CFLAGS="-I${SDKROOT}/usr/include/ffi -DUSING_APPLE_OS_LIBFFI=1" ++ LIBFFI_LIBS="-lffi" ++ ], [have_libffi=no]) ++ ]) ++ ]) ++ ]) ++]) ++ ++AS_VAR_IF([have_libffi], [yes], [ ++ ctypes_malloc_closure=no ++ AS_CASE([$ac_sys_system], ++ [Darwin], [ ++ dnl when do we need USING_APPLE_OS_LIBFFI? ++ AS_VAR_APPEND([LIBFFI_CFLAGS], [" -I\$(srcdir)/Modules/_ctypes/darwin -DMACOSX"]) ++ ctypes_malloc_closure=yes ++ ], ++ [sunos5], [AS_VAR_APPEND([LIBFFI_LIBS], [" -mimpure-text"])] ++ ) ++ AS_VAR_IF([ctypes_malloc_closure], [yes], [ ++ MODULE__CTYPES_MALLOC_CLOSURE=_ctypes/malloc_closure.c ++ AS_VAR_APPEND([LIBFFI_CFLAGS], [" -DUSING_MALLOC_CLOSURE_DOT_C=1"]) ++ ]) ++ AC_SUBST([MODULE__CTYPES_MALLOC_CLOSURE]) ++ ++ dnl HAVE_LIBDL: for dlopen, see gh-76828 ++ AS_VAR_IF([ac_cv_lib_dl_dlopen], [yes], [AS_VAR_APPEND([LIBFFI_LIBS], [" -ldl"])]) ++ ++ WITH_SAVE_ENV([ ++ CFLAGS="$LIBFFI_CFLAGS $CFLAGS" ++ LDFLAGS="$LIBFFI_LIBS $LDFLAGS" ++ ++ PY_CHECK_FUNC([ffi_prep_cif_var], [#include ]) ++ PY_CHECK_FUNC([ffi_prep_closure_loc], [#include ]) ++ PY_CHECK_FUNC([ffi_closure_alloc], [#include ]) ++ ]) ++]) + + # Check for use of the system libmpdec library + AC_MSG_CHECKING(for --with-system-libmpdec) +@@ -4526,26 +4609,6 @@ AC_CHECK_DECL(dirfd, + [#include + #include ]) + +-dnl PY_CHECK_FUNC(FUNCTION, [INCLUDES], [AC_DEFINE-VAR]) +-AC_DEFUN([PY_CHECK_FUNC], +-[ AS_VAR_PUSHDEF([py_var], [ac_cv_func_$1]) +- AS_VAR_PUSHDEF([py_define], m4_ifblank([$3], [[HAVE_]m4_toupper($1)], [$3])) +- AC_CACHE_CHECK( +- [for $1], +- [py_var], +- [AC_COMPILE_IFELSE( +- [AC_LANG_PROGRAM([$2], [void *x=$1])], +- [AS_VAR_SET([py_var], [yes])], +- [AS_VAR_SET([py_var], [no])])] +- ) +- AS_VAR_IF( +- [py_var], +- [yes], +- [AC_DEFINE([py_define], [1], [Define if you have the '$1' function.])]) +- AS_VAR_POPDEF([py_var]) +- AS_VAR_POPDEF([py_define]) +-]) +- + # For some functions, having a definition is not sufficient, since + # we want to take their address. + PY_CHECK_FUNC([chroot], [#include ]) +@@ -6868,7 +6931,9 @@ PY_STDLIB_MOD([_blake2], + PY_STDLIB_MOD([_crypt], + [], [test "$ac_cv_crypt_crypt" = yes], + [$LIBCRYPT_CFLAGS], [$LIBCRYPT_LIBS]) +-dnl PY_STDLIB_MOD([_ctypes], [], [], [], []) ++PY_STDLIB_MOD([_ctypes], ++ [], [test "$have_libffi" = yes], ++ [$LIBFFI_CFLAGS], [$LIBFFI_LIBS]) + dnl PY_STDLIB_MOD([_curses], [], [], [], []) + dnl PY_STDLIB_MOD([_curses_panel], [], [], [], []) + PY_STDLIB_MOD([_decimal], [], [], [$LIBMPDEC_CFLAGS], [$LIBMPDEC_LDFLAGS]) +@@ -6914,7 +6979,9 @@ PY_STDLIB_MOD([_testbuffer], [test "$TEST_MODULES" = yes]) + PY_STDLIB_MOD([_testimportmultiple], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) + PY_STDLIB_MOD([_testmultiphase], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) + PY_STDLIB_MOD([_xxtestfuzz], [test "$TEST_MODULES" = yes]) +-PY_STDLIB_MOD([_ctypes_test], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes], [], [-lm]) ++PY_STDLIB_MOD([_ctypes_test], ++ [test "$TEST_MODULES" = yes], [test "$have_libffi" = yes -a "$ac_cv_func_dlopen" = yes], ++ [], [$LIBM]) + + dnl Limited API template modules. + dnl The limited C API is not compatible with the Py_TRACE_REFS macro. +diff --git a/pyconfig.h.in b/pyconfig.h.in +index a09652ec15e53..15933e75b1b07 100644 +--- a/pyconfig.h.in ++++ b/pyconfig.h.in +@@ -356,6 +356,15 @@ + /* Define to 1 if you have the `fexecve' function. */ + #undef HAVE_FEXECVE + ++/* Define if you have the 'ffi_closure_alloc' function. */ ++#undef HAVE_FFI_CLOSURE_ALLOC ++ ++/* Define if you have the 'ffi_prep_cif_var' function. */ ++#undef HAVE_FFI_PREP_CIF_VAR ++ ++/* Define if you have the 'ffi_prep_closure_loc' function. */ ++#undef HAVE_FFI_PREP_CLOSURE_LOC ++ + /* Define to 1 if you have the `flock' function. */ + #undef HAVE_FLOCK + +diff --git a/setup.py b/setup.py +index bba344c3af07c..af2800744091c 100644 +--- a/setup.py ++++ b/setup.py +@@ -395,11 +395,6 @@ def remove_disabled(self): + # Remove modules that are present on the disabled list + extensions = [ext for ext in self.extensions + if ext.name not in DISABLED_MODULE_LIST] +- # move ctypes to the end, it depends on other modules +- ext_map = dict((ext.name, i) for i, ext in enumerate(extensions)) +- if "_ctypes" in ext_map: +- ctypes = extensions.pop(ext_map["_ctypes"]) +- extensions.append(ctypes) + self.extensions = extensions + + def update_sources_depends(self): +@@ -600,12 +595,6 @@ def print_three_column(lst): + raise RuntimeError("Failed to build some stdlib modules") + + def build_extension(self, ext): +- +- if ext.name == '_ctypes': +- if not self.configure_ctypes(ext): +- self.failed.append(ext.name) +- return +- + try: + build_ext.build_extension(self, ext) + except (CCompilerError, DistutilsError) as why: +@@ -1370,102 +1359,24 @@ def detect_modules(self): + def detect_tkinter(self): + self.addext(Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'])) + +- def configure_ctypes(self, ext): +- return True +- + def detect_ctypes(self): + # Thomas Heller's _ctypes module ++ src = [ ++ '_ctypes/_ctypes.c', ++ '_ctypes/callbacks.c', ++ '_ctypes/callproc.c', ++ '_ctypes/stgdict.c', ++ '_ctypes/cfield.c', ++ ] ++ malloc_closure = sysconfig.get_config_var( ++ "MODULE__CTYPES_MALLOC_CLOSURE" ++ ) ++ if malloc_closure: ++ src.append(malloc_closure) + +- if (not sysconfig.get_config_var("LIBFFI_INCLUDEDIR") and MACOS): +- self.use_system_libffi = True +- else: +- self.use_system_libffi = '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS") +- +- include_dirs = [] +- extra_compile_args = [] +- extra_link_args = [] +- sources = ['_ctypes/_ctypes.c', +- '_ctypes/callbacks.c', +- '_ctypes/callproc.c', +- '_ctypes/stgdict.c', +- '_ctypes/cfield.c'] +- +- if MACOS: +- sources.append('_ctypes/malloc_closure.c') +- extra_compile_args.append('-DUSING_MALLOC_CLOSURE_DOT_C=1') +- extra_compile_args.append('-DMACOSX') +- include_dirs.append('_ctypes/darwin') +- +- elif HOST_PLATFORM == 'sunos5': +- # XXX This shouldn't be necessary; it appears that some +- # of the assembler code is non-PIC (i.e. it has relocations +- # when it shouldn't. The proper fix would be to rewrite +- # the assembler code to be PIC. +- # This only works with GCC; the Sun compiler likely refuses +- # this option. If you want to compile ctypes with the Sun +- # compiler, please research a proper solution, instead of +- # finding some -z option for the Sun compiler. +- extra_link_args.append('-mimpure-text') +- +- ext = Extension('_ctypes', +- include_dirs=include_dirs, +- extra_compile_args=extra_compile_args, +- extra_link_args=extra_link_args, +- libraries=[], +- sources=sources) +- self.add(ext) +- # function my_sqrt() needs libm for sqrt() ++ self.addext(Extension('_ctypes', src)) + self.addext(Extension('_ctypes_test', ['_ctypes/_ctypes_test.c'])) + +- ffi_inc = sysconfig.get_config_var("LIBFFI_INCLUDEDIR") +- ffi_lib = None +- +- ffi_inc_dirs = self.inc_dirs.copy() +- if MACOS: +- ffi_in_sdk = os.path.join(macosx_sdk_root(), "usr/include/ffi") +- +- if not ffi_inc: +- if os.path.exists(ffi_in_sdk): +- ext.extra_compile_args.append("-DUSING_APPLE_OS_LIBFFI=1") +- ffi_inc = ffi_in_sdk +- ffi_lib = 'ffi' +- else: +- # OS X 10.5 comes with libffi.dylib; the include files are +- # in /usr/include/ffi +- ffi_inc_dirs.append('/usr/include/ffi') +- +- if not ffi_inc: +- found = find_file('ffi.h', [], ffi_inc_dirs) +- if found: +- ffi_inc = found[0] +- if ffi_inc: +- ffi_h = ffi_inc + '/ffi.h' +- if not os.path.exists(ffi_h): +- ffi_inc = None +- print('Header file {} does not exist'.format(ffi_h)) +- if ffi_lib is None and ffi_inc: +- for lib_name in ('ffi', 'ffi_pic'): +- if (self.compiler.find_library_file(self.lib_dirs, lib_name)): +- ffi_lib = lib_name +- break +- +- if ffi_inc and ffi_lib: +- ffi_headers = glob(os.path.join(ffi_inc, '*.h')) +- if grep_headers_for('ffi_prep_cif_var', ffi_headers): +- ext.extra_compile_args.append("-DHAVE_FFI_PREP_CIF_VAR=1") +- if grep_headers_for('ffi_prep_closure_loc', ffi_headers): +- ext.extra_compile_args.append("-DHAVE_FFI_PREP_CLOSURE_LOC=1") +- if grep_headers_for('ffi_closure_alloc', ffi_headers): +- ext.extra_compile_args.append("-DHAVE_FFI_CLOSURE_ALLOC=1") +- +- ext.include_dirs.append(ffi_inc) +- ext.libraries.append(ffi_lib) +- self.use_system_libffi = True +- +- if sysconfig.get_config_var('HAVE_LIBDL'): +- # for dlopen, see bpo-32647 +- ext.libraries.append('dl') +- + def detect_decimal(self): + # Stefan Krah's _decimal module + self.addext( +--- Makefile.pre.in.orig 2023-08-07 20:50:54.600398448 +0200 ++++ Makefile.pre.in 2023-08-07 20:53:37.130317846 +0200 diff --git a/package/python3/0019-Port-readline-and-curses-to-PY_STDLIB_MOD.patch b/package/python3/0019-Port-readline-and-curses-to-PY_STDLIB_MOD.patch new file mode 100644 index 0000000000..43a5eb07ef --- /dev/null +++ b/package/python3/0019-Port-readline-and-curses-to-PY_STDLIB_MOD.patch @@ -0,0 +1,718 @@ +From e925241d95d8095adf67f492042f97254ff82ec1 Mon Sep 17 00:00:00 2001 +From: Christian Heimes +Date: Wed, 6 Jul 2022 11:56:25 +0200 +Subject: [PATCH] gh-90005: Port readline and curses to PY_STDLIB_MOD + (GH-94452) + +Co-authored-by: Erlend Egeberg Aasland + +Upstream: https://github.com/python/cpython/commit/e925241d95d8095adf67f492042f97254ff82ec1 + +[Bernd: backported to 3.11.4] +Signed-off-by: Bernd Kuhls +--- + ...2-06-30-17-18-23.gh-issue-90005.EIOOla.rst | 5 + + Modules/Setup.stdlib.in | 12 +- + configure | 1977 ++++++++++++++--- + configure.ac | 388 +++- + pyconfig.h.in | 17 +- + setup.py | 146 +- + 6 files changed, 2015 insertions(+), 530 deletions(-) + create mode 100644 Misc/NEWS.d/next/Build/2022-06-30-17-18-23.gh-issue-90005.EIOOla.rst + +diff --git a/Misc/NEWS.d/next/Build/2022-06-30-17-18-23.gh-issue-90005.EIOOla.rst b/Misc/NEWS.d/next/Build/2022-06-30-17-18-23.gh-issue-90005.EIOOla.rst +new file mode 100644 +index 0000000000000..90a2dd486c195 +--- /dev/null ++++ b/Misc/NEWS.d/next/Build/2022-06-30-17-18-23.gh-issue-90005.EIOOla.rst +@@ -0,0 +1,5 @@ ++Dependencies of :mod:`readline` and :mod:`curses` module are now detected in ++``configure`` script with ``pkg-config``. Only ``ncurses`` / ``ncursesw`` ++are detected automatically. The old ``curses`` library is not configured ++automatically. Workaround for missing ``termcap`` or ``tinfo`` library ++has been removed. +diff --git a/Modules/Setup.stdlib.in b/Modules/Setup.stdlib.in +index ad34f85e25451..7357aacd7267a 100644 +--- a/Modules/Setup.stdlib.in ++++ b/Modules/Setup.stdlib.in +@@ -72,8 +72,8 @@ + # gdbm module needs -lgdbm + @MODULE__GDBM_TRUE@_gdbm _gdbmmodule.c + +-# needs -lreadline or -leditline, sometimes termcap, termlib, or tinfo +-#@MODULE_READLINE_TRUE@readline readline.c ++# needs -lreadline or -ledit, sometimes termcap, termlib, or tinfo ++@MODULE_READLINE_TRUE@readline readline.c + + # hashing builtins, can be disabled with --without-builtin-hashlib-hashes + @MODULE__MD5_TRUE@_md5 md5module.c +@@ -138,10 +138,10 @@ + # needs -lffi and -ldl + @MODULE__CTYPES_TRUE@_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c @MODULE__CTYPES_MALLOC_CLOSURE@ + +-# needs -lncurses, -lncursesw or -lcurses, sometimes -ltermcap +-#@MODULE__CURSES_TRUE@_curses _cursesmodule.c +-# needs -lncurses and -lpanel +-#@MODULE__CURSES_PANEL_TRUE@_curses_panel _curses_panel.c ++# needs -lncurses[w], sometimes -ltermcap/tinfo ++@MODULE__CURSES_TRUE@_curses _cursesmodule.c ++# needs -lncurses[w] and -lpanel[w] ++@MODULE__CURSES_PANEL_TRUE@_curses_panel _curses_panel.c + + @MODULE__SQLITE3_TRUE@_sqlite3 _sqlite/blob.c _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c + +diff --git a/configure.ac b/configure.ac +index b03ead3bdefa0..42e181bca9dac 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5780,127 +5780,169 @@ then + [Define this if you have flockfile(), getc_unlocked(), and funlockfile()]) + fi + +-AC_ARG_WITH([readline], +- [AS_HELP_STRING([--with(out)-readline@<:@=editline@:>@], +- [use Editline for backend or disable readline module])], +- [], +- [with_readline=yes]) ++dnl Check for libreadline and libedit ++dnl - libreadline provides "readline/readline.h" header and "libreadline" ++dnl shared library. pkg-config file is readline.pc ++dnl - libedit provides "editline/readline.h" header and "libedit" shared ++dnl library. pkg-config file ins libedit.pc ++dnl - editline is not supported ("readline.h" and "libeditline" shared library) ++dnl ++dnl NOTE: In the past we checked if readline needs an additional termcap ++dnl library (tinfo ncursesw ncurses termcap). We now assume that libreadline ++dnl or readline.pc provide correct linker information. + +-# check where readline lives +-py_cv_lib_readline=no +-# save the value of LIBS so we don't actually link Python with readline +-LIBS_no_readline=$LIBS ++AH_TEMPLATE([WITH_EDITLINE], [Define to build the readline module against libedit.]) + +-if test "$with_readline" != no; then +- case "$with_readline" in +- editline|edit) +- LIBREADLINE=edit +- AC_DEFINE(WITH_EDITLINE, 1, +- [Define to build the readline module against Editline.]) +- ;; +- yes|readline) ++AC_ARG_WITH( ++ [readline], ++ [AS_HELP_STRING([--with(out)-readline@<:@=editline|readline|no@:>@], ++ [use libedit for backend or disable readline module])], ++ [ ++ AS_CASE([$with_readline], ++ [editline|edit], [with_readline=edit], ++ [yes|readline], [with_readline=readline], ++ [no], [], ++ [AC_MSG_ERROR([proper usage is --with(out)-readline@<:@=editline|readline|no@:>@])] ++ ) ++ ], ++ [with_readline=readline] ++) ++ ++AS_VAR_IF([with_readline], [readline], [ ++ PKG_CHECK_MODULES([LIBREADLINE], [readline], [ + LIBREADLINE=readline +- ;; +- *) +- AC_MSG_ERROR([proper usage is --with(out)-readline@<:@=editline@:>@]) +- ;; +- esac ++ READLINE_CFLAGS=$LIBREADLINE_CFLAGS ++ READLINE_LIBS=$LIBREADLINE_LIBS ++ ], [ ++ AC_CHECK_HEADERS([readline/readline.h], [ ++ WITH_SAVE_ENV([ ++ AC_CHECK_LIB([readline], [readline], [ ++ LIBREADLINE=readline ++ READLINE_CFLAGS=${LIBREADLINE_CFLAGS-""} ++ READLINE_LIBS=${LIBREADLINE_LIBS-"-lreadline"} ++ ], [ ++ with_readline=no ++ ]) ++ ]) ++ ], [with_readline=no]) ++ ]) ++]) + +- # On some systems we need to link readline to a termcap compatible +- # library. NOTE: Keep the precedence of listed libraries synchronised +- # with setup.py. +- AC_MSG_CHECKING([how to link readline libs]) +- for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do +- if test -z "$py_libtermcap"; then +- READLINE_LIBS="-l$LIBREADLINE" +- else +- READLINE_LIBS="-l$LIBREADLINE -l$py_libtermcap" +- fi +- LIBS="$READLINE_LIBS $LIBS_no_readline" +- AC_LINK_IFELSE( +- [AC_LANG_CALL([],[readline])], +- [py_cv_lib_readline=yes]) +- if test $py_cv_lib_readline = yes; then +- break +- fi +- done ++AS_VAR_IF([with_readline], [edit], [ ++ PKG_CHECK_MODULES([LIBEDIT], [libedit], [ ++ AC_DEFINE([WITH_EDITLINE], [1]) ++ LIBREADLINE=edit ++ READLINE_CFLAGS=$LIBEDIT_CFLAGS ++ READLINE_LIBS=$LIBEDIT_LIBS ++ ], [ ++ AC_CHECK_HEADERS([editline/readline.h], [ ++ WITH_SAVE_ENV([ ++ AC_CHECK_LIB([edit], [readline], [ ++ LIBREADLINE=edit ++ AC_DEFINE([WITH_EDITLINE], [1]) ++ READLINE_CFLAGS=${LIBEDIT_CFLAGS-""} ++ READLINE_LIBS=${LIBEDIT_LIBS-"-ledit"} ++ ], [ ++ with_readline=no ++ ]) ++ ]) ++ ], [with_readline=no]) ++ ]) ++]) + +- # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts +- #AC_SUBST([READLINE_LIBS]) +- if test $py_cv_lib_readline = no; then +- AC_MSG_RESULT([none]) +- else +- AC_MSG_RESULT([$READLINE_LIBS]) +- AC_DEFINE(HAVE_LIBREADLINE, 1, +- [Define to build the readline module.]) +- fi +-fi + +-if test "$py_cv_lib_readline" = yes; then +- # check for readline 2.2 +- AC_CHECK_DECL(rl_completion_append_character, +- AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1, +- [Define if you have readline 2.2]),, +- [ +-#include /* Must be first for Gnu Readline */ +-#ifdef WITH_EDITLINE +-# include +-#else +-# include +-#endif ++AC_MSG_CHECKING([how to link readline]) ++AS_VAR_IF([with_readline], [no], [ ++ AC_MSG_RESULT([no]) ++], [ ++ AC_MSG_RESULT([$with_readline (CFLAGS: $READLINE_CFLAGS, LIBS: $READLINE_LIBS)]) ++ ++ WITH_SAVE_ENV([ ++ CPPFLAGS="$READLINE_CFLAGS $CFLAGS" ++ LIBS="$READLINE_LIBS $LIBS" ++ LIBS_SAVE=$LIBS ++ ++ m4_define([readline_includes], [ ++ #include /* Must be first for Gnu Readline */ ++ #ifdef WITH_EDITLINE ++ # include ++ #else ++ # include ++ # include ++ #endif + ]) +- AC_CHECK_DECL(rl_completion_suppress_append, +- AC_DEFINE(HAVE_RL_COMPLETION_SUPPRESS_APPEND, 1, +- [Define if you have rl_completion_suppress_append]),, +- [ +-#include /* Must be first for Gnu Readline */ +-#ifdef WITH_EDITLINE +-# include +-#else +-# include +-#endif ++ ++ # check for readline 2.2 ++ AC_CHECK_DECL([rl_completion_append_character], [ ++ AC_DEFINE([HAVE_RL_COMPLETION_APPEND_CHARACTER], [1], [Define if you have readline 2.2]) ++ ], [], [readline_includes]) ++ ++ AC_CHECK_DECL([rl_completion_suppress_append], [ ++ AC_DEFINE([HAVE_RL_COMPLETION_SUPPRESS_APPEND], [1], [Define if you have rl_completion_suppress_append]) ++ ], [], [readline_includes]) ++ ++ # check for readline 4.0 ++ AC_CACHE_CHECK([for rl_pre_input_hook in -l$LIBREADLINE], [ac_cv_readline_rl_pre_input_hook], [ ++ AC_LINK_IFELSE( ++ [AC_LANG_PROGRAM([readline_includes], [void *x = rl_pre_input_hook])], ++ [ac_cv_readline_rl_pre_input_hook=yes], [ac_cv_readline_rl_pre_input_hook=no] ++ ) ++ ]) ++ AS_VAR_IF([ac_cv_readline_rl_pre_input_hook], [yes], [ ++ AC_DEFINE([HAVE_RL_PRE_INPUT_HOOK], [1], [Define if you have readline 4.0]) + ]) + +- # check for readline 4.0 +- AC_CHECK_LIB($LIBREADLINE, rl_pre_input_hook, +- AC_DEFINE(HAVE_RL_PRE_INPUT_HOOK, 1, +- [Define if you have readline 4.0]),,$READLINE_LIBS) +- +- # also in 4.0 +- AC_CHECK_LIB($LIBREADLINE, rl_completion_display_matches_hook, +- AC_DEFINE(HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK, 1, +- [Define if you have readline 4.0]),,$READLINE_LIBS) +- +- # also in 4.0, but not in editline +- AC_CHECK_LIB($LIBREADLINE, rl_resize_terminal, +- AC_DEFINE(HAVE_RL_RESIZE_TERMINAL, 1, +- [Define if you have readline 4.0]),,$READLINE_LIBS) +- +- # check for readline 4.2 +- AC_CHECK_LIB($LIBREADLINE, rl_completion_matches, +- AC_DEFINE(HAVE_RL_COMPLETION_MATCHES, 1, +- [Define if you have readline 4.2]),,$READLINE_LIBS) +- +- # also in readline 4.2 +- AC_CHECK_DECL(rl_catch_signals, +- AC_DEFINE(HAVE_RL_CATCH_SIGNAL, 1, +- [Define if you can turn off readline's signal handling.]),, +- [ +-#include /* Must be first for Gnu Readline */ +-#ifdef WITH_EDITLINE +-# include +-#else +-# include +-#endif ++ # also in 4.0 ++ AC_CACHE_CHECK([for rl_completion_display_matches_hook in -l$LIBREADLINE], [ac_cv_readline_rl_completion_display_matches_hook], [ ++ AC_LINK_IFELSE( ++ [AC_LANG_PROGRAM([readline_includes], [void *x = rl_completion_display_matches_hook])], ++ [ac_cv_readline_rl_completion_display_matches_hook=yes], [ac_cv_readline_rl_completion_display_matches_hook=no] ++ ) ++ ]) ++ AS_VAR_IF([ac_cv_readline_rl_completion_display_matches_hook], [yes], [ ++ AC_DEFINE([HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK], [1], [Define if you have readline 4.0]) + ]) + +- AC_CHECK_LIB($LIBREADLINE, append_history, +- AC_DEFINE(HAVE_RL_APPEND_HISTORY, 1, +- [Define if readline supports append_history]),,$READLINE_LIBS) +-fi ++ # also in 4.0, but not in editline ++ AC_CACHE_CHECK([for rl_resize_terminal in -l$LIBREADLINE], [ac_cv_readline_rl_resize_terminal], [ ++ AC_LINK_IFELSE( ++ [AC_LANG_PROGRAM([readline_includes], [void *x = rl_resize_terminal])], ++ [ac_cv_readline_rl_resize_terminal=yes], [ac_cv_readline_rl_resize_terminal=no] ++ ) ++ ]) ++ AS_VAR_IF([ac_cv_readline_rl_resize_terminal], [yes], [ ++ AC_DEFINE([HAVE_RL_RESIZE_TERMINAL], [1], [Define if you have readline 4.0]) ++ ]) + +-# End of readline checks: restore LIBS +-LIBS=$LIBS_no_readline ++ # check for readline 4.2 ++ AC_CACHE_CHECK([for rl_completion_matches in -l$LIBREADLINE], [ac_cv_readline_rl_completion_matches], [ ++ AC_LINK_IFELSE( ++ [AC_LANG_PROGRAM([readline_includes], [void *x = rl_completion_matches])], ++ [ac_cv_readline_rl_completion_matches=yes], [ac_cv_readline_rl_completion_matches=no] ++ ) ++ ]) ++ AS_VAR_IF([ac_cv_readline_rl_completion_matches], [yes], [ ++ AC_DEFINE([HAVE_RL_COMPLETION_MATCHES], [1], [Define if you have readline 4.2]) ++ ]) ++ ++ # also in readline 4.2 ++ AC_CHECK_DECL([rl_catch_signals], [ ++ AC_DEFINE([HAVE_RL_CATCH_SIGNAL], [1], [Define if you can turn off readline's signal handling.]) ++ ], [], [readline_includes]) ++ ++ AC_CACHE_CHECK([for append_history in -l$LIBREADLINE], [ac_cv_readline_append_history], [ ++ AC_LINK_IFELSE( ++ [AC_LANG_PROGRAM([readline_includes], [void *x = append_history])], ++ [ac_cv_readline_append_history=yes], [ac_cv_readline_append_history=no] ++ ) ++ ]) ++ AS_VAR_IF([ac_cv_readline_append_history], [yes], [ ++ AC_DEFINE([HAVE_RL_APPEND_HISTORY], [1], [Define if readline supports append_history]) ++ ]) ++ ++ m4_undefine([readline_includes]) ++ ])dnl WITH_SAVE_ENV() ++]) + + AC_CACHE_CHECK([for broken nice()], [ac_cv_broken_nice], [ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +@@ -6056,14 +6098,124 @@ then + [Define if you have struct stat.st_mtimensec]) + fi + ++dnl check for ncurses/ncursesw and panel/panelw ++dnl NOTE: old curses is not detected. ++dnl have_curses=[no, ncursesw, ncurses] ++dnl have_panel=[no, panelw, panel] ++have_curses=no ++have_panel=no ++ ++AH_TEMPLATE([HAVE_NCURSESW], [Define to 1 if you have the `ncursesw' library.]) ++AC_CHECK_HEADERS([curses.h ncurses.h]) ++ ++AS_VAR_IF([ac_cv_header_ncurses_h], [yes], [ ++ if test "$ac_sys_system" != "Darwin"; then ++ dnl On macOS, there is no separate /usr/lib/libncursesw nor libpanelw. ++ PKG_CHECK_MODULES([CURSES], [ncursesw], [ ++ have_curses=ncursesw ++ ], [ ++ WITH_SAVE_ENV([ ++ AC_CHECK_LIB([ncursesw], [initscr], [ ++ AC_DEFINE([HAVE_NCURSESW], [1]) ++ have_curses=ncursesw ++ CURSES_CFLAGS=${CURSES_CFLAGS-""} ++ CURSES_LIBS=${CURSES_LIBS-"-lncursesw"} ++ ]) ++ ]) ++ ]) ++ fi ++ ++ AS_VAR_IF([have_curses], [no], [ ++ PKG_CHECK_MODULES([CURSES], [ncurses], [ ++ have_curses=ncurses ++ ], [ ++ WITH_SAVE_ENV([ ++ AC_CHECK_LIB([ncurses], [initscr], [ ++ have_curses=ncurses ++ CURSES_CFLAGS=${CURSES_CFLAGS-""} ++ CURSES_LIBS=${CURSES_LIBS-"-lncurses"} ++ ]) ++ ]) ++ ]) ++ ]) ++ ++])dnl ac_cv_header_ncurses_h = yes ++ ++dnl remove _XOPEN_SOURCE macro from curses cflags. pyconfig.h sets ++dnl the macro to 700. ++CURSES_CFLAGS=$(echo $CURSES_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//') ++ ++if test "$have_curses" = no -a "$ac_sys_system" = "Darwin"; then ++ dnl On macOS, there is no separate /usr/lib/libncursesw nor libpanelw. ++ dnl If we are here, we found a locally-supplied version of libncursesw. ++ dnl There should also be a libpanelw. ++ dnl _XOPEN_SOURCE defines are usually excluded for macOS, but we need ++ dnl _XOPEN_SOURCE_EXTENDED here for ncurses wide char support. ++ ++ AS_VAR_APPEND([CURSES_CFLAGS], [" -D_XOPEN_SOURCE_EXTENDED=1"]) ++ AC_DEFINE([HAVE_NCURSESW], [1]) ++fi ++ ++dnl TODO: detect "curses" and special cases tinfo, terminfo, or termcap ++ ++AC_MSG_CHECKING([curses module flags]) ++AS_VAR_IF([have_curses], [no], [ ++ AC_MSG_RESULT([no]) ++], [ ++ AC_MSG_RESULT([$have_curses (CFLAGS: $CURSES_CFLAGS, LIBS: $CURSES_LIBS)]) ++]) ++ ++dnl check for ncurses' panel/panelw library ++AC_CHECK_HEADERS([panel.h]) ++ ++AS_VAR_IF([ac_cv_header_panel_h], [yes], [ ++ ++ if test "$ac_sys_system" != "Darwin"; then ++ dnl On macOS, there is no separate /usr/lib/libncursesw nor libpanelw. ++ AS_VAR_IF([have_curses], [ncursesw], [ ++ PKG_CHECK_MODULES([PANEL], [panelw], [ ++ have_panel=panelw ++ ], [ ++ WITH_SAVE_ENV([ ++ AC_CHECK_LIB([panelw], [update_panels], [ ++ have_panel=panelw ++ PANEL_CFLAGS=${PANEL_CFLAGS-""} ++ PANEL_LIBS=${PANEL_LIBS-"-lpanelw"} ++ ]) ++ ]) ++ ]) ++ ]) ++ fi ++ ++ AS_VAR_IF([have_curses], [ncurses], [ ++ PKG_CHECK_MODULES([PANEL], [panel], [ ++ have_panel=panel ++ ], [ ++ WITH_SAVE_ENV([ ++ AC_CHECK_LIB([panel], [update_panels], [ ++ have_panel=panel ++ PANEL_CFLAGS=${PANEL_CFLAGS-""} ++ PANEL_LIBS=${PANEL_LIBS-"-lpanel"} ++ ]) ++ ]) ++ ]) ++ ]) ++ ++])dnl ac_cv_header_panel_h = yes ++ ++AC_MSG_CHECKING([panel flags]) ++AS_VAR_IF([have_panel], [no], [ ++ AC_MSG_RESULT([no]) ++], [ ++ AC_MSG_RESULT([$have_panel (CFLAGS: $PANEL_CFLAGS, LIBS: $PANEL_LIBS)]) ++]) ++ + # first curses header check + ac_save_cppflags="$CPPFLAGS" + if test "$cross_compiling" = no; then + CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" + fi + +-AC_CHECK_HEADERS(curses.h ncurses.h) +- + # On Solaris, term.h requires curses.h + AC_CHECK_HEADERS(term.h,,,[ + #ifdef HAVE_CURSES_H +@@ -6985,8 +7137,14 @@ PY_STDLIB_MOD([_crypt], + PY_STDLIB_MOD([_ctypes], + [], [test "$have_libffi" = yes], + [$LIBFFI_CFLAGS], [$LIBFFI_LIBS]) +-dnl PY_STDLIB_MOD([_curses], [], [], [], []) +-dnl PY_STDLIB_MOD([_curses_panel], [], [], [], []) ++PY_STDLIB_MOD([_curses], ++ [], [test "$have_curses" != "no"], ++ [$CURSES_CFLAGS], [$CURSES_LIBS] ++) ++PY_STDLIB_MOD([_curses_panel], ++ [], [test "$have_panel" != "no"], ++ [$PANEL_CFLAGS $CURSES_CFLAGS], [$PANEL_LIBS $CURSES_LIBS] ++) + PY_STDLIB_MOD([_decimal], [], [], [$LIBMPDEC_CFLAGS], [$LIBMPDEC_LDFLAGS]) + PY_STDLIB_MOD([_dbm], + [test -n "$with_dbmliborder"], [test "$have_dbm" != "no"], +@@ -6997,7 +7155,9 @@ PY_STDLIB_MOD([_gdbm], + PY_STDLIB_MOD([nis], + [], [test "$have_nis" = yes -a "$ac_cv_header_rpc_rpc_h" = yes], + [$LIBNSL_CFLAGS], [$LIBNSL_LIBS]) +-dnl PY_STDLIB_MOD([readline], [], [], [], []) ++ PY_STDLIB_MOD([readline], ++ [], [test "$with_readline" != "no"], ++ [$READLINE_CFLAGS], [$READLINE_LIBS]) + PY_STDLIB_MOD([_sqlite3], + [test "$have_sqlite3" = "yes"], + [test "$have_supported_sqlite3" = "yes"], +diff --git a/pyconfig.h.in b/pyconfig.h.in +index b05ddd41c2bba..aa9fc559fa251 100644 +--- a/pyconfig.h.in ++++ b/pyconfig.h.in +@@ -290,6 +290,9 @@ + /* Defined when any dynamic module loading is enabled. */ + #undef HAVE_DYNAMIC_LOADING + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_EDITLINE_READLINE_H ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_ENDIAN_H + +@@ -646,9 +649,6 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_LIBINTL_H + +-/* Define to build the readline module. */ +-#undef HAVE_LIBREADLINE +- + /* Define to 1 if you have the `resolv' library (-lresolv). */ + #undef HAVE_LIBRESOLV + +@@ -784,6 +784,9 @@ + /* Define to 1 if you have the `nanosleep' function. */ + #undef HAVE_NANOSLEEP + ++/* Define to 1 if you have the `ncursesw' library. */ ++#undef HAVE_NCURSESW ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_NCURSES_H + +@@ -821,6 +824,9 @@ + /* Define to 1 if you have the `openpty' function. */ + #undef HAVE_OPENPTY + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_PANEL_H ++ + /* Define to 1 if you have the `pathconf' function. */ + #undef HAVE_PATHCONF + +@@ -905,6 +911,9 @@ + /* Define to 1 if you have the `pwritev2' function. */ + #undef HAVE_PWRITEV2 + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_READLINE_READLINE_H ++ + /* Define to 1 if you have the `readlink' function. */ + #undef HAVE_READLINK + +@@ -1662,7 +1671,7 @@ + Dyld is necessary to support frameworks. */ + #undef WITH_DYLD + +-/* Define to build the readline module against Editline. */ ++/* Define to build the readline module against libedit. */ + #undef WITH_EDITLINE + + /* Define if you want to compile in object freelists optimization */ +diff --git a/setup.py b/setup.py +index cc11dedee1b2e..2edcb08b4fd7f 100644 +--- a/setup.py ++++ b/setup.py +@@ -1027,146 +1027,9 @@ + )) + + def detect_readline_curses(self): +- # readline +- readline_termcap_library = "" +- curses_library = "" +- # Cannot use os.popen here in py3k. +- tmpfile = os.path.join(self.build_temp, 'readline_termcap_lib') +- if not os.path.exists(self.build_temp): +- os.makedirs(self.build_temp) +- # Determine if readline is already linked against curses or tinfo. +- if sysconfig.get_config_var('HAVE_LIBREADLINE'): +- if sysconfig.get_config_var('WITH_EDITLINE'): +- readline_lib = 'edit' +- else: +- readline_lib = 'readline' +- do_readline = self.compiler.find_library_file(self.lib_dirs, +- readline_lib) +- if CROSS_COMPILING: +- ret = run_command("%s -d %s | grep '(NEEDED)' > %s" +- % (sysconfig.get_config_var('READELF'), +- do_readline, tmpfile)) +- elif find_executable('ldd'): +- ret = run_command("ldd %s > %s" % (do_readline, tmpfile)) +- else: +- ret = 1 +- if ret == 0: +- with open(tmpfile) as fp: +- for ln in fp: +- if 'curses' in ln: +- readline_termcap_library = re.sub( +- r'.*lib(n?cursesw?)\.so.*', r'\1', ln +- ).rstrip() +- break +- # termcap interface split out from ncurses +- if 'tinfo' in ln: +- readline_termcap_library = 'tinfo' +- break +- if os.path.exists(tmpfile): +- os.unlink(tmpfile) +- else: +- do_readline = False +- # Issue 7384: If readline is already linked against curses, +- # use the same library for the readline and curses modules. +- if 'curses' in readline_termcap_library: +- curses_library = readline_termcap_library +- elif self.compiler.find_library_file(self.lib_dirs, 'ncursesw'): +- curses_library = 'ncursesw' +- # Issue 36210: OSS provided ncurses does not link on AIX +- # Use IBM supplied 'curses' for successful build of _curses +- elif AIX and self.compiler.find_library_file(self.lib_dirs, 'curses'): +- curses_library = 'curses' +- elif self.compiler.find_library_file(self.lib_dirs, 'ncurses'): +- curses_library = 'ncurses' +- elif self.compiler.find_library_file(self.lib_dirs, 'curses'): +- curses_library = 'curses' +- +- if MACOS: +- os_release = int(os.uname()[2].split('.')[0]) +- dep_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') +- if (dep_target and +- (tuple(int(n) for n in dep_target.split('.')[0:2]) +- < (10, 5) ) ): +- os_release = 8 +- if os_release < 9: +- # MacOSX 10.4 has a broken readline. Don't try to build +- # the readline module unless the user has installed a fixed +- # readline package +- if find_file('readline/rlconf.h', self.inc_dirs, []) is None: +- do_readline = False +- if do_readline: +- readline_libs = [readline_lib] +- if readline_termcap_library: +- pass # Issue 7384: Already linked against curses or tinfo. +- elif curses_library: +- readline_libs.append(curses_library) +- elif self.compiler.find_library_file(self.lib_dirs, 'termcap'): +- readline_libs.append('termcap') +- self.add(Extension('readline', ['readline.c'], +- libraries=readline_libs)) +- else: +- self.missing.append('readline') +- +- # Curses support, requiring the System V version of curses, often +- # provided by the ncurses library. +- curses_defines = [] +- curses_includes = [] +- panel_library = 'panel' +- if curses_library == 'ncursesw': +- curses_defines.append(('HAVE_NCURSESW', '1')) +- if not CROSS_COMPILING: +- curses_includes.append('/usr/include/ncursesw') +- # Bug 1464056: If _curses.so links with ncursesw, +- # _curses_panel.so must link with panelw. +- panel_library = 'panelw' +- if MACOS: +- # On OS X, there is no separate /usr/lib/libncursesw nor +- # libpanelw. If we are here, we found a locally-supplied +- # version of libncursesw. There should also be a +- # libpanelw. _XOPEN_SOURCE defines are usually excluded +- # for OS X but we need _XOPEN_SOURCE_EXTENDED here for +- # ncurses wide char support +- curses_defines.append(('_XOPEN_SOURCE_EXTENDED', '1')) +- elif MACOS and curses_library == 'ncurses': +- # Building with the system-suppied combined libncurses/libpanel +- curses_defines.append(('HAVE_NCURSESW', '1')) +- curses_defines.append(('_XOPEN_SOURCE_EXTENDED', '1')) +- +- curses_enabled = True +- if curses_library.startswith('ncurses'): +- curses_libs = [curses_library] +- self.add(Extension('_curses', ['_cursesmodule.c'], +- include_dirs=curses_includes, +- define_macros=curses_defines, +- libraries=curses_libs)) +- elif curses_library == 'curses' and not MACOS: +- # OSX has an old Berkeley curses, not good enough for +- # the _curses module. +- if (self.compiler.find_library_file(self.lib_dirs, 'terminfo')): +- curses_libs = ['curses', 'terminfo'] +- elif (self.compiler.find_library_file(self.lib_dirs, 'termcap')): +- curses_libs = ['curses', 'termcap'] +- else: +- curses_libs = ['curses'] +- +- self.add(Extension('_curses', ['_cursesmodule.c'], +- define_macros=curses_defines, +- libraries=curses_libs)) +- else: +- curses_enabled = False +- self.missing.append('_curses') +- +- # If the curses module is enabled, check for the panel module +- # _curses_panel needs some form of ncurses +- skip_curses_panel = True if AIX else False +- if (curses_enabled and not skip_curses_panel and +- self.compiler.find_library_file(self.lib_dirs, panel_library)): +- self.add(Extension('_curses_panel', ['_curses_panel.c'], +- include_dirs=curses_includes, +- define_macros=curses_defines, +- libraries=[panel_library, *curses_libs])) +- elif not skip_curses_panel: +- self.missing.append('_curses_panel') ++ self.addext(Extension('readline', ['readline.c'])) ++ self.addext(Extension('_curses', ['_cursesmodule.c'])) ++ self.addext(Extension('_curses_panel', ['_curses_panel.c'])) + + def detect_crypt(self): + self.addext(Extension('_crypt', ['_cryptmodule.c'])) diff --git a/package/python3/0024-Add-an-option-to-disable-the-readline-module.patch b/package/python3/0024-Add-an-option-to-disable-the-readline-module.patch deleted file mode 100644 index 9250007dae..0000000000 --- a/package/python3/0024-Add-an-option-to-disable-the-readline-module.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 9082468ca620db77b670ccf568a96bbabb865f80 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Tue, 7 Mar 2017 23:29:05 +0100 -Subject: [PATCH] Add an option to disable the readline module - -Signed-off-by: Thomas Petazzoni ---- - configure.ac | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 42fe6c8f5a..19875d7d30 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4225,6 +4225,12 @@ AC_ARG_ENABLE(openssl, - DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ssl _ssl _hashlib" - fi]) - -+AC_ARG_ENABLE(readline, -+ AS_HELP_STRING([--disable-readline], [disable readline]), -+ [ if test "$enableval" = "no"; then -+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} readline" -+ fi]) -+ - AC_SUBST(TK) - AC_ARG_ENABLE(tk, - AS_HELP_STRING([--disable-tk], [disable tk]), --- -2.34.1 - diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 2a552cd0f4..3093ae0fab 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -25,7 +25,6 @@ HOST_PYTHON3_CONF_OPTS += \ --disable-sqlite3 \ --disable-tk \ --with-expat=system \ - --disable-curses \ --disable-codecs-cjk \ --disable-nis \ --enable-unicodedata \ @@ -40,6 +39,8 @@ HOST_PYTHON3_CONF_OPTS += \ # communicate over the network during the build. HOST_PYTHON3_CONF_ENV += \ LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags" \ + py_cv_module__curses=n/a \ + py_cv_module__curses_panel=n/a \ py_cv_module__uuid=n/a \ ac_cv_prog_HAS_HG=/bin/false @@ -79,15 +80,18 @@ PYTHON3_CONF_ENV += py_cv_module__dbm=n/a endif ifeq ($(BR2_PACKAGE_PYTHON3_READLINE),y) +PYTHON3_CONF_OPTS += --with-readline PYTHON3_DEPENDENCIES += readline else -PYTHON3_CONF_OPTS += --disable-readline +PYTHON3_CONF_OPTS += --without-readline endif ifeq ($(BR2_PACKAGE_PYTHON3_CURSES),y) PYTHON3_DEPENDENCIES += ncurses else -PYTHON3_CONF_OPTS += --disable-curses +PYTHON3_CONF_ENV += \ + py_cv_module__curses=n/a \ + py_cv_module__curses_panel=n/a endif ifeq ($(BR2_PACKAGE_PYTHON3_DECIMAL),y) From patchwork Tue Aug 8 18:50:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1818866 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RL2PZ28qmz1yfM for ; Wed, 9 Aug 2023 04:52:50 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 6B5EF82112; Tue, 8 Aug 2023 18:52:48 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 6B5EF82112 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NtX_IGM2ssWP; Tue, 8 Aug 2023 18:52:47 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 845358209C; Tue, 8 Aug 2023 18:52:45 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 845358209C X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id CBEEC1BF330 for ; Tue, 8 Aug 2023 18:52:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id A6224820EF for ; Tue, 8 Aug 2023 18:52:37 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A6224820EF X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ApTqwPOmQT3o for ; Tue, 8 Aug 2023 18:52:37 +0000 (UTC) Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp1.osuosl.org (Postfix) with ESMTPS id EE51F820D3 for ; Tue, 8 Aug 2023 18:52:36 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org EE51F820D3 Received: from fli4l.lan.fli4l (p4fd6c649.dip0.t-ipconnect.de [79.214.198.73]) by dd20012.kasserver.com (Postfix) with ESMTPSA id 0ACBEA4C1101; Tue, 8 Aug 2023 20:51:10 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:48850) by fli4l.lan.fli4l with esmtp (Exim 4.96) (envelope-from ) id 1qTRnR-0005AS-2U; Tue, 08 Aug 2023 20:51:09 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 8 Aug 2023 20:50:59 +0200 Message-Id: <20230808185108.3787835-8-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808185108.3787835-1-bernd@kuhls.net> References: <20230808185108.3787835-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: / X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202306131828; t=1691520670; bh=yaWmbvRDEYMhr7nChSTn2eiHeuv7GEsCPWMrEjutbkw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F/FT2sbRUCnH+NgIXpDhx4496VoxtGlG50a7NRF90TA8EDI7rYIdytiHEb8Fyg36a ldO8ypSggKyMsCig1V+wjdXAiXRHCsA0gdxl9x6P4t3ahEDyqyZysJJR9scCiLyNXU WStwN2/kZUjCbU15zz9ebr0PtOeUoXG0IoqgsBZ7eKJBeKcvWerA3e5G0HWj7mkkBH C5inl/oBUlcE+4DgshTNTq93OjOhYCCsV0OgWUovJv9UxwWaqXA2euYRhZBMziqJ1a C/cro/y1JCOjtEcrPcU0DQdoC/ypvEn4K4AZebfGkfnhGBNK/1zvkJdWvxnELa0uuk PKnm2xokbHcug== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202306131828 header.b=F/FT2sbR Subject: [Buildroot] [PATCH/next 07/16] package/python3: use upstream build system to disable ssl module X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Signed-off-by: Bernd Kuhls --- ...an-option-to-disable-openssl-support.patch | 30 ------------------- package/python3/python3.mk | 8 +++-- 2 files changed, 6 insertions(+), 32 deletions(-) delete mode 100644 package/python3/0023-Add-an-option-to-disable-openssl-support.patch diff --git a/package/python3/0023-Add-an-option-to-disable-openssl-support.patch b/package/python3/0023-Add-an-option-to-disable-openssl-support.patch deleted file mode 100644 index d4c9fd43be..0000000000 --- a/package/python3/0023-Add-an-option-to-disable-openssl-support.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 25c900e81a2fc0bbe35e7c94e2e5028cfbf6582a Mon Sep 17 00:00:00 2001 -From: Nicolas Cavallari -Date: Wed, 22 Feb 2017 17:55:59 -0800 -Subject: [PATCH] Add an option to disable openssl support. - -Signed-off-by: Nicolas Cavallari ---- - configure.ac | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/configure.ac b/configure.ac -index db33d567ad..42fe6c8f5a 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4219,6 +4219,12 @@ AC_ARG_ENABLE(unicodedata, - DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} unicodedata" - fi]) - -+AC_ARG_ENABLE(openssl, -+ AS_HELP_STRING([--disable-openssl], [disable openssl support]), -+ [ if test "$enableval" = "no"; then -+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ssl _ssl _hashlib" -+ fi]) -+ - AC_SUBST(TK) - AC_ARG_ENABLE(tk, - AS_HELP_STRING([--disable-tk], [disable tk]), --- -2.34.1 - diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 3093ae0fab..596bf44b56 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -62,7 +62,9 @@ endif ifeq ($(BR2_PACKAGE_HOST_PYTHON3_SSL),y) HOST_PYTHON3_DEPENDENCIES += host-openssl else -HOST_PYTHON3_CONF_OPTS += --disable-openssl +HOST_PYTHON3_CONF_ENV += \ + py_cv_module__hashlib=n/a \ + py_cv_module__ssl=n/a endif PYTHON3_INSTALL_STAGING = YES @@ -118,7 +120,9 @@ ifeq ($(BR2_PACKAGE_PYTHON3_SSL),y) PYTHON3_DEPENDENCIES += openssl PYTHON3_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr else -PYTHON3_CONF_OPTS += --disable-openssl +PYTHON3_CONF_ENV += \ + py_cv_module__hashlib=n/a \ + py_cv_module__ssl=n/a endif ifneq ($(BR2_PACKAGE_PYTHON3_CODECSCJK),y) From patchwork Tue Aug 8 18:51:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1818868 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RL2Q26D3Nz1yfM for ; Wed, 9 Aug 2023 04:53:14 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 066208210A; Tue, 8 Aug 2023 18:53:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 066208210A X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0a6iPd_4QnDi; Tue, 8 Aug 2023 18:53:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 1D67E82089; Tue, 8 Aug 2023 18:53:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 1D67E82089 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 828371BF330 for ; Tue, 8 Aug 2023 18:52:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 5B71D61199 for ; Tue, 8 Aug 2023 18:52:50 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 5B71D61199 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x-CpPLotFVBN for ; Tue, 8 Aug 2023 18:52:49 +0000 (UTC) Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp3.osuosl.org (Postfix) with ESMTPS id 904D961196 for ; Tue, 8 Aug 2023 18:52:49 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 904D961196 Received: from fli4l.lan.fli4l (p4fd6c649.dip0.t-ipconnect.de [79.214.198.73]) by dd20012.kasserver.com (Postfix) with ESMTPSA id 1C0F7A4C110A; Tue, 8 Aug 2023 20:51:10 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:48850) by fli4l.lan.fli4l with esmtp (Exim 4.96) (envelope-from ) id 1qTRnR-0005AS-2i; Tue, 08 Aug 2023 20:51:09 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 8 Aug 2023 20:51:00 +0200 Message-Id: <20230808185108.3787835-9-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808185108.3787835-1-bernd@kuhls.net> References: <20230808185108.3787835-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: + X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202306131828; t=1691520670; bh=O6nNt4HfyQO4gE/ge8DDvFteVIBLOkY9qfafyqNnggU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iIBykHv9D4a470DnVqj5UUYgPTgbIiY1nMH7YLch/ojq82JODdCGdab6zW4nzK6S7 yPBBM05LGehMSoHhdGytIec5b1jjPxB+6SAmL1XoJOmPKYaEKE9KKPklSNCxUsHBLM 2Wcpgeoorcq7urS3K/OOKfje5nd/+ACveYlheyP+IAZ0Aw9H9Kwdx84n5UfvvvtlOL oY3tOdDFUh+boNfk7TgEIfFnBLpNaAqpysFe6AOTESFzlejfoB4d/MNjUdjX/qTG9P T0GZMc2RwlWksLr1peVoaH1e2qOZBcHAYcnHxXoyLD2UL5pFq7YLhubo8yZ/Z+hbqD or2LDrOJGnFHQ== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202306131828 header.b=iIBykHv9 Subject: [Buildroot] [PATCH/next 08/16] package/python3: use upstream build system to disable ossaudiodev module X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Signed-off-by: Bernd Kuhls --- ...on-to-disable-the-ossaudiodev-module.patch | 30 ------------------- package/python3/python3.mk | 6 ++-- 2 files changed, 2 insertions(+), 34 deletions(-) delete mode 100644 package/python3/0022-Add-an-option-to-disable-the-ossaudiodev-module.patch diff --git a/package/python3/0022-Add-an-option-to-disable-the-ossaudiodev-module.patch b/package/python3/0022-Add-an-option-to-disable-the-ossaudiodev-module.patch deleted file mode 100644 index 56713a7f8f..0000000000 --- a/package/python3/0022-Add-an-option-to-disable-the-ossaudiodev-module.patch +++ /dev/null @@ -1,30 +0,0 @@ -From d48d9da534cec7891ae444b4ab94a76ac67f5daa Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Wed, 23 Dec 2015 11:51:58 +0100 -Subject: [PATCH] Add an option to disable the ossaudiodev module - -Signed-off-by: Thomas Petazzoni ---- - configure.ac | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/configure.ac b/configure.ac -index e6b1f1e9de..db33d567ad 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -3678,6 +3678,12 @@ fi - - AC_MSG_RESULT($with_decimal_contextvar) - -+AC_ARG_ENABLE(ossaudiodev, -+ AS_HELP_STRING([--disable-ossaudiodev], [disable OSSAUDIODEV]), -+ [ if test "$enableval" = "no"; then -+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ossaudiodev" -+ fi]) -+ - # Check for libmpdec machine flavor - AC_MSG_CHECKING(for decimal libmpdec machine) - AS_CASE([$ac_sys_system], --- -2.34.1 - diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 596bf44b56..4a2a19eadf 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -156,10 +156,8 @@ else PYTHON3_CONF_ENV += py_cv_module_zlib=n/a endif -ifeq ($(BR2_PACKAGE_PYTHON3_OSSAUDIODEV),y) -PYTHON3_CONF_OPTS += --enable-ossaudiodev -else -PYTHON3_CONF_OPTS += --disable-ossaudiodev +ifneq ($(BR2_PACKAGE_PYTHON3_OSSAUDIODEV),y) +PYTHON3_CONF_ENV += py_cv_module_ossaudiodev=n/a endif # Make python believe we don't have 'hg', so that it doesn't try to From patchwork Tue Aug 8 18:51:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1818869 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RL2QH17Svz1yfM for ; Wed, 9 Aug 2023 04:53:27 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7579D82121; Tue, 8 Aug 2023 18:53:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7579D82121 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KZBRsrp_9WI3; Tue, 8 Aug 2023 18:53:24 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 9E00D82119; Tue, 8 Aug 2023 18:53:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 9E00D82119 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id D6F851BF330 for ; Tue, 8 Aug 2023 18:53:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id B0FF0402D4 for ; Tue, 8 Aug 2023 18:53:01 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org B0FF0402D4 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hce8jCLIUATG for ; Tue, 8 Aug 2023 18:53:01 +0000 (UTC) Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp2.osuosl.org (Postfix) with ESMTPS id F2E7D401AD for ; Tue, 8 Aug 2023 18:53:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org F2E7D401AD Received: from fli4l.lan.fli4l (p4fd6c649.dip0.t-ipconnect.de [79.214.198.73]) by dd20012.kasserver.com (Postfix) with ESMTPSA id 1DFCEA4C110B; Tue, 8 Aug 2023 20:51:10 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:48850) by fli4l.lan.fli4l with esmtp (Exim 4.96) (envelope-from ) id 1qTRnR-0005AS-2w; Tue, 08 Aug 2023 20:51:09 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 8 Aug 2023 20:51:01 +0200 Message-Id: <20230808185108.3787835-10-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808185108.3787835-1-bernd@kuhls.net> References: <20230808185108.3787835-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: + X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202306131828; t=1691520670; bh=7w0Bsz6ZsDkRe+kD/ToF8gTQL04V9loXPmRx3OG38C4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VLH/eIpJGPWHjuyp4NPwpE14Z+XciNZZbJqlPGxPmOBqFDyeOU/Dvk0/Ecx2vSa8m afcDp0832Kp/MmiYZAH95bsnT7gTk7k9jtHmOoiqd+xwtXviyBd5d4Er6GZ7fVvsxj EIUNvA+RnTl4r/DtfHAN7Rfk7ZePs1Rg/mqhbKuhCMXmoES6ldA3OUTEGmwS754yqt hMXDqY+CMd/wZxfgRPK4Dzh4YgwCJ9vcyZ3aVb7WOf0zBunHmL+toqB9T1wn0IS85f f4W8IJnoJA7mbmMnro6Ve7lrphZnRxtvwEWrbQS/JdtkAYuWnrulCvvBj1/cB4W7bk LHnAVaOVxTneg== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202306131828 header.b=VLH/eIpJ Subject: [Buildroot] [PATCH/next 09/16] package/python3: use upstream build system to disable unicodedata module X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Signed-off-by: Bernd Kuhls --- ...Add-an-option-to-disable-unicodedata.patch | 30 ------------------- package/python3/python3.mk | 4 +-- 2 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 package/python3/0019-Add-an-option-to-disable-unicodedata.patch diff --git a/package/python3/0019-Add-an-option-to-disable-unicodedata.patch b/package/python3/0019-Add-an-option-to-disable-unicodedata.patch deleted file mode 100644 index 74702b67a5..0000000000 --- a/package/python3/0019-Add-an-option-to-disable-unicodedata.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 4fe7f375a3d171d294caebdd7b7ce49bbc9ad9f3 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Wed, 23 Dec 2015 11:50:27 +0100 -Subject: [PATCH] Add an option to disable unicodedata - -Signed-off-by: Thomas Petazzoni ---- - configure.ac | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 1bdde7f69d..ba4b0e0c1c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4200,6 +4200,12 @@ AC_ARG_ENABLE(nis, - DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" - fi]) - -+AC_ARG_ENABLE(unicodedata, -+ AS_HELP_STRING([--disable-unicodedata], [disable unicodedata]), -+ [ if test "$enableval" = "no"; then -+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} unicodedata" -+ fi]) -+ - AC_SUBST(TK) - AC_ARG_ENABLE(tk, - AS_HELP_STRING([--disable-tk], [disable tk]), --- -2.34.1 - diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 4a2a19eadf..e047cf8a56 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -27,7 +27,6 @@ HOST_PYTHON3_CONF_OPTS += \ --with-expat=system \ --disable-codecs-cjk \ --disable-nis \ - --enable-unicodedata \ --disable-test-modules \ --disable-idle3 \ --disable-ossaudiodev @@ -41,6 +40,7 @@ HOST_PYTHON3_CONF_ENV += \ LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags" \ py_cv_module__curses=n/a \ py_cv_module__curses_panel=n/a \ + py_cv_module_unicodedata=yes \ py_cv_module__uuid=n/a \ ac_cv_prog_HAS_HG=/bin/false @@ -130,7 +130,7 @@ PYTHON3_CONF_OPTS += --disable-codecs-cjk endif ifneq ($(BR2_PACKAGE_PYTHON3_UNICODEDATA),y) -PYTHON3_CONF_OPTS += --disable-unicodedata +PYTHON3_CONF_ENV += py_cv_module_unicodedata=n/a endif # Disable auto-detection of uuid.h (util-linux) From patchwork Tue Aug 8 18:51:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1818870 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RL2QW3jY4z1yfM for ; Wed, 9 Aug 2023 04:53:39 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id B57FD81A6D; Tue, 8 Aug 2023 18:53:37 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B57FD81A6D X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VqsKMgfOecnw; Tue, 8 Aug 2023 18:53:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id EB59B81756; Tue, 8 Aug 2023 18:53:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org EB59B81756 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id C89441BF330 for ; Tue, 8 Aug 2023 18:53:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id AE94C408A3 for ; Tue, 8 Aug 2023 18:53:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org AE94C408A3 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0rk6XESXNC4C for ; Tue, 8 Aug 2023 18:53:13 +0000 (UTC) Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp4.osuosl.org (Postfix) with ESMTPS id 94717401D8 for ; Tue, 8 Aug 2023 18:53:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 94717401D8 Received: from fli4l.lan.fli4l (p4fd6c649.dip0.t-ipconnect.de [79.214.198.73]) by dd20012.kasserver.com (Postfix) with ESMTPSA id 32E4FA4C110C; Tue, 8 Aug 2023 20:51:10 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:48850) by fli4l.lan.fli4l with esmtp (Exim 4.96) (envelope-from ) id 1qTRnR-0005AS-3B; Tue, 08 Aug 2023 20:51:10 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 8 Aug 2023 20:51:02 +0200 Message-Id: <20230808185108.3787835-11-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808185108.3787835-1-bernd@kuhls.net> References: <20230808185108.3787835-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: + X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202306131828; t=1691520670; bh=eAcFyvWpT1iuuK+qAgmnsuld6SrdX2rsGRtyx+SUAas=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XddS9pFGTCMEFOz1TX/g8K+K9qEKoDOBSjqZZSUdPXk+NjBJ93FjBTAqvqUuyJ6ie bvinTGhBpBNNJckcFtxRBz7Q/r/J7kJIEYDC66PFY1JpLJbebX/C2AGjP1+uW1Ul2t ByHcEVqR8//aSdvX0grfGBn4ZnZDdBvfiB1HQ3LrwJnLvj9pb9AG6D4zFviHz+lmHD 33ZNR4cev3TS86afDDhcbtr0e9VquzixRpbboucBrS6XUPtyU7OlgHue5GmgEf+WuV /uuEiAzCQuhEkzeDyV3a+SrjrbwWpdMTwq+rJNRPtFXaY5FG9iUH9hWsDJkXNf/t77 TNYTpmmJLmfcw== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202306131828 header.b=XddS9pFG Subject: [Buildroot] [PATCH/next 10/16] package/python3: use upstream build system to disable nis module X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Signed-off-by: Bernd Kuhls --- .../0018-Add-an-option-to-disable-NIS.patch | 33 ------------------- package/python3/python3.mk | 4 +-- 2 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 package/python3/0018-Add-an-option-to-disable-NIS.patch diff --git a/package/python3/0018-Add-an-option-to-disable-NIS.patch b/package/python3/0018-Add-an-option-to-disable-NIS.patch deleted file mode 100644 index 977955d1cb..0000000000 --- a/package/python3/0018-Add-an-option-to-disable-NIS.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 09fc9f72ebe60bb65e80732a6bd4f12a84159f6d Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Wed, 23 Dec 2015 11:50:11 +0100 -Subject: [PATCH] Add an option to disable NIS - -NIS is not necessarily available in uClibc, so we need an option to -not compile support for it. - -Signed-off-by: Thomas Petazzoni ---- - configure.ac | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/configure.ac b/configure.ac -index ecdd7dbc07..1bdde7f69d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4194,6 +4194,12 @@ AC_ARG_ENABLE(codecs-cjk, - DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022" - fi]) - -+AC_ARG_ENABLE(nis, -+ AS_HELP_STRING([--disable-nis], [disable NIS]), -+ [ if test "$enableval" = "no"; then -+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" -+ fi]) -+ - AC_SUBST(TK) - AC_ARG_ENABLE(tk, - AS_HELP_STRING([--disable-tk], [disable tk]), --- -2.34.1 - diff --git a/package/python3/python3.mk b/package/python3/python3.mk index e047cf8a56..324c35838b 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -26,7 +26,6 @@ HOST_PYTHON3_CONF_OPTS += \ --disable-tk \ --with-expat=system \ --disable-codecs-cjk \ - --disable-nis \ --disable-test-modules \ --disable-idle3 \ --disable-ossaudiodev @@ -40,6 +39,7 @@ HOST_PYTHON3_CONF_ENV += \ LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags" \ py_cv_module__curses=n/a \ py_cv_module__curses_panel=n/a \ + py_cv_module_nis=n/a \ py_cv_module_unicodedata=yes \ py_cv_module__uuid=n/a \ ac_cv_prog_HAS_HG=/bin/false @@ -167,6 +167,7 @@ PYTHON3_CONF_ENV += \ ac_cv_file__dev_ptmx=yes \ ac_cv_file__dev_ptc=yes \ ac_cv_working_tzset=yes \ + py_cv_module_nis=n/a \ ac_cv_prog_HAS_HG=/bin/false # GCC is always compliant with IEEE754 @@ -194,7 +195,6 @@ PYTHON3_CONF_OPTS += \ --disable-pydoc \ --disable-test-modules \ --disable-tk \ - --disable-nis \ --disable-idle3 \ --disable-pyc-build From patchwork Tue Aug 8 18:51:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1818871 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RL2Ql5qkFz1yfM for ; Wed, 9 Aug 2023 04:53:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 2376280E6A; Tue, 8 Aug 2023 18:53:50 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 2376280E6A X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d2A21O9Gm7gt; Tue, 8 Aug 2023 18:53:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 49E7682075; Tue, 8 Aug 2023 18:53:48 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 49E7682075 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 80AE11BF330 for ; Tue, 8 Aug 2023 18:53:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 58BDC408AA for ; Tue, 8 Aug 2023 18:53:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 58BDC408AA X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZKAnc6_PG-l8 for ; Tue, 8 Aug 2023 18:53:25 +0000 (UTC) Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp4.osuosl.org (Postfix) with ESMTPS id 50EC44013B for ; Tue, 8 Aug 2023 18:53:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 50EC44013B Received: from fli4l.lan.fli4l (p4fd6c649.dip0.t-ipconnect.de [79.214.198.73]) by dd20012.kasserver.com (Postfix) with ESMTPSA id 3769CA4C110D; Tue, 8 Aug 2023 20:51:10 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:48850) by fli4l.lan.fli4l with esmtp (Exim 4.96) (envelope-from ) id 1qTRnS-0005AS-0C; Tue, 08 Aug 2023 20:51:10 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 8 Aug 2023 20:51:03 +0200 Message-Id: <20230808185108.3787835-12-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808185108.3787835-1-bernd@kuhls.net> References: <20230808185108.3787835-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: + X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202306131828; t=1691520670; bh=nIUs+anXvpGjkcAL7eAjCH2b6uXrupxxen/fpP2aeGw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q61gn0Brz0yUTAGqfzP7S7Nddc1WXESac8cUooJBLfLKcE49N0bOZeJq0v6ro+duI Om8mrhBwIETaTeIQ3xL2elufmZq/ouOT3iMIFBFvOcxZyXDzg2XBOm9eiQt+D4q7Hc 03DDxt7M17VQ5DdKwfvIO1VLN/qNgIzAhV6sRDvTGSJFJDBUeWxnQLYk8MuH8QaD4i wcMIn2KRlE6rjHXqIIh7NF5cd9DR2xDG2rEbRY5c2ypo7jyJc7wty11SfZStEj4AGT bjjFg1G75saYqynoQdEcmB2w9IU2/Vs1RUstsY4zgqnRDZQiWxno1naz3oEmwXBSdj PSIbNKbLVzgNA== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202306131828 header.b=Q61gn0Br Subject: [Buildroot] [PATCH/next 11/16] package/python3: use upstream build system to disable decimal module X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Signed-off-by: Bernd Kuhls --- ...021-Add-an-option-to-disable-decimal.patch | 54 ------------------- package/python3/python3.mk | 4 +- 2 files changed, 2 insertions(+), 56 deletions(-) delete mode 100644 package/python3/0021-Add-an-option-to-disable-decimal.patch diff --git a/package/python3/0021-Add-an-option-to-disable-decimal.patch b/package/python3/0021-Add-an-option-to-disable-decimal.patch deleted file mode 100644 index d683565f94..0000000000 --- a/package/python3/0021-Add-an-option-to-disable-decimal.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 7091fdf77f612425c178a75148560f9c3514e8b8 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Wed, 23 Dec 2015 11:51:31 +0100 -Subject: [PATCH] Add an option to disable decimal - -This patch replaces the existing --with-system-libmpdec option with a ---with-libmpdec={system,builtin,none} option, which allows to tell -Python whether we want to use the system libmpdec (already installed), -the libmpdec builtin the Python sources, or no libmpdec at all. - -Signed-off-by: Thomas Petazzoni -[aduskett@gmail.com: Update for python 3.7.0] -Signed-off-by: Adam Duskett -[james.hilliard1@gmail.com: adapt to python 3.9] -Signed-off-by: James Hilliard ---- - configure.ac | 19 +++++++++++++------ - 1 file changed, 13 insertions(+), 6 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 5e6d72f7db..e6b1f1e9de 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -3630,14 +3630,21 @@ fi - AC_SUBST(LIBFFI_INCLUDEDIR) - - # Check for use of the system libmpdec library --AC_MSG_CHECKING(for --with-system-libmpdec) --AC_ARG_WITH(system_libmpdec, -- AS_HELP_STRING([--with-system-libmpdec], [build _decimal module using an installed libmpdec library, see Doc/library/decimal.rst (default is no)]), -+AC_MSG_CHECKING(for --with-libmpdec) -+AC_ARG_WITH(libmpdec, -+ AS_HELP_STRING([--with-libmpdec], [select which libmpdec version to use: system, builtin, none]), - [], -- [with_system_libmpdec="no"]) --AC_MSG_RESULT($with_system_libmpdec) -+ [with_libmpdec="builtin"]) -+AC_MSG_RESULT($with_libmpdec) -+if test "$with_libmpdec" != "none"; then -+ MPDEC=yes -+else -+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _decimal" -+ MPDEC=no -+fi -+AC_SUBST(MPDEC) - --AS_VAR_IF([with_system_libmpdec], [yes], [ -+AS_VAR_IF([with_libmpdec], [system], [ - LIBMPDEC_CFLAGS=${LIBMPDEC_CFLAGS-""} - LIBMPDEC_LDFLAGS=${LIBMPDEC_LDFLAGS-"-lmpdec"} - LIBMPDEC_INTERNAL= --- -2.34.1 - diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 324c35838b..ea65a0c66b 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -98,9 +98,9 @@ endif ifeq ($(BR2_PACKAGE_PYTHON3_DECIMAL),y) PYTHON3_DEPENDENCIES += mpdecimal -PYTHON3_CONF_OPTS += --with-libmpdec=system +PYTHON3_CONF_OPTS += --with-system-libmpdec else -PYTHON3_CONF_OPTS += --with-libmpdec=none +PYTHON3_CONF_ENV += py_cv_module__decimal=n/a endif ifeq ($(BR2_PACKAGE_PYTHON3_PYEXPAT),y) From patchwork Tue Aug 8 18:51:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1818872 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RL2R01vR8z1yfM for ; Wed, 9 Aug 2023 04:54:04 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8B66B81D21; Tue, 8 Aug 2023 18:54:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8B66B81D21 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D63bwoP4_RMf; Tue, 8 Aug 2023 18:54:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id B24F582127; Tue, 8 Aug 2023 18:54:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B24F582127 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id E1E1E1BF330 for ; Tue, 8 Aug 2023 18:53:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id BB78460D80 for ; Tue, 8 Aug 2023 18:53:37 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org BB78460D80 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cg8EF0GcFiww for ; Tue, 8 Aug 2023 18:53:37 +0000 (UTC) Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp3.osuosl.org (Postfix) with ESMTPS id F3F6E6073E for ; Tue, 8 Aug 2023 18:53:36 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org F3F6E6073E Received: from fli4l.lan.fli4l (p4fd6c649.dip0.t-ipconnect.de [79.214.198.73]) by dd20012.kasserver.com (Postfix) with ESMTPSA id 69D4AA4C110E; Tue, 8 Aug 2023 20:51:10 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:48850) by fli4l.lan.fli4l with esmtp (Exim 4.96) (envelope-from ) id 1qTRnS-0005AS-0U; Tue, 08 Aug 2023 20:51:10 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 8 Aug 2023 20:51:04 +0200 Message-Id: <20230808185108.3787835-13-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808185108.3787835-1-bernd@kuhls.net> References: <20230808185108.3787835-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: / X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202306131828; t=1691520670; bh=MclIIOGipNYPdJ0dZryo7gICCoxUIuGrUahX2t7p5rU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ju5sajsMWTPVPkkmUnWYpwIyv6BwBtxYwU/qQP07x9HfnBc4atVDXFzXAr6qD3QIn q2XLHzaTDYx0rrV+m6fSC5c5fNhnHeG4rIC+16At0sDhAeeadOzst8In8Bk+Pm2Ic6 1ZyUixyvMiwxWnCvpd2v0EkeRmSgBePX2gA9+c3Vjv+dhIEQzzrOAjswZQpbIzAdrO ah7x+HkbK2Vb1SWaHCobuESOqQgxKlobbAcEymU0Ur3ASG9zgTLArryFCFBXYhDAqO a/ZwSWE8OvXodnGZkC/BFm6ZG9x7X8tkPTsmxfsDZYmPIgtu3LPmTlu/VGCuToutkZ AUfXIw4p4Lwgw== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202306131828 header.b=ju5sajsM Subject: [Buildroot] [PATCH/next 12/16] package/python3: use upstream build system to disable CJK codecs X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Signed-off-by: Bernd Kuhls --- ...-Add-an-option-to-disable-CJK-codecs.patch | 30 ------------------- package/python3/python3.mk | 15 ++++++++-- 2 files changed, 13 insertions(+), 32 deletions(-) delete mode 100644 package/python3/0017-Add-an-option-to-disable-CJK-codecs.patch diff --git a/package/python3/0017-Add-an-option-to-disable-CJK-codecs.patch b/package/python3/0017-Add-an-option-to-disable-CJK-codecs.patch deleted file mode 100644 index 63a07fb514..0000000000 --- a/package/python3/0017-Add-an-option-to-disable-CJK-codecs.patch +++ /dev/null @@ -1,30 +0,0 @@ -From d8ef6a7a9f2b954cf1c1e37fc3c35055b42af0f5 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Wed, 23 Dec 2015 11:49:55 +0100 -Subject: [PATCH] Add an option to disable CJK codecs - -Signed-off-by: Thomas Petazzoni ---- - configure.ac | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 201cad0bfc..ecdd7dbc07 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4188,6 +4188,12 @@ if test "$SQLITE3" = "no" ; then - DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" - fi - -+AC_ARG_ENABLE(codecs-cjk, -+ AS_HELP_STRING([--disable-codecs-cjk], [disable CJK codecs]), -+ [ if test "$enableval" = "no"; then -+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022" -+ fi]) -+ - AC_SUBST(TK) - AC_ARG_ENABLE(tk, - AS_HELP_STRING([--disable-tk], [disable tk]), --- -2.34.1 - diff --git a/package/python3/python3.mk b/package/python3/python3.mk index ea65a0c66b..35f9c286af 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -25,7 +25,6 @@ HOST_PYTHON3_CONF_OPTS += \ --disable-sqlite3 \ --disable-tk \ --with-expat=system \ - --disable-codecs-cjk \ --disable-test-modules \ --disable-idle3 \ --disable-ossaudiodev @@ -41,6 +40,12 @@ HOST_PYTHON3_CONF_ENV += \ py_cv_module__curses_panel=n/a \ py_cv_module_nis=n/a \ py_cv_module_unicodedata=yes \ + py_cv_module__codecs_cn=n/a \ + py_cv_module__codecs_hk=n/a \ + py_cv_module__codecs_iso2022=n/a \ + py_cv_module__codecs_jp=n/a \ + py_cv_module__codecs_kr=n/a \ + py_cv_module__codecs_tw=n/a \ py_cv_module__uuid=n/a \ ac_cv_prog_HAS_HG=/bin/false @@ -126,7 +131,13 @@ PYTHON3_CONF_ENV += \ endif ifneq ($(BR2_PACKAGE_PYTHON3_CODECSCJK),y) -PYTHON3_CONF_OPTS += --disable-codecs-cjk +PYTHON3_CONF_ENV += \ + py_cv_module__codecs_cn=n/a \ + py_cv_module__codecs_hk=n/a \ + py_cv_module__codecs_iso2022=n/a \ + py_cv_module__codecs_jp=n/a \ + py_cv_module__codecs_kr=n/a \ + py_cv_module__codecs_tw=n/a endif ifneq ($(BR2_PACKAGE_PYTHON3_UNICODEDATA),y) From patchwork Tue Aug 8 18:51:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1818873 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RL2RD5Z9cz20G0 for ; Wed, 9 Aug 2023 04:54:16 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id F40558212D; Tue, 8 Aug 2023 18:54:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org F40558212D X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HTcCpgJ5j-hK; Tue, 8 Aug 2023 18:54:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 27DAE820F4; Tue, 8 Aug 2023 18:54:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 27DAE820F4 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 97E121BF330 for ; Tue, 8 Aug 2023 18:53:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 71D82402D4 for ; Tue, 8 Aug 2023 18:53:50 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 71D82402D4 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pvxQY6vijeCs for ; Tue, 8 Aug 2023 18:53:49 +0000 (UTC) Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp2.osuosl.org (Postfix) with ESMTPS id 9EFCA401AD for ; Tue, 8 Aug 2023 18:53:49 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 9EFCA401AD Received: from fli4l.lan.fli4l (p4fd6c649.dip0.t-ipconnect.de [79.214.198.73]) by dd20012.kasserver.com (Postfix) with ESMTPSA id 84B4AA4C110F; Tue, 8 Aug 2023 20:51:10 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:48850) by fli4l.lan.fli4l with esmtp (Exim 4.96) (envelope-from ) id 1qTRnS-0005AS-0k; Tue, 08 Aug 2023 20:51:10 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 8 Aug 2023 20:51:05 +0200 Message-Id: <20230808185108.3787835-14-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808185108.3787835-1-bernd@kuhls.net> References: <20230808185108.3787835-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: / X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202306131828; t=1691520670; bh=lopEAUJW0Q4r+rs7fHvlXpxPL7/HBKhm83w2vdxtzMI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b10uT7JNqLuOYothvnlHYXss6lvwetAw5LOkdvWAXwx24w8JIymID1umLdZQxa1LQ qJfTvlGAE9+akN4Km1DzFHIBMYYbN3Lli7ri8w0iQ2NkQZqo4H+a1XPPOQtfUs5MTG oq9LGNpeX2f/NKy49ZT8TP2DCPS/et9qw3/lBX74/tQeHHzoIvVkp5V53pLIsPJZEj 5YMwz6DNUEYnLbkuAXcrA0cT8WlSIYvSwsTr41nav+zzRtKFP9GjxxMCBgmYYjHES1 6bdnBfGv4qbyPnTh9w5RD0B8QMVp8m+/7OLRje6JgWp7TN3dActT8w0fyWVl4mpem3 cP+2N1P4Rb0BA== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202306131828 header.b=b10uT7JN Subject: [Buildroot] [PATCH/next 13/16] package/python3: use upstream build system to disable pyexpat module X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Signed-off-by: Bernd Kuhls --- .../0016-Add-an-option-to-disable-expat.patch | 82 ------------------- package/python3/python3.mk | 6 +- 2 files changed, 3 insertions(+), 85 deletions(-) delete mode 100644 package/python3/0016-Add-an-option-to-disable-expat.patch diff --git a/package/python3/0016-Add-an-option-to-disable-expat.patch b/package/python3/0016-Add-an-option-to-disable-expat.patch deleted file mode 100644 index c30740762a..0000000000 --- a/package/python3/0016-Add-an-option-to-disable-expat.patch +++ /dev/null @@ -1,82 +0,0 @@ -From c9a2ea3edacf57746517600ccc11c254a9fd6c48 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Wed, 22 Feb 2017 17:40:45 -0800 -Subject: [PATCH] Add an option to disable expat - -This patch replaces the existing --with-system-expat option with a ---with-expat={system,builtin,none} option, which allows to tell Python -whether we want to use the system expat (already installed), the expat -builtin the Python sources, or no expat at all (which disables the -installation of XML modules). - -Signed-off-by: Thomas Petazzoni -Signed-off-by: Samuel Martin -[ Andrey Smirnov: ported to Python 3.6 ] -Signed-off-by: Andrey Smirnov -[ Adam Duskett: ported to Python 3.10.0 ] -Signed-off-by: Adam Duskett ---- - Makefile.pre.in | 5 ++++- - configure.ac | 20 ++++++++++++++------ - 2 files changed, 18 insertions(+), 7 deletions(-) - -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 8e879b35c6..80d617cf7f 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -1925,7 +1925,6 @@ LIBSUBDIRS= asyncio \ - urllib \ - venv venv/scripts venv/scripts/common venv/scripts/posix \ - wsgiref \ -- $(XMLLIBSUBDIRS) \ - xmlrpc \ - zoneinfo \ - __phello__ -@@ -2027,6 +2026,10 @@ ifeq (@CURSES@,yes) - LIBSUBDIRS += curses - endif - -+ifeq (@EXPAT@,yes) -+LIBSUBDIRS += $(XMLLIBSUBDIRS) -+endif -+ - TEST_MODULES=@TEST_MODULES@ - libinstall: all $(srcdir)/Modules/xxmodule.c - @for i in $(SCRIPTDIR) $(LIBDEST); \ -diff --git a/configure.ac b/configure.ac -index 0ae9863cd6..201cad0bfc 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -3565,15 +3565,23 @@ LIBS="$withval $LIBS" - AC_SUBST(DISABLED_EXTENSIONS) - - # Check for use of the system expat library --AC_MSG_CHECKING(for --with-system-expat) --AC_ARG_WITH(system_expat, -- AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library, see Doc/library/pyexpat.rst (default is no)]), -+AC_MSG_CHECKING(for --with-expat) -+AC_ARG_WITH(expat, -+ AS_HELP_STRING([--with-expat], [select which expat version to use: system, builtin, none]), - [], -- [with_system_expat="no"]) -+ [with_expat="builtin"]) - --AC_MSG_RESULT($with_system_expat) -+AC_MSG_RESULT($with_expat) - --AS_VAR_IF([with_system_expat], [yes], [ -+if test "$with_expat" != "none"; then -+ EXPAT=yes -+else -+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} pyexpat" -+ EXPAT=no -+fi -+AC_SUBST(EXPAT) -+ -+AS_VAR_IF([with_expat], [system], [ - LIBEXPAT_CFLAGS=${LIBEXPAT_CFLAGS-""} - LIBEXPAT_LDFLAGS=${LIBEXPAT_LDFLAGS-"-lexpat"} - LIBEXPAT_INTERNAL= --- -2.34.1 - diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 35f9c286af..aa241e843a 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -24,7 +24,6 @@ HOST_PYTHON3_CONF_OPTS += \ --without-cxx-main \ --disable-sqlite3 \ --disable-tk \ - --with-expat=system \ --disable-test-modules \ --disable-idle3 \ --disable-ossaudiodev @@ -39,6 +38,7 @@ HOST_PYTHON3_CONF_ENV += \ py_cv_module__curses=n/a \ py_cv_module__curses_panel=n/a \ py_cv_module_nis=n/a \ + py_cv_module_pyexpat=n/a \ py_cv_module_unicodedata=yes \ py_cv_module__codecs_cn=n/a \ py_cv_module__codecs_hk=n/a \ @@ -110,9 +110,9 @@ endif ifeq ($(BR2_PACKAGE_PYTHON3_PYEXPAT),y) PYTHON3_DEPENDENCIES += expat -PYTHON3_CONF_OPTS += --with-expat=system +PYTHON3_CONF_OPTS += --with-system-expat else -PYTHON3_CONF_OPTS += --with-expat=none +PYTHON3_CONF_ENV += py_cv_module_pyexpat=n/a endif ifeq ($(BR2_PACKAGE_PYTHON3_SQLITE),y) From patchwork Tue Aug 8 18:51:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1818874 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RL2RT5WyQz1yfM for ; Wed, 9 Aug 2023 04:54:29 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 1D65F82050; Tue, 8 Aug 2023 18:54:28 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 1D65F82050 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3SX0uWfY1lVr; Tue, 8 Aug 2023 18:54:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 3884082138; Tue, 8 Aug 2023 18:54:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 3884082138 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id AC8291BF330 for ; Tue, 8 Aug 2023 18:54:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 86531402D4 for ; Tue, 8 Aug 2023 18:54:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 86531402D4 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KntDssz1je3i for ; Tue, 8 Aug 2023 18:54:01 +0000 (UTC) Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp2.osuosl.org (Postfix) with ESMTPS id A3D26401AD for ; Tue, 8 Aug 2023 18:54:01 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org A3D26401AD Received: from fli4l.lan.fli4l (p4fd6c649.dip0.t-ipconnect.de [79.214.198.73]) by dd20012.kasserver.com (Postfix) with ESMTPSA id 91EFCA4C1110; Tue, 8 Aug 2023 20:51:10 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:48850) by fli4l.lan.fli4l with esmtp (Exim 4.96) (envelope-from ) id 1qTRnS-0005AS-16; Tue, 08 Aug 2023 20:51:10 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 8 Aug 2023 20:51:06 +0200 Message-Id: <20230808185108.3787835-15-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808185108.3787835-1-bernd@kuhls.net> References: <20230808185108.3787835-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: + X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202306131828; t=1691520670; bh=vJxdA9/aYBpzw60meA2mbo33rmO0G8qNs3xRwt3MYhU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nw8z7ec9BiGe4E54uHXSf+0XoYzHs20pVFj6Z2Iv5TrjdXcK35oeoyKkNWe3qaiCz 5RCef/zEFJ7JjRYch+dX5J1cloRytTruRKiLlmLoIv1r8JTvK0C+EXQyf2tCgHDdCs n7TLgeMX6ODt4Se3jy7lwZjtpwtbtvABzALQm0U9G7slxKqurIsAc3snODMDpEqs9z nuuMrfCdXDlml4Iyn+T1A6xErUSxT/8eGlF4Gq/6oFgCKE0jHg3FCULts26j7VLxGi usVgr4s+OOeyyf3J9iGWXJOFQ5nLzv9mTpA6DaUuj18JOR8exiMoitmqO8wLHzZiSE nLGBJUMzyBmew== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202306131828 header.b=Nw8z7ec9 Subject: [Buildroot] [PATCH/next 14/16] package/python3: use upstream build system to disable tk module X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Signed-off-by: Bernd Kuhls --- ...d-an-option-to-disable-the-tk-module.patch | 77 ------------------- package/python3/python3.mk | 4 +- 2 files changed, 2 insertions(+), 79 deletions(-) delete mode 100644 package/python3/0014-Add-an-option-to-disable-the-tk-module.patch diff --git a/package/python3/0014-Add-an-option-to-disable-the-tk-module.patch b/package/python3/0014-Add-an-option-to-disable-the-tk-module.patch deleted file mode 100644 index b89e1d27bc..0000000000 --- a/package/python3/0014-Add-an-option-to-disable-the-tk-module.patch +++ /dev/null @@ -1,77 +0,0 @@ -From bbbfe699d648a5cb191203b16e1786e8cf4ea908 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Wed, 22 Feb 2017 17:23:42 -0800 -Subject: [PATCH] Add an option to disable the tk module - -Signed-off-by: Thomas Petazzoni -Signed-off-by: Samuel Martin -[ Andrey Smirnov: ported to Python 3.6 ] -Signed-off-by: Andrey Smirnov -[ Adam Duskett: ported to Python 3.10.0 ] -Signed-off-by: Adam Duskett -[ Bernd Kuhls: ported to Python 3.11.4] -Signed-off-by: Bernd Kuhls ---- - Makefile.pre.in | 10 +++++++--- - configure.ac | 9 +++++++++ - 2 files changed, 16 insertions(+), 3 deletions(-) - -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 9f4cdf14cf..4f83911200 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -1920,7 +1920,6 @@ LIBSUBDIRS= asyncio \ - multiprocessing multiprocessing/dummy \ - re \ - site-packages \ -- tkinter \ - tomllib \ - turtledemo \ - unittest \ -@@ -2038,9 +2038,6 @@ - test/xmltestdata \ - test/xmltestdata/c14n-20 \ - test/ziptestdata \ -- tkinter/test \ -- tkinter/test/test_tkinter \ -- tkinter/test/test_ttk \ - unittest/test \ - unittest/test/testmock - ifeq (@PYDOC@,yes) -@@ -2021,6 +2018,13 @@ ifeq (@SQLITE3@,yes) - LIBSUBDIRS += sqlite3 - endif - -+ifeq (@TK@,yes) -+LIBSUBDIRS += tkinter -+TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \ -+ tkinter/test/test_ttk -+endif -+ -+ - TEST_MODULES=@TEST_MODULES@ - libinstall: all $(srcdir)/Modules/xxmodule.c - @for i in $(SCRIPTDIR) $(LIBDEST); \ -diff --git a/configure.ac b/configure.ac -index 4cc0951ab9..f4ce506801 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4180,6 +4180,15 @@ if test "$SQLITE3" = "no" ; then - DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" - fi - -+AC_SUBST(TK) -+AC_ARG_ENABLE(tk, -+ AS_HELP_STRING([--disable-tk], [disable tk]), -+ [ TK="${enableval}" ], [ TK=yes ]) -+ -+if test "$TK" = "no"; then -+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter" -+fi -+ - AC_SUBST(PYDOC) - - AC_ARG_ENABLE(pydoc, --- -2.34.1 - diff --git a/package/python3/python3.mk b/package/python3/python3.mk index aa241e843a..2b5ddee52f 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -23,7 +23,6 @@ HOST_PYTHON3_CONF_OPTS += \ --without-ensurepip \ --without-cxx-main \ --disable-sqlite3 \ - --disable-tk \ --disable-test-modules \ --disable-idle3 \ --disable-ossaudiodev @@ -46,6 +45,7 @@ HOST_PYTHON3_CONF_ENV += \ py_cv_module__codecs_jp=n/a \ py_cv_module__codecs_kr=n/a \ py_cv_module__codecs_tw=n/a \ + py_cv_module__tkinter=n/a \ py_cv_module__uuid=n/a \ ac_cv_prog_HAS_HG=/bin/false @@ -179,6 +179,7 @@ PYTHON3_CONF_ENV += \ ac_cv_file__dev_ptc=yes \ ac_cv_working_tzset=yes \ py_cv_module_nis=n/a \ + py_cv_module__tkinter=n/a \ ac_cv_prog_HAS_HG=/bin/false # GCC is always compliant with IEEE754 @@ -205,7 +206,6 @@ PYTHON3_CONF_OPTS += \ --with-system-ffi \ --disable-pydoc \ --disable-test-modules \ - --disable-tk \ --disable-idle3 \ --disable-pyc-build From patchwork Tue Aug 8 18:51:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1818875 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RL2Rk2hc1z1yfM for ; Wed, 9 Aug 2023 04:54:42 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id AE8588214D; Tue, 8 Aug 2023 18:54:40 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org AE8588214D X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N62bt53f8Ofi; Tue, 8 Aug 2023 18:54:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id A5FA482139; Tue, 8 Aug 2023 18:54:38 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A5FA482139 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 465301BF330 for ; Tue, 8 Aug 2023 18:54:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 1FDC44038E for ; Tue, 8 Aug 2023 18:54:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 1FDC44038E X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D5Tt4ji0DFRM for ; Tue, 8 Aug 2023 18:54:13 +0000 (UTC) Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp2.osuosl.org (Postfix) with ESMTPS id 42BC1402D4 for ; Tue, 8 Aug 2023 18:54:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 42BC1402D4 Received: from fli4l.lan.fli4l (p4fd6c649.dip0.t-ipconnect.de [79.214.198.73]) by dd20012.kasserver.com (Postfix) with ESMTPSA id B36F1A4C1111; Tue, 8 Aug 2023 20:51:10 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:48850) by fli4l.lan.fli4l with esmtp (Exim 4.96) (envelope-from ) id 1qTRnS-0005AS-1Q; Tue, 08 Aug 2023 20:51:10 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 8 Aug 2023 20:51:07 +0200 Message-Id: <20230808185108.3787835-16-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808185108.3787835-1-bernd@kuhls.net> References: <20230808185108.3787835-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: + X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202306131828; t=1691520670; bh=YuNxHHfdG/+kKshptx+m0Xm1s6UcZsAFMvD1zHz0W2w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wbj7QswtMePdyFY3GVgj9LrkGzi/B3OcJXyNDlnB6KP64N5svDTLxj92AZbKbAO20 rH8kIwKmVR4yQorZBRPL05oO/+m0W4iNPNHtizfz7S1/w3xYR7oSSVT7FkikNWCie6 HfCop+jyuGYmjrf43TaFAT2sdZC34LzXZGeFLxP5LsBrrRe+rvKgyxFXAF0L0zywP2 daPKC6G5+8Y+bdaZPRPuIwC4twrJnjH8B5mx1jxyzkDngpKTEh7TtbceyI3pD2W9a6 XejGSroX+tzrvF7IykCGbJUESdZe7iI1rPXQQZGDbY7vbU830Nw7ITghAElvCsYrsQ Z9QyqwC/xf8ZQ== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202306131828 header.b=wbj7Qswt Subject: [Buildroot] [PATCH/next 15/16] package/python3: use upstream build system to disable sqlite3 module X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Signed-off-by: Bernd Kuhls --- ...option-to-disable-the-sqlite3-module.patch | 62 ------------------- package/python3/python3.mk | 4 +- 2 files changed, 2 insertions(+), 64 deletions(-) delete mode 100644 package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch diff --git a/package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch b/package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch deleted file mode 100644 index 795ea3b898..0000000000 --- a/package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch +++ /dev/null @@ -1,62 +0,0 @@ -From ef8c030e01b1be8be582e90c31298a5863094858 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Wed, 22 Feb 2017 17:20:45 -0800 -Subject: [PATCH] Add option to disable the sqlite3 module - -Signed-off-by: Thomas Petazzoni -Signed-off-by: Samuel Martin -[ Andrey Smirnov: ported to Python 3.6 ] -Signed-off-by: Andrey Smirnov -[ Adam Duskett: ported to Python 3.10.0 ] -Signed-off-by: Adam Duskett ---- - Makefile.pre.in | 5 ++++- - configure.ac | 9 +++++++++ - 2 files changed, 13 insertions(+), 1 deletion(-) - -diff --git a/Makefile.pre.in b/Makefile.pre.in -index f5d0573067..9f4cdf14cf 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -1920,7 +1920,6 @@ LIBSUBDIRS= asyncio \ - multiprocessing multiprocessing/dummy \ - re \ - site-packages \ -- sqlite3 \ - tkinter \ - tomllib \ - turtledemo \ -@@ -2018,6 +2017,10 @@ TESTSUBDIRS += lib2to3/tests \ - lib2to3/tests/data/fixers/myfixes - endif - -+ifeq (@SQLITE3@,yes) -+LIBSUBDIRS += sqlite3 -+endif -+ - TEST_MODULES=@TEST_MODULES@ - libinstall: all $(srcdir)/Modules/xxmodule.c - @for i in $(SCRIPTDIR) $(LIBDEST); \ -diff --git a/configure.ac b/configure.ac -index d8e10cf2b2..4cc0951ab9 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4171,6 +4171,15 @@ AS_VAR_IF([posix_threads], [stub], [ - AC_DEFINE([HAVE_PTHREAD_STUBS], [1], [Define if platform requires stubbed pthreads support]) - ]) - -+AC_SUBST(SQLITE3) -+AC_ARG_ENABLE(sqlite3, -+ AS_HELP_STRING([--disable-sqlite3], [disable sqlite3]), -+ [ SQLITE3="${enableval}" ], [ SQLITE3=yes ]) -+ -+if test "$SQLITE3" = "no" ; then -+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" -+fi -+ - AC_SUBST(PYDOC) - - AC_ARG_ENABLE(pydoc, --- -2.34.1 - diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 2b5ddee52f..45d7d1136c 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -22,7 +22,6 @@ PYTHON3_IGNORE_CVES += CVE-2022-45061 HOST_PYTHON3_CONF_OPTS += \ --without-ensurepip \ --without-cxx-main \ - --disable-sqlite3 \ --disable-test-modules \ --disable-idle3 \ --disable-ossaudiodev @@ -45,6 +44,7 @@ HOST_PYTHON3_CONF_ENV += \ py_cv_module__codecs_jp=n/a \ py_cv_module__codecs_kr=n/a \ py_cv_module__codecs_tw=n/a \ + py_cv_module__sqlite3=n/a \ py_cv_module__tkinter=n/a \ py_cv_module__uuid=n/a \ ac_cv_prog_HAS_HG=/bin/false @@ -118,7 +118,7 @@ endif ifeq ($(BR2_PACKAGE_PYTHON3_SQLITE),y) PYTHON3_DEPENDENCIES += sqlite else -PYTHON3_CONF_OPTS += --disable-sqlite3 +PYTHON3_CONF_ENV += py_cv_module__sqlite3=n/a endif ifeq ($(BR2_PACKAGE_PYTHON3_SSL),y) From patchwork Tue Aug 8 18:51:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1818876 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RL2Rz2yq0z1yfM for ; Wed, 9 Aug 2023 04:54:55 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7DF6A81B26; Tue, 8 Aug 2023 18:54:53 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7DF6A81B26 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jadD0Xg0Qa-p; Tue, 8 Aug 2023 18:54:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 4184182144; Tue, 8 Aug 2023 18:54:51 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 4184182144 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 31FFD1BF330 for ; Tue, 8 Aug 2023 18:54:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 171F0410B8 for ; Tue, 8 Aug 2023 18:54:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 171F0410B8 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Skh0B-rqUC0N for ; Tue, 8 Aug 2023 18:54:25 +0000 (UTC) Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp4.osuosl.org (Postfix) with ESMTPS id 4C82F409E2 for ; Tue, 8 Aug 2023 18:54:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 4C82F409E2 Received: from fli4l.lan.fli4l (p4fd6c649.dip0.t-ipconnect.de [79.214.198.73]) by dd20012.kasserver.com (Postfix) with ESMTPSA id E1EA6A4C1112; Tue, 8 Aug 2023 20:51:10 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:48850) by fli4l.lan.fli4l with esmtp (Exim 4.96) (envelope-from ) id 1qTRnS-0005AS-1j; Tue, 08 Aug 2023 20:51:10 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 8 Aug 2023 20:51:08 +0200 Message-Id: <20230808185108.3787835-17-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808185108.3787835-1-bernd@kuhls.net> References: <20230808185108.3787835-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: -- X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202306131828; t=1691520670; bh=pRs6DRZrJjzCwg+3kvmcCgkHbtSKJeUDbyYhXyOl+5U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W1tpNEC5kBixmiUYdz8onLqyAtbO6Bk1ungwAkqLl/2KZvPbFWIw98/fh2KCWUMq+ umMROuIdpS6G4zY80D6OmByNZrvyXktLi8iheesjuTssM3a1pX8gz1XAYROAC23Hlm MlF24LsaWRZB3/YzL4CfZ499duPLE1G7K9gUNIIZvowKL/RRdUcPjttOas/MwpVsmX +RLUqhByiMlB7xRpiE8BNA0jEZLKumdlK8/g0y7PizKwiplF8QUHlQqJr8rxxvS9yN 0T2/aTw/touVsGwGWkJuc1YELYCKt4WRMTtYVG7lK2iM5rsozLm9WTxdYw37L1l5zq cc6N4g3SnW0lw== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202306131828 header.b=W1tpNEC5 Subject: [Buildroot] [PATCH/next 16/16] package/python3: Remove infrastructure to disable the build of certain extensions X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" All modules are now excluded using features of the upstream build system, partly by backported patches from Python 3.12 branch. Renumber remaining patches. Signed-off-by: Bernd Kuhls --- ...re-to-disable-the-build-of-certain-e.patch | 108 ------------------ ...-header-paths-for-cross-compilation.patch} | 0 ...ok-in-usr-lib-termcap-for-libraries.patch} | 0 ...h => 0005-Don-t-add-multiarch-paths.patch} | 0 ...> 0006-Abort-on-failed-module-build.patch} | 0 ...tch => 0007-Serial-ioctl-workaround.patch} | 0 ...-shebang-of-Python-scripts-for-cros.patch} | 0 ...g.sh.in-ensure-sed-invocations-only.patch} | 0 ...0010-Add-an-option-to-disable-pydoc.patch} | 0 ...11-Add-an-option-to-disable-lib2to3.patch} | 0 ... 0012-Add-an-option-to-disable-IDLE.patch} | 0 ...hon-config.sh-don-t-reassign-prefix.patch} | 0 ...p-CC-print-multiarch-output-for-mus.patch} | 0 ...fix-building-on-older-distributions.patch} | 0 ...ng-doesn-t-set-errno-when-encryptio.patch} | 0 15 files changed, 108 deletions(-) delete mode 100644 package/python3/0003-Add-infrastructure-to-disable-the-build-of-certain-e.patch rename package/python3/{0004-Adjust-library-header-paths-for-cross-compilation.patch => 0003-Adjust-library-header-paths-for-cross-compilation.patch} (100%) rename package/python3/{0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch => 0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch} (100%) rename package/python3/{0006-Don-t-add-multiarch-paths.patch => 0005-Don-t-add-multiarch-paths.patch} (100%) rename package/python3/{0007-Abort-on-failed-module-build.patch => 0006-Abort-on-failed-module-build.patch} (100%) rename package/python3/{0008-Serial-ioctl-workaround.patch => 0007-Serial-ioctl-workaround.patch} (100%) rename package/python3/{0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch => 0008-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch} (100%) rename package/python3/{0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch => 0009-Misc-python-config.sh.in-ensure-sed-invocations-only.patch} (100%) rename package/python3/{0011-Add-an-option-to-disable-pydoc.patch => 0010-Add-an-option-to-disable-pydoc.patch} (100%) rename package/python3/{0012-Add-an-option-to-disable-lib2to3.patch => 0011-Add-an-option-to-disable-lib2to3.patch} (100%) rename package/python3/{0020-Add-an-option-to-disable-IDLE.patch => 0012-Add-an-option-to-disable-IDLE.patch} (100%) rename package/python3/{0026-python-config.sh-don-t-reassign-prefix.patch => 0013-python-config.sh-don-t-reassign-prefix.patch} (100%) rename package/python3/{0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch => 0014-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch} (100%) rename package/python3/{0028-fix-building-on-older-distributions.patch => 0015-fix-building-on-older-distributions.patch} (100%) rename package/python3/{0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch => 0016-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch} (100%) diff --git a/package/python3/0003-Add-infrastructure-to-disable-the-build-of-certain-e.patch b/package/python3/0003-Add-infrastructure-to-disable-the-build-of-certain-e.patch deleted file mode 100644 index 5b3911374e..0000000000 --- a/package/python3/0003-Add-infrastructure-to-disable-the-build-of-certain-e.patch +++ /dev/null @@ -1,108 +0,0 @@ -From 8e02cebdac536dfb6748da2c50656a26f70d9da7 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Wed, 22 Feb 2017 16:33:22 -0800 -Subject: [PATCH] Add infrastructure to disable the build of certain extensions - -Some of the extensions part of the Python core have dependencies on -external libraries (sqlite, tk, etc.) or are relatively big and not -necessarly always useful (CJK codecs for example). By extensions, we -mean part of Python modules that are written in C and therefore -compiled to binary code. - -Therefore, we introduce a small infrastructure that allows to disable -some of those extensions. This can be done inside the configure.ac by -adding values to the DISABLED_EXTENSIONS variable (which is a -word-separated list of extensions). - -The implementation works as follow : - - * configure.ac defines a DISABLED_EXTENSIONS variable, which is - substituted (so that when Makefile.pre is generated from - Makefile.pre.in, the value of the variable is substituted). For - now, this DISABLED_EXTENSIONS variable is empty, later patches will - use it. - - * Makefile.pre.in passes the DISABLED_EXTENSIONS value down to the - variables passed in the environment when calling the setup.py - script that actually builds and installs those extensions. - - * setup.py is modified so that the existing "disabled_module_list" is - filled with those pre-disabled extensions listed in - DISABLED_EXTENSIONS. - -Patch ported to python2.7 by Maxime Ripard , and -then extended by Thomas Petazzoni -. - -Signed-off-by: Thomas Petazzoni -[ Andrey Smirnov: ported to Python 3.6 ] -Signed-off-by: Andrey Smirnov ---- - Makefile.pre.in | 6 +++++- - configure.ac | 2 ++ - setup.py | 5 ++++- - 3 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 2957c8e5a1..c1cfb96767 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -239,6 +239,8 @@ FILEMODE= 644 - # configure script arguments - CONFIG_ARGS= @CONFIG_ARGS@ - -+# disabled extensions -+DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@ - - # Subdirectories with code - SRCDIRS= @SRCDIRS@ -@@ -739,6 +741,7 @@ sharedmods: $(PYTHON_FOR_BUILD_DEPS) pybuilddir.txt @LIBMPDEC_INTERNAL@ @LIBEXPA - *) quiet="";; \ - esac; \ - echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ -+ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \ - $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build -@@ -2228,7 +2231,8 @@ libainstall: all python-config - # Install the dynamically loadable modules - # This goes into $(exec_prefix) - sharedinstall: all -- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ -+ $(RUNSHARED) DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \ -+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ - --prefix=$(prefix) \ - --install-scripts=$(BINDIR) \ - --install-platlib=$(DESTSHARED) \ -diff --git a/configure.ac b/configure.ac -index 830885fcb3..5a6a1fe608 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -3562,6 +3562,8 @@ LIBS="$withval $LIBS" - ], - [AC_MSG_RESULT(no)]) - -+AC_SUBST(DISABLED_EXTENSIONS) -+ - # Check for use of the system expat library - AC_MSG_CHECKING(for --with-system-expat) - AC_ARG_WITH(system_expat, -diff --git a/setup.py b/setup.py -index 15d0d4576a..e496ee34c2 100644 ---- a/setup.py -+++ b/setup.py -@@ -56,7 +56,10 @@ - - - # This global variable is used to hold the list of modules to be disabled. --DISABLED_MODULE_LIST = [] -+try: -+ DISABLED_MODULE_LIST = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ") -+except KeyError: -+ DISABLED_MODULE_LIST = list() - - # --list-module-names option used by Tools/scripts/generate_module_names.py - LIST_MODULE_NAMES = False --- -2.34.1 - diff --git a/package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch b/package/python3/0003-Adjust-library-header-paths-for-cross-compilation.patch similarity index 100% rename from package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch rename to package/python3/0003-Adjust-library-header-paths-for-cross-compilation.patch diff --git a/package/python3/0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch b/package/python3/0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch similarity index 100% rename from package/python3/0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch rename to package/python3/0004-Don-t-look-in-usr-lib-termcap-for-libraries.patch diff --git a/package/python3/0006-Don-t-add-multiarch-paths.patch b/package/python3/0005-Don-t-add-multiarch-paths.patch similarity index 100% rename from package/python3/0006-Don-t-add-multiarch-paths.patch rename to package/python3/0005-Don-t-add-multiarch-paths.patch diff --git a/package/python3/0007-Abort-on-failed-module-build.patch b/package/python3/0006-Abort-on-failed-module-build.patch similarity index 100% rename from package/python3/0007-Abort-on-failed-module-build.patch rename to package/python3/0006-Abort-on-failed-module-build.patch diff --git a/package/python3/0008-Serial-ioctl-workaround.patch b/package/python3/0007-Serial-ioctl-workaround.patch similarity index 100% rename from package/python3/0008-Serial-ioctl-workaround.patch rename to package/python3/0007-Serial-ioctl-workaround.patch diff --git a/package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch b/package/python3/0008-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch similarity index 100% rename from package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch rename to package/python3/0008-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch diff --git a/package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch b/package/python3/0009-Misc-python-config.sh.in-ensure-sed-invocations-only.patch similarity index 100% rename from package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch rename to package/python3/0009-Misc-python-config.sh.in-ensure-sed-invocations-only.patch diff --git a/package/python3/0011-Add-an-option-to-disable-pydoc.patch b/package/python3/0010-Add-an-option-to-disable-pydoc.patch similarity index 100% rename from package/python3/0011-Add-an-option-to-disable-pydoc.patch rename to package/python3/0010-Add-an-option-to-disable-pydoc.patch diff --git a/package/python3/0012-Add-an-option-to-disable-lib2to3.patch b/package/python3/0011-Add-an-option-to-disable-lib2to3.patch similarity index 100% rename from package/python3/0012-Add-an-option-to-disable-lib2to3.patch rename to package/python3/0011-Add-an-option-to-disable-lib2to3.patch diff --git a/package/python3/0020-Add-an-option-to-disable-IDLE.patch b/package/python3/0012-Add-an-option-to-disable-IDLE.patch similarity index 100% rename from package/python3/0020-Add-an-option-to-disable-IDLE.patch rename to package/python3/0012-Add-an-option-to-disable-IDLE.patch diff --git a/package/python3/0026-python-config.sh-don-t-reassign-prefix.patch b/package/python3/0013-python-config.sh-don-t-reassign-prefix.patch similarity index 100% rename from package/python3/0026-python-config.sh-don-t-reassign-prefix.patch rename to package/python3/0013-python-config.sh-don-t-reassign-prefix.patch diff --git a/package/python3/0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch b/package/python3/0014-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch similarity index 100% rename from package/python3/0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch rename to package/python3/0014-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch diff --git a/package/python3/0028-fix-building-on-older-distributions.patch b/package/python3/0015-fix-building-on-older-distributions.patch similarity index 100% rename from package/python3/0028-fix-building-on-older-distributions.patch rename to package/python3/0015-fix-building-on-older-distributions.patch diff --git a/package/python3/0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch b/package/python3/0016-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch similarity index 100% rename from package/python3/0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch rename to package/python3/0016-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch