diff options
author | denniszollo <dzollo@swift-nav.com> | 2019-05-19 11:31:58 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2019-05-19 11:31:58 -0700 |
commit | bdd75dff0aa8b77be5784923befb6410fc2f4837 (patch) | |
tree | c4795768c5fbf64c12ee784482d6f63475e5d0c7 /numpy/distutils | |
parent | 433d8b2493c716b6617e1fb8b055bc702f17ddb7 (diff) | |
download | numpy-bdd75dff0aa8b77be5784923befb6410fc2f4837.tar.gz |
BUG: distutils/system_info.py fix missing subprocess import (#13523)
* distutils/system_info.py fix missing subprocess import
* Update system_info.py
Diffstat (limited to 'numpy/distutils')
-rw-r--r-- | numpy/distutils/system_info.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py index 1f4552aea..21d134c6b 100644 --- a/numpy/distutils/system_info.py +++ b/numpy/distutils/system_info.py @@ -126,6 +126,8 @@ import os import re import copy import warnings +import subprocess + from glob import glob from functools import reduce if sys.version_info[0] < 3: @@ -298,13 +300,12 @@ else: default_x11_include_dirs.extend(['/usr/lib/X11/include', '/usr/include/X11']) - import subprocess as sp tmp = None try: # Explicitly open/close file to avoid ResourceWarning when # tests are run in debug mode Python 3. tmp = open(os.devnull, 'w') - p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.PIPE, + p = subprocess.Popen(["gcc", "-print-multiarch"], stdout=subprocess.PIPE, stderr=tmp) except (OSError, DistutilsError): # OSError if gcc is not installed, or SandboxViolation (DistutilsError |