Remove Python 2 mentions

Also fix up indents
This commit is contained in:
Martin Rys
2025-11-28 20:26:44 +01:00
committed by Martin
parent 45517b8a66
commit 8e2620a597
2 changed files with 35 additions and 43 deletions

View File

@ -86,22 +86,17 @@ endif
# #
ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),clean)
PYTHON_INTERPRETER = $(shell python --version)
ifeq ($(PYTHON_INTERPRETER), )
PYTHON_INTERPRETER = $(shell python2 --version)
ifeq ($(PYTHON_INTERPRETER), )
PYTHON_INTERPRETER = $(shell python3 --version) PYTHON_INTERPRETER = $(shell python3 --version)
ifeq ($(PYTHON_INTERPRETER), )
PYTHON_INTERPRETER = $(shell python --version)
ifeq ($(PYTHON_INTERPRETER), ) ifeq ($(PYTHON_INTERPRETER), )
$(error ERROR: Can not find Python interpreter!) $(error ERROR: Can not find Python interpreter!)
else
PYTHON_INTERPRETER = "python3"
endif
else
PYTHON_INTERPRETER = "python2"
endif
else else
PYTHON_INTERPRETER = "python" PYTHON_INTERPRETER = "python"
endif endif
else
PYTHON_INTERPRETER = "python3"
endif
endif endif
# #

View File

@ -4,12 +4,9 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# See COPYING file for more information. # See COPYING file for more information.
from __future__ import absolute_import, division, print_function
import math import math
import sys import sys
import os import os
import random
import struct
import getopt import getopt
import numpy as np import numpy as np
@ -125,7 +122,7 @@ def dofft(x, isreal):
p.wait() p.wait()
return np.reshape(res, dims) return np.reshape(res, dims)
def main(): def main() -> None:
opts, args = getopt.getopt(sys.argv[1:], 'r') opts, args = getopt.getopt(sys.argv[1:], 'r')
opts = dict(opts) opts = dict(opts)
global do_real global do_real