Spaces:
Sleeping
Sleeping
Mark Kittisopikul
commited on
Commit
•
b14e38a
1
Parent(s):
a91fff0
Fix formatting style issues
Browse files- pysr/julia_helpers.py +10 -4
pysr/julia_helpers.py
CHANGED
@@ -12,17 +12,20 @@ def install(julia_project=None, quiet=False): # pragma: no cover
|
|
12 |
|
13 |
Also updates the local Julia registry.
|
14 |
"""
|
15 |
-
|
16 |
# Set JULIA_PROJECT so that we install in the pysr environment
|
17 |
julia_project, is_shared = _get_julia_project(julia_project)
|
18 |
-
|
|
|
|
|
|
|
19 |
|
20 |
import julia
|
21 |
|
22 |
julia.install(quiet=quiet)
|
23 |
|
24 |
if is_shared:
|
25 |
-
# is_shared is only true if the julia_project arg was None
|
|
|
26 |
Main = init_julia(None)
|
27 |
else:
|
28 |
Main = init_julia(julia_project)
|
@@ -85,7 +88,10 @@ def init_julia(julia_project=None):
|
|
85 |
from julia.core import JuliaInfo, UnsupportedPythonError
|
86 |
|
87 |
julia_project, is_shared = _get_julia_project(julia_project)
|
88 |
-
|
|
|
|
|
|
|
89 |
|
90 |
try:
|
91 |
info = JuliaInfo.load(julia="julia")
|
|
|
12 |
|
13 |
Also updates the local Julia registry.
|
14 |
"""
|
|
|
15 |
# Set JULIA_PROJECT so that we install in the pysr environment
|
16 |
julia_project, is_shared = _get_julia_project(julia_project)
|
17 |
+
if is_shared:
|
18 |
+
os.environ["JULIA_PROJECT"] = "@" + str(julia_project)
|
19 |
+
else:
|
20 |
+
os.environ["JULIA_PROJECT"] = str(julia_project)
|
21 |
|
22 |
import julia
|
23 |
|
24 |
julia.install(quiet=quiet)
|
25 |
|
26 |
if is_shared:
|
27 |
+
# is_shared is only true if the julia_project arg was None
|
28 |
+
# See _get_julia_project
|
29 |
Main = init_julia(None)
|
30 |
else:
|
31 |
Main = init_julia(julia_project)
|
|
|
88 |
from julia.core import JuliaInfo, UnsupportedPythonError
|
89 |
|
90 |
julia_project, is_shared = _get_julia_project(julia_project)
|
91 |
+
if is_shared:
|
92 |
+
os.environ["JULIA_PROJECT"] = "@" + str(julia_project)
|
93 |
+
else:
|
94 |
+
os.environ["JULIA_PROJECT"] = str(julia_project)
|
95 |
|
96 |
try:
|
97 |
info = JuliaInfo.load(julia="julia")
|