diff options
author | Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> | 2021-09-21 15:14:10 +0200 |
---|---|---|
committer | Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> | 2021-09-21 18:44:04 +0200 |
commit | 5cece38e4bd103e2dfbd2cb0c2e0b64256f5f485 (patch) | |
tree | d5eabb8c0299f3b1186f250f56303dd2b476b553 /numpy/linalg/lapack_lite/make_lite.py | |
parent | f807a0bafcbdfcccb1525f051e9df11053ac4eac (diff) | |
download | numpy-5cece38e4bd103e2dfbd2cb0c2e0b64256f5f485.tar.gz |
REV: 96727cf
This is a Python 2 script, and will remain so for some time.
Instead of simply reverting the commit, use try/except to find the
proper way to import which.
Diffstat (limited to 'numpy/linalg/lapack_lite/make_lite.py')
-rwxr-xr-x | numpy/linalg/lapack_lite/make_lite.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/linalg/lapack_lite/make_lite.py b/numpy/linalg/lapack_lite/make_lite.py index 73e4d194e..398c27e94 100755 --- a/numpy/linalg/lapack_lite/make_lite.py +++ b/numpy/linalg/lapack_lite/make_lite.py @@ -21,7 +21,10 @@ import shutil import fortran import clapack_scrub -from shutil import which +try: + from distutils.spawn import find_executable as which # Python 2 +except ImportError: + from shutil import which # Python 3 # Arguments to pass to f2c. You'll always want -A for ANSI C prototypes # Others of interest: -a to not make variables static by default |