Skip to content

Commit bbc6ae3

Browse files
committed
Use local directory as tmp on CI
1 parent b97e2b7 commit bbc6ae3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

scripts/build.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# this is the upstream libcurl-impersonate version
1313
__version__ = "0.8.0"
1414

15-
tmpdir = None
16-
1715

1816
def detect_arch():
1917
with open(Path(__file__).parent.parent / "libs.json") as f:
@@ -38,8 +36,13 @@ def detect_arch():
3836
arch["libdir"] = os.path.expanduser(arch["libdir"])
3937
else:
4038
global tmpdir
41-
tmpdir = tempfile.TemporaryDirectory()
42-
arch["libdir"] = tmpdir.name
39+
if "CI" in os.environ:
40+
tmpdir = "./tmplibdir"
41+
os.mkdir(tmpdir)
42+
arch["libdir"] = tmpdir
43+
else:
44+
tmpdir = tempfile.TemporaryDirectory()
45+
arch["libdir"] = tmpdir.name
4346
return arch
4447
raise Exception(f"Unsupported arch: {uname}")
4548

0 commit comments

Comments
 (0)