Skip to content

Commit 7d6bf8f

Browse files
committed
Use chdir hack in macOS
1 parent 9b5782d commit 7d6bf8f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/julia/libjulia.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from .juliainfo import JuliaInfo
1111
from .options import parse_jl_options
12-
from .utils import is_windows
12+
from .utils import is_apple, is_windows
1313

1414
logger = getLogger("julia")
1515

@@ -223,7 +223,7 @@ def __init__(self, libjulia_path, bindir, sysimage):
223223

224224
@contextmanager
225225
def _windows_pathhack(self):
226-
if not is_windows:
226+
if not is_windows and not is_apple:
227227
yield
228228
return
229229
# Using `os.chdir` as a workaround for an error in Windows
@@ -233,6 +233,8 @@ def _windows_pathhack(self):
233233
# is reported to work by many users:
234234
# https://github.com/JuliaPy/pyjulia/issues/67
235235
# https://github.com/JuliaPy/pyjulia/pull/367
236+
# Using this workaround for Julia >= 1.6 in macOS for now:
237+
# https://github.com/JuliaLang/julia/issues/40246
236238
cwd = os.getcwd()
237239
try:
238240
os.chdir(os.path.dirname(self.libjulia_path))

0 commit comments

Comments
 (0)