diff options
author | Marcus Müller <mmueller@gnuradio.org> | 2019-08-10 01:01:56 +0200 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2020-01-04 18:48:20 -0800 |
commit | 678a7c2ad5db89e0634bfae2b0c9186f1ce63e89 (patch) | |
tree | a86eaf74a5ea951cc113f2260e539d6ab1a9e421 /grc | |
parent | 7d3c207e66f387151c9f0771e1bce3d735fbc507 (diff) |
Disable Python 2k
- Update SWIG settings
- Update CMake
- Remove Python2 references
Note: This does not touch a lot of Python files, and many Python files
will still work with Python 2 after this commit. However, we won't allow
that in our CMake, and the support will be gone too.
Diffstat (limited to 'grc')
-rw-r--r-- | grc/CMakeLists.txt | 9 | ||||
-rw-r--r-- | grc/core/generator/flow_graph.py.mako | 9 |
2 files changed, 4 insertions, 14 deletions
diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt index ba69764f8a..9a807e1cc0 100644 --- a/grc/CMakeLists.txt +++ b/grc/CMakeLists.txt @@ -25,10 +25,9 @@ include(GrPython) message(STATUS "") GR_PYTHON_CHECK_MODULE_RAW( - "python2 >= 2.7.6 or python3 >= 3.6.5" + "python3 >= ${GR_PYTHON_MIN_VERSION}" "import sys; \ - requirement = (3, 6, 5) if sys.version_info.major >= 3 else (2, 7, 6); \ - assert sys.version_info[:3] >= requirement" + assert '.'.join([str(x) for x in sys.version_info[:3]]) >= '${GR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND ) @@ -39,8 +38,8 @@ GR_PYTHON_CHECK_MODULE_RAW( ) GR_PYTHON_CHECK_MODULE_RAW( - "mako >= 0.9.1" - "import mako; assert mako.__version__ >= '0.9.1'" + "mako >= ${GR_MAKO_MIN_VERSION}" + "import mako; assert mako.__version__ >= '${GR_MAKO_MIN_VERSION}'" MAKO_FOUND ) diff --git a/grc/core/generator/flow_graph.py.mako b/grc/core/generator/flow_graph.py.mako index 8da3011749..3fb540d8d1 100644 --- a/grc/core/generator/flow_graph.py.mako +++ b/grc/core/generator/flow_graph.py.mako @@ -1,15 +1,6 @@ % if not generate_options.startswith('hb'): -<% -from sys import version_info -from gnuradio import eng_notation -python_version = version_info.major -%>\ -% if python_version == 2: -#!/usr/bin/env python2 -% elif python_version == 3: #!/usr/bin/env python3 % endif -% endif # -*- coding: utf-8 -*- <%def name="indent(code)">${ '\n '.join(str(code).splitlines()) }</%def> # |