33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
--- src/options/CMakeLists.txt.orig 2020-06-19 10:59:27.000000000 -0600
|
|
+++ src/options/CMakeLists.txt 2022-10-11 09:51:23.145795341 -0600
|
|
@@ -1,7 +1,7 @@
|
|
# Check if the toml Python module is installed.
|
|
execute_process(
|
|
COMMAND
|
|
- ${PYTHON_EXECUTABLE} -c "import toml"
|
|
+ ${PYTHON_EXECUTABLE} -c "import tomllib"
|
|
RESULT_VARIABLE
|
|
RET_TOML
|
|
ERROR_QUIET
|
|
--- src/options/mkoptions.py.orig 2020-06-19 10:59:27.000000000 -0600
|
|
+++ src/options/mkoptions.py 2022-10-11 09:54:27.753086129 -0600
|
|
@@ -46,7 +46,7 @@ import os
|
|
import re
|
|
import sys
|
|
import textwrap
|
|
-import toml
|
|
+import tomllib
|
|
|
|
### Allowed attributes for module/option/alias
|
|
|
|
@@ -1309,7 +1309,8 @@ def mkoptions_main():
|
|
# 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:
|
|
+ module = parse_module(filename, tomllib.load(f))
|
|
|
|
# Check if long options are valid and unique. First populate
|
|
# g_long_cache with option.long and --no- alternatives if
|