From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2E243158020 for ; Fri, 11 Nov 2022 22:34:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3FED3E08A2; Fri, 11 Nov 2022 22:34:56 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2089DE08A2 for ; Fri, 11 Nov 2022 22:34:56 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0ED0C340E31 for ; Fri, 11 Nov 2022 22:34:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6685472B for ; Fri, 11 Nov 2022 22:34:53 +0000 (UTC) From: "Alfredo Tupone" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alfredo Tupone" Message-ID: <1668206081.ebdd2a9c7d597d29d1efa38f8bac6b3e68a8adb7.tupone@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/cvc4/files/, sci-mathematics/cvc4/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-mathematics/cvc4/cvc4-1.8-r1.ebuild sci-mathematics/cvc4/cvc4-1.8-r2.ebuild sci-mathematics/cvc4/files/cvc4-1.8-toml.patch X-VCS-Directories: sci-mathematics/cvc4/files/ sci-mathematics/cvc4/ X-VCS-Committer: tupone X-VCS-Committer-Name: Alfredo Tupone X-VCS-Revision: ebdd2a9c7d597d29d1efa38f8bac6b3e68a8adb7 X-VCS-Branch: master Date: Fri, 11 Nov 2022 22:34:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 21b99e26-7851-4067-96f7-234b76c1b935 X-Archives-Hash: bb5b0819644e0b496f4b030fac97c0ce commit: ebdd2a9c7d597d29d1efa38f8bac6b3e68a8adb7 Author: Alfredo Tupone gentoo org> AuthorDate: Fri Nov 11 22:34:11 2022 +0000 Commit: Alfredo Tupone gentoo org> CommitDate: Fri Nov 11 22:34:41 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ebdd2a9c sci-mathematics/cvc4: drop toml usage Closes: https://bugs.gentoo.org/878679 Signed-off-by: Alfredo Tupone gentoo.org> .../{cvc4-1.8-r1.ebuild => cvc4-1.8-r2.ebuild} | 9 +++-- sci-mathematics/cvc4/files/cvc4-1.8-toml.patch | 46 ++++++++++++++++++++++ 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/sci-mathematics/cvc4/cvc4-1.8-r1.ebuild b/sci-mathematics/cvc4/cvc4-1.8-r2.ebuild similarity index 87% rename from sci-mathematics/cvc4/cvc4-1.8-r1.ebuild rename to sci-mathematics/cvc4/cvc4-1.8-r2.ebuild index c013d2a2ed33..5757f85d54c2 100644 --- a/sci-mathematics/cvc4/cvc4-1.8-r1.ebuild +++ b/sci-mathematics/cvc4/cvc4-1.8-r2.ebuild @@ -24,16 +24,19 @@ RDEPEND="dev-libs/antlr-c !cln? ( dev-libs/gmp:= )" DEPEND="${RDEPEND}" BDEPEND="$(python_gen_any_dep ' - dev-python/toml[${PYTHON_USEDEP}] + dev-python/tomli[${PYTHON_USEDEP}] ') " S="${WORKDIR}"/${PN^^}-archived-${PV} -PATCHES=( "${FILESDIR}"/${P}-gentoo.patch ) +PATCHES=( + "${FILESDIR}"/${P}-gentoo.patch + "${FILESDIR}"/${P}-toml.patch +) python_check_deps() { - python_has_version "dev-python/toml[${PYTHON_USEDEP}]" + python_has_version "dev-python/tomli[${PYTHON_USEDEP}]" } src_configure() { diff --git a/sci-mathematics/cvc4/files/cvc4-1.8-toml.patch b/sci-mathematics/cvc4/files/cvc4-1.8-toml.patch new file mode 100644 index 000000000000..f2ac73bf25c3 --- /dev/null +++ b/sci-mathematics/cvc4/files/cvc4-1.8-toml.patch @@ -0,0 +1,46 @@ +--- a/src/options/CMakeLists.txt 2022-11-11 23:12:59.874087267 +0100 ++++ b/src/options/CMakeLists.txt 2022-11-11 23:13:11.974894643 +0100 +@@ -1,17 +1,3 @@ +-# Check if the toml Python module is installed. +-execute_process( +- COMMAND +- ${PYTHON_EXECUTABLE} -c "import toml" +- RESULT_VARIABLE +- RET_TOML +- ERROR_QUIET +-) +- +-if(RET_TOML) +- message(FATAL_ERROR +- "Could not find Python module toml. Install via `pip install toml'.") +-endif() +- + libcvc4_add_sources( + base_handlers.h + decision_weight.h +--- a/src/options/mkoptions.py 2022-11-11 23:16:22.577858012 +0100 ++++ b/src/options/mkoptions.py 2022-11-11 23:23:12.014320054 +0100 +@@ -46,7 +46,11 @@ + import re + import sys + import textwrap +-import toml ++ ++if sys.version_info >= (3, 11): ++ import tomllib ++else: ++ import tomli as tomllib + + ### Allowed attributes for module/option/alias + +@@ -1309,7 +1313,9 @@ + # Parse files, check attributes and create module/option objects + modules = [] + for filename in filenames: +- module = parse_module(filename, toml.load(filename)) ++ with open(filename, "rb") as f: ++ d1 = tomllib.load(f) ++ module = parse_module(filename, d1) + + # Check if long options are valid and unique. First populate + # g_long_cache with option.long and --no- alternatives if