--- cmake/Modules/GrSwig.cmake.orig 2023-02-07 13:13:25.000000000 -0500 +++ cmake/Modules/GrSwig.cmake 2023-02-07 13:13:31.000000000 -0500 @@ -118,16 +118,12 @@ list(INSERT GR_SWIG_INCLUDE_DIRS 0 "$") list(INSERT GR_SWIG_INCLUDE_DIRS 0 "$") - if (PYTHON3) - set(py3 "-py3") - endif (PYTHON3) - #setup the swig flags with flags and include directories set(modern_keyword "-modern") if("${SWIG_VERSION}" VERSION_GREATER "3.0.12") set(modern_keyword "") endif() - set(CMAKE_SWIG_FLAGS -fvirtual ${modern_keyword} -keyword -w511 -w314 -relativeimport ${py3} -module ${name} ${GR_SWIG_FLAGS}) + set(CMAKE_SWIG_FLAGS -fvirtual ${modern_keyword} -keyword -w511 -w314 -relativeimport -module ${name} ${GR_SWIG_FLAGS}) #set the C++ property on the swig .i file so it builds set_source_files_properties(${ifiles} PROPERTIES CPLUSPLUS ON) --- ./gnuradio-runtime/swig/gnuradio.i.orig 2023-02-07 13:09:22.000000000 -0500 +++ ./gnuradio-runtime/swig/gnuradio.i 2023-02-07 13:12:49.000000000 -0500 @@ -23,6 +23,13 @@ // Disable warning about base class types #pragma SWIG nowarn=401 +// Turn on function annotations and variable annotations globally. +// Required Python 3.6 or newer. This fix is for MacPorts only, +// and we limit Python to 3.7 or newer, so we're safe here. +// See also https://trac.macports.org/ticket/66389 and +// https://www.swig.org/Doc4.1/Python.html#Python_annotations_c +%feature("python:annotations", "c"); + //////////////////////////////////////////////////////////////////////// // gnuradio.i // SWIG interface definition