Skip to content

Commit

Permalink
fix: look for Julia-specific Python in JULIA_HOME (#6393)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfitzseb authored Aug 12, 2023
1 parent 2bc9688 commit f1022e4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions news/changelog-1.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
- Support for executing inline expressions (e.g. `` `{python} x` ``)
- ([#6344](https://github.com/quarto-dev/quarto-cli/issues/6344)): Somewhat improve the error message in case of YAML parsing errors in metadata of Python code cells.
- ([#6367](https://github.com/quarto-dev/quarto-cli/issues/6367)): Fix bug with nested code cells in the generation of Jupyter notebook from .qmd files.
- ([#6393](https://github.com/quarto-dev/quarto-cli/pull/6393)): Search `JULIA_HOME` for Julia-specific Python installations.

## OJS engine

Expand Down
13 changes: 10 additions & 3 deletions src/core/jupyter/capabilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,16 @@ export async function jupyterCapabilities(kernelspec?: JupyterKernelspec) {
const S_IXUSR = 0o100;

async function getVerifiedJuliaCondaJupyterCapabilities() {
const home = isWindows() ? Deno.env.get("USERPROFILE") : Deno.env.get("HOME");
if (home) {
const juliaCondaPath = join(home, ".julia", "conda", "3");
let juliaHome = Deno.env.get("JULIA_HOME");
if (!juliaHome) {
const home = isWindows() ? Deno.env.get("USERPROFILE") : Deno.env.get("HOME");
if (home) {
juliaHome = join(home, ".julia");
}
}

if (juliaHome) {
const juliaCondaPath = join(juliaHome, "conda", "3");
const bin = isWindows()
? ["python3.exe", "python.exe"]
: [join("bin", "python3"), join("bin", "python")];
Expand Down

0 comments on commit f1022e4

Please sign in to comment.