Skip to content

Commit

Permalink
DX: install IJulia kernel through conf.py
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed May 9, 2024
1 parent de36483 commit 78b0215
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ build:
- filename=julia-${version}-linux-x86_64.tar.gz
- wget -q https://julialang-s3.julialang.org/bin/linux/x64/${major_version}/${filename}
- mkdir julia
- tar xzf ${filename} -C julia --strip-components=1
- ./julia/bin/julia docs/InstallIJulia.jl
- tar xzf ${filename} -C ~/.local --strip-components=1
- julia docs/InstallIJulia.jl
9 changes: 9 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import os
import shutil
import subprocess # noqa: S404
import sys

from sphinx_api_relink.helpers import (
Expand Down Expand Up @@ -52,7 +53,15 @@ def get_nb_exclusion_patterns() -> list[str]:
return exclusions


def install_ijulia() -> None:
if shutil.which("julia") is None:
return
if "EXECUTE_NB" in os.environ or "FORCE_EXECUTE_NB" in os.environ:
subprocess.check_call(["julia", "InstallIJulia.jl"]) # noqa: S603, S607


_list_technical_reports.main()
install_ijulia()
set_intersphinx_version_remapping({
"ipython": {
"8.12.2": "8.12.1",
Expand Down

0 comments on commit 78b0215

Please sign in to comment.