Skip to content

Commit

Permalink
Merge pull request #108 from OpenSourceBrain/test_jnml
Browse files Browse the repository at this point in the history
Update jnml install paths for linux
  • Loading branch information
pgleeson committed Jul 26, 2023
2 parents c20db29 + 0d73f10 commit c079c88
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
7 changes: 6 additions & 1 deletion omv/engines/getjnml.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ def install_jnml():
try:
jnmlpath = os.path.join(os.environ["XDG_DATA_HOME"], "jnml")
except KeyError:
jnmlpath = os.path.join(os.environ["HOME"], ".local/share/jnml")
localsharepath = os.path.join(os.environ["HOME"], ".local/share")
if os.path.isdir(localsharepath):
jnmlpath = os.path.join(localsharepath, "jnml")
else:
jnmlpath = os.path.join(os.environ["HOME"], "jnml")

elif osname == "Darwin":
jnmlpath = os.path.join(os.environ["HOME"], "Library/jnml")
else:
Expand Down
11 changes: 8 additions & 3 deletions omv/engines/jneuroml.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@ def get_environment():
os.environ["XDG_DATA_HOME"], "jnml/jNeuroMLJar"
)
except KeyError as e:
jnmlhome = os.path.join(
os.environ["HOME"], ".local/share/jnml/jNeuroMLJar"
)
localsharepath = os.path.join(os.environ["HOME"], ".local/share")
if os.path.isdir(localsharepath):
jnmlhome = os.path.join(
os.environ["HOME"], ".local/share/jnml/jNeuroMLJar"
)
else:
jnmlhome = os.path.join(os.environ["HOME"], "jnml/jNeuroMLJar")

elif osname == "Darwin":
jnmlhome = os.path.join(os.environ["HOME"], "Library/jnml/jNeuroMLJar")
else:
Expand Down

0 comments on commit c079c88

Please sign in to comment.