Skip to content

Commit

Permalink
respect current juliaup depot path
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashley Milsted committed Nov 28, 2024
1 parent 3a2c660 commit ea1af95
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion src/juliapkg/find_julia.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit ea1af95

Please sign in to comment.