Skip to content

Commit

Permalink
Use local directory as tmp on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lexiforest committed Oct 21, 2024
1 parent b97e2b7 commit bbc6ae3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# this is the upstream libcurl-impersonate version
__version__ = "0.8.0"

tmpdir = None


def detect_arch():
with open(Path(__file__).parent.parent / "libs.json") as f:
Expand All @@ -38,8 +36,13 @@ def detect_arch():
arch["libdir"] = os.path.expanduser(arch["libdir"])
else:
global tmpdir
tmpdir = tempfile.TemporaryDirectory()
arch["libdir"] = tmpdir.name
if "CI" in os.environ:
tmpdir = "./tmplibdir"
os.mkdir(tmpdir)
arch["libdir"] = tmpdir
else:
tmpdir = tempfile.TemporaryDirectory()
arch["libdir"] = tmpdir.name
return arch
raise Exception(f"Unsupported arch: {uname}")

Expand Down

0 comments on commit bbc6ae3

Please sign in to comment.