mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 17:52:02 +02:00
Merge branch 'fix-mistake-in-previous-pr' of https://github.com/Luflosi/kitty into master
This commit is contained in:
4
setup.py
4
setup.py
@@ -13,7 +13,6 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import sysconfig
|
import sysconfig
|
||||||
import tempfile
|
|
||||||
import time
|
import time
|
||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
from functools import partial
|
from functools import partial
|
||||||
@@ -214,9 +213,8 @@ def get_sanitize_args(cc: str, ccver: Tuple[int, int]) -> List[str]:
|
|||||||
|
|
||||||
def test_compile(cc: str, *cflags: str, src: Optional[str] = None, lang: str = 'c') -> bool:
|
def test_compile(cc: str, *cflags: str, src: Optional[str] = None, lang: str = 'c') -> bool:
|
||||||
src = src or 'int main(void) { return 0; }'
|
src = src or 'int main(void) { return 0; }'
|
||||||
with tempfile.TemporaryDirectory() as tdir:
|
|
||||||
p = subprocess.Popen(
|
p = subprocess.Popen(
|
||||||
[cc] + list(cflags) + ['-x', lang, '-o', os.devnull, '-'], cwd=tdir,
|
[cc] + list(cflags) + ['-x', lang, '-o', os.devnull, '-'],
|
||||||
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, stdin=subprocess.PIPE,
|
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, stdin=subprocess.PIPE,
|
||||||
)
|
)
|
||||||
stdin = p.stdin
|
stdin = p.stdin
|
||||||
|
|||||||
Reference in New Issue
Block a user