Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid loading hoc.so in mac that raises symbol not found #417 #418

Merged
merged 3 commits into from
Aug 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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