MCPcopy Create free account
hub / github.com/numpy/numpy / get_target

Method get_target

numpy/distutils/fcompiler/gnu.py:383–399  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

381 return opt
382
383 def get_target(self):
384 try:
385 p = subprocess.Popen(
386 self.compiler_f77 + ['-v'],
387 stdin=subprocess.PIPE,
388 stderr=subprocess.PIPE,
389 )
390 stdout, stderr = p.communicate()
391 output = (stdout or b"") + (stderr or b"")
392 except (OSError, subprocess.CalledProcessError):
393 pass
394 else:
395 output = filepath_from_subprocess_output(output)
396 m = TARGET_R.search(output)
397 if m:
398 return m.group(1)
399 return ""
400
401 def _hash_files(self, filenames):
402 h = hashlib.sha1()

Callers 1

get_library_dirsMethod · 0.95

Calls 1

Tested by

no test coverage detected