Skip to content

Commit

Permalink
add non-default install path option to NESTCodeGeneratorUtils.generat…
Browse files Browse the repository at this point in the history
…e_code_for() (#975)

Co-authored-by: C.A.P. Linssen <charl@turingbirds.com>
  • Loading branch information
clinssen and C.A.P. Linssen authored Nov 2, 2023
1 parent c7a350b commit b2543df
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pynestml/codegeneration/nest_code_generator_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from typing import List, Optional

import re
import tempfile
import uuid

from pynestml.meta_model.ast_variable import ASTVariable
Expand Down Expand Up @@ -77,6 +78,9 @@ def generate_code_for(cls,

from pynestml.frontend.pynestml_frontend import generate_nest_target

# generate temporary install directory
install_path = tempfile.mkdtemp(prefix="nestml_target_")

# generate unique ID
if uniq_id is None:
uniq_id = str(uuid.uuid4().hex)
Expand Down Expand Up @@ -127,6 +131,7 @@ def generate_code_for(cls,
mangled_synapse_name = synapse_model_name_uniq + "_nestml__with_" + neuron_model_name_uniq + "_nestml"

generate_nest_target(input_path=input_fns,
install_path=install_path,
logging_level=logging_level,
module_name=module_name,
suffix="_nestml",
Expand Down

0 comments on commit b2543df

Please sign in to comment.