Skip to content

Commit c079c88

Browse files
authored
Merge pull request #108 from OpenSourceBrain/test_jnml
Update jnml install paths for linux
2 parents c20db29 + 0d73f10 commit c079c88

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

omv/engines/getjnml.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ def install_jnml():
1818
try:
1919
jnmlpath = os.path.join(os.environ["XDG_DATA_HOME"], "jnml")
2020
except KeyError:
21-
jnmlpath = os.path.join(os.environ["HOME"], ".local/share/jnml")
21+
localsharepath = os.path.join(os.environ["HOME"], ".local/share")
22+
if os.path.isdir(localsharepath):
23+
jnmlpath = os.path.join(localsharepath, "jnml")
24+
else:
25+
jnmlpath = os.path.join(os.environ["HOME"], "jnml")
26+
2227
elif osname == "Darwin":
2328
jnmlpath = os.path.join(os.environ["HOME"], "Library/jnml")
2429
else:

omv/engines/jneuroml.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@ def get_environment():
2525
os.environ["XDG_DATA_HOME"], "jnml/jNeuroMLJar"
2626
)
2727
except KeyError as e:
28-
jnmlhome = os.path.join(
29-
os.environ["HOME"], ".local/share/jnml/jNeuroMLJar"
30-
)
28+
localsharepath = os.path.join(os.environ["HOME"], ".local/share")
29+
if os.path.isdir(localsharepath):
30+
jnmlhome = os.path.join(
31+
os.environ["HOME"], ".local/share/jnml/jNeuroMLJar"
32+
)
33+
else:
34+
jnmlhome = os.path.join(os.environ["HOME"], "jnml/jNeuroMLJar")
35+
3136
elif osname == "Darwin":
3237
jnmlhome = os.path.join(os.environ["HOME"], "Library/jnml/jNeuroMLJar")
3338
else:

0 commit comments

Comments
 (0)