Skip to content

Commit

Permalink
Merge pull request #418 from BlueBrain/macos
Browse files Browse the repository at this point in the history
avoid loading hoc.so in mac that raises symbol not found #417
  • Loading branch information
wvangeit committed Aug 29, 2022
2 parents 948ab28 + 88a50e6 commit 5a23f52
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions bluepyopt/ephys/simulators.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,11 @@ def __init__(self, dt=None, cvode_active=True, cvode_minstep=None,
"./data/".
"""

if platform.system() == 'Windows':
# hoc.so does not exist on NEURON Windows
# although \\hoc.pyd can work here, it gives an error for
# nrn_nobanner_ line
self.disable_banner = False
self.banner_disabled = False
else:
self.disable_banner = True
self.banner_disabled = False

# hoc.so does not exist on NEURON Windows or MacOS
# although \\hoc.pyd can work here, it gives an error for
# nrn_nobanner_ line
self.disable_banner = platform.system() not in ['Windows', 'Darwin']
self.banner_disabled = False
self.mechanisms_directory = mechanisms_directory
self.neuron.h.load_file('stdrun.hoc')

Expand Down Expand Up @@ -93,8 +88,6 @@ def _nrn_disable_banner():
ctypes.c_int.in_dll(nrndll, 'nrn_nobanner_').value = 1

# pylint: disable=R0201
# TODO function below should probably a class property or something in that
# sense
@property
def neuron(self):
"""Return neuron module"""
Expand Down

0 comments on commit 5a23f52

Please sign in to comment.