Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

respect current juliaup depot path #44

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
pyversion: ["3.x", "3.8"]
env:
JULIA_DEPOT_PATH: ${{ github.workspace }}/julia_depot
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.pyversion }}
Expand All @@ -33,9 +35,15 @@ jobs:
run: |
ruff format --check
ruff check
- name: Install juliaup (Linux and macOS only)
if: runner.os != 'Windows'
shell: bash
run: |
curl -fsSL https://install.julialang.org | sh -s -- -y
export PATH=/home/runner/.juliaup/bin:$PATH
- name: Test with pytest
run: |
pytest --cov=src test
pytest -s --cov=src test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
Expand Down
7 changes: 6 additions & 1 deletion src/juliapkg/find_julia.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,12 @@ 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
Loading