Skip to content

Commit 477983a

Browse files
committed
fix using getCurrentDir in absolutePath at compile time causing a build error
1 parent 0c65227 commit 477983a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

nimjl.nimble

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Nimjl
22
# Licensed and distributed under MIT license (license terms in the root directory or at http://opensource.org/licenses/MIT).
3-
version = "0.7.2"
3+
version = "0.7.3"
44
author = "Regis Caillaud"
55
description = "Nim Julia bridge"
66
license = "MIT"

nimjl/config.nim

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import std/os
22
import std/strutils
33

4-
const JuliaBinPath = gorge("julia -E Sys.BINDIR").replace("\"", "")
4+
proc JuliaBinPath*() : string {.compileTime.} =
5+
gorge("julia -E Sys.BINDIR").replace("\"", "")
56

67
# JuliaPath should be parent folder of Julia-bindir
78
# This is resolved AT COMPILE TIME. Therefore, using the environment of the machine that compile.
89
# If you want to ship a binary, you need to install in a fixed path and pass this path using -d:JuliaPath="/path/to/Julia"
9-
const JuliaPath* {.strdefine.} = if not existsEnv("JULIA_PATH"): JuliaBinPath.parentDir().normalizedPath().absolutePath() else: getEnv("JULIA_PATH")
10-
static:
11-
echo JuliaPath
10+
const JuliaPath* {.strdefine.} = if not existsEnv("JULIA_PATH"): JuliaBinPath().parentDir().normalizedPath() else: getEnv("JULIA_PATH")
11+
1212
const JuliaIncludesPath* = JuliaPath / "include" / "julia"
1313
const JuliaHeader* = "julia.h"
1414
const JuliaLibPath* = JuliaPath / "lib"

0 commit comments

Comments
 (0)