File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -10,3 +10,17 @@ diff -Naur nanopb/CMakeLists.txt nanopb-fix/CMakeLists.txt
10
10
execute_process(
11
11
COMMAND ${PYTHON_EXECUTABLE} -c
12
12
"from distutils import sysconfig; print(sysconfig.get_python_lib(prefix=''))"
13
+ diff -Naur nanopb/generator/nanopb_generator.py nanopb-fix/generator/nanopb_generator.py
14
+ --- nanopb/generator/nanopb_generator.py 2021-03-22 08:50:07.000000000 -0400
15
+ +++ nanopb-fix/generator/nanopb_generator.py 2022-11-01 15:37:38.112297044 -0400
16
+ @@ -1641,7 +1641,9 @@
17
+ optfilename = os.path.join(p, optfilename)
18
+ if options.verbose:
19
+ sys.stderr.write('Reading options from ' + optfilename + '\n')
20
+ - Globals.separate_options = read_options_file(open(optfilename, "rU"))
21
+ + # Patch in https://github.com/nanopb/nanopb/commit/01e9186a8b to avoid
22
+ + # using "U" in the filemode, whose support was removed in Python 3.11.
23
+ + Globals.separate_options = read_options_file(open(optfilename, 'r', encoding = 'utf-8'))
24
+ break
25
+ else:
26
+ # If we are given a full filename and it does not exist, give an error.
You can’t perform that action at this time.
0 commit comments