aboutsummaryrefslogtreecommitdiffstats
path: root/host/python
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-05-07 09:43:15 -0700
committerAaron Rossetto <aaron.rossetto@ni.com>2020-05-07 15:10:41 -0500
commit1bba62a75a0ce825b66d6f06fbfe4d73ffc6d50a (patch)
tree51d34499aa91d7555338952f946a9f6c48ea0b71 /host/python
parent75b7991378e3f465f9d91cba597d98ee5b9054ed (diff)
downloaduhd-1bba62a75a0ce825b66d6f06fbfe4d73ffc6d50a.tar.gz
uhd-1bba62a75a0ce825b66d6f06fbfe4d73ffc6d50a.tar.bz2
uhd-1bba62a75a0ce825b66d6f06fbfe4d73ffc6d50a.zip
Remove remaining Python 2 references
This changes two things in all applicable files: - Remove imports from __future__ - Change default shebangs from /usr/bin/env python to /usr/bin/env python3
Diffstat (limited to 'host/python')
-rw-r--r--host/python/CMakeLists.txt5
-rwxr-xr-xhost/python/setup.py.in2
2 files changed, 3 insertions, 4 deletions
diff --git a/host/python/CMakeLists.txt b/host/python/CMakeLists.txt
index 0990e2582..04e637f2e 100644
--- a/host/python/CMakeLists.txt
+++ b/host/python/CMakeLists.txt
@@ -25,7 +25,7 @@ set(PYBIND11_INCLUDE_DIR
include_directories(${PYBIND11_INCLUDE_DIR})
execute_process(
COMMAND "${PYTHON_EXECUTABLE}" -c
- "from __future__ import print_function\ntry:\n import numpy\n import os\n inc_path = numpy.get_include()\n if os.path.exists(os.path.join(inc_path, 'numpy', 'arrayobject.h')):\n print(inc_path, end='')\nexcept:\n pass"
+ "try:\n import numpy\n import os\n inc_path = numpy.get_include()\n if os.path.exists(os.path.join(inc_path, 'numpy', 'arrayobject.h')):\n print(inc_path, end='')\nexcept:\n pass"
OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIR)
# Build pyuhd library
@@ -99,8 +99,7 @@ else()
# packages, and install to our prefix
if(NOT DEFINED UHD_PYTHON_DIR)
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
- "from __future__ import print_function;\
- from distutils import sysconfig;\
+ "from distutils import sysconfig;\
print(sysconfig.get_python_lib(plat_specific=True, prefix='${CMAKE_INSTALL_PREFIX}'));"
OUTPUT_VARIABLE UHD_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE
)
diff --git a/host/python/setup.py.in b/host/python/setup.py.in
index 4d2df10a5..505e8d199 100755
--- a/host/python/setup.py.in
+++ b/host/python/setup.py.in
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2017-2018 Ettus Research, a National Instruments Company
#