8000 BUG: distutils/system_info.py fix missing subprocess import (#13523) · numpy/numpy@46f8459 · GitHub
[go: up one dir, main page]

Skip to content

Commit 46f8459

Browse files
denniszollocharris
authored andcommitted
BUG: distutils/system_info.py fix missing subprocess import (#13523)
* distutils/system_info.py fix missing subprocess import * Update system_info.py
1 parent 3556883 commit 46f8459

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

numpy/distutils/system_info.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@
126126
import re
127127
import copy
128128
import warnings
129+
import subprocess
130+
129131
from glob import glob
130132
from functools import reduce
131133
if sys.version_info[0] < 3:
@@ -298,13 +300,12 @@ def add_system_root(library_root):
298300
default_x11_include_dirs.extend(['/usr/lib/X11/include',
299301
'/usr/include/X11'])
300302

301-
import subprocess as sp
302303
tmp = None
303304
try:
304305
# Explicitly open/close file to avoid ResourceWarning when
305306
# tests are run in debug mode Python 3.
306307
tmp = open(os.devnull, 'w')
307-
p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.PIPE,
308+
p = subprocess.Popen(["gcc", "-print-multiarch"], stdout=subprocess.PIPE,
308309
stderr=tmp)
309310
except (OSError, DistutilsError):
310311
# OSError if gcc is not installed, or SandboxViolation (DistutilsError

0 commit comments

Comments
 (0)
0