diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-05-07 09:43:15 -0700 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-05-07 15:10:41 -0500 |
commit | 1bba62a75a0ce825b66d6f06fbfe4d73ffc6d50a (patch) | |
tree | 51d34499aa91d7555338952f946a9f6c48ea0b71 /host/python | |
parent | 75b7991378e3f465f9d91cba597d98ee5b9054ed (diff) | |
download | uhd-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.txt | 5 | ||||
-rwxr-xr-x | host/python/setup.py.in | 2 |
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 # |