From ea1af95b84cd84f97b802f4bb9f470a899e305af Mon Sep 17 00:00:00 2001 From: Ashley Milsted Date: Thu, 28 Nov 2024 10:38:01 -0800 Subject: [PATCH] respect current juliaup depot path --- .github/workflows/tests.yml | 1 + src/juliapkg/find_julia.py | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9f204d7..c96421d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,6 +35,7 @@ jobs: ruff check - name: Test with pytest run: | + export JULIA_DEPOT_PATH=$PWD/julia_depot pytest --cov=src test - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 diff --git a/src/juliapkg/find_julia.py b/src/juliapkg/find_julia.py index 86015ef..c070460 100644 --- a/src/juliapkg/find_julia.py +++ b/src/juliapkg/find_julia.py @@ -172,7 +172,14 @@ def ju_find_julia(compat=None, install=False): def ju_find_julia_noinstall(compat=None): - judir = os.path.join(STATE["depot"], "juliaup") + # juliaup does not follow JULIA_DEPOT_PATH, but instead defines its + # own env var for overriding ~/.julia + ju_depot_path = os.getenv("JULIAUP_DEPOT_PATH") + if not ju_depot_path: + ju_depot_path = os.path.abspath( + os.path.join(os.path.expanduser("~"), ".julia") + ) + judir = os.path.join(ju_depot_path, "juliaup") metaname = os.path.join(judir, "juliaup.json") arch = get_short_arch() if os.path.exists(metaname):