summaryrefslogtreecommitdiff
path: root/sci-mathematics/cvc4/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-11-12 03:31:11 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-11-12 03:31:11 +0000
commit3a9a4f8b478ff62e3c752e20305edb2c7d91959f (patch)
treeaf2b80e575254ddcdc57ea6b2ae02607bb0a7824 /sci-mathematics/cvc4/files
parent7236d0a40beeff3f6f0fcede52d54dfb81880faa (diff)
gentoo auto-resync : 12:11:2022 - 03:31:11
Diffstat (limited to 'sci-mathematics/cvc4/files')
-rw-r--r--sci-mathematics/cvc4/files/cvc4-1.8-toml.patch46
1 files changed, 46 insertions, 0 deletions
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