(cc, regexp)
| 1361 | # https://github.com/openssl/openssl/blob/OpenSSL_1_0_2-stable/crypto/sha/asm/sha512-x86_64.pl#L112-L129 |
| 1362 | # |
| 1363 | def get_version_helper(cc, regexp): |
| 1364 | try: |
| 1365 | proc = subprocess.Popen(shlex.split(cc) + ['-v'], stdin=subprocess.PIPE, |
| 1366 | stderr=subprocess.PIPE, stdout=subprocess.PIPE) |
| 1367 | except OSError: |
| 1368 | error('''No acceptable C compiler found! |
| 1369 | |
| 1370 | Please make sure you have a C compiler installed on your system and/or |
| 1371 | consider adjusting the CC environment variable if you installed |
| 1372 | it in a non-standard prefix.''') |
| 1373 | |
| 1374 | with proc: |
| 1375 | match = re.search(regexp, to_utf8(proc.communicate()[1])) |
| 1376 | |
| 1377 | return match.group(2) if match else '0.0' |
| 1378 | |
| 1379 | def get_nasm_version(asm): |
| 1380 | try: |
no test coverage detected
searching dependent graphs…