diff --git a/packaging/test_wheel.bash b/packaging/test_wheel.bash index 670603797..ac99d7bdf 100755 --- a/packaging/test_wheel.bash +++ b/packaging/test_wheel.bash @@ -23,16 +23,14 @@ test_wheel () { # sample mod file for nrnivmodl check TEST_DIR="$(mktemp -d)" OUTPUT_DIR="$(mktemp -d)" - cp "${this_dir}/../nmodl/ext/example/"*.mod "$TEST_DIR/" + cp "${this_dir}/../python/nmodl/ext/example/"*.mod "$TEST_DIR/" cp "${this_dir}/../test/integration/mod/cabpump.mod" "${this_dir}/../test/integration/mod/var_init.inc" "$TEST_DIR/" - cd "${this_dir}" for mod in "${TEST_DIR}/"*.mod do nmodl -o "${OUTPUT_DIR}" "${mod}" sympy --analytic $python_exe -c "import nmodl; driver = nmodl.NmodlDriver(); driver.parse_file('${mod}')" done $python_exe -m pytest -vvv "${this_dir}/../test/" - cd - } echo "== Testing $python_wheel using $python_exe ($python_ver) ==" diff --git a/pyproject.toml b/pyproject.toml index 8e067eef5..0d057c2f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ build-backend = "scikit_build_core.build" [tool.scikit-build] metadata.version.provider = "scikit_build_core.metadata.setuptools_scm" -wheel.packages = ["nmodl"] +wheel.packages = ["python/nmodl"] logging.level = "DEBUG" [tool.scikit-build.cmake] diff --git a/nmodl/__init__.py b/python/nmodl/__init__.py similarity index 100% rename from nmodl/__init__.py rename to python/nmodl/__init__.py diff --git a/nmodl/_binwrapper.py b/python/nmodl/_binwrapper.py similarity index 100% rename from nmodl/_binwrapper.py rename to python/nmodl/_binwrapper.py diff --git a/nmodl/ast.py b/python/nmodl/ast.py similarity index 100% rename from nmodl/ast.py rename to python/nmodl/ast.py diff --git a/nmodl/dsl.py b/python/nmodl/dsl.py similarity index 100% rename from nmodl/dsl.py rename to python/nmodl/dsl.py diff --git a/nmodl/ext/example/exp2syn.mod b/python/nmodl/ext/example/exp2syn.mod similarity index 100% rename from nmodl/ext/example/exp2syn.mod rename to python/nmodl/ext/example/exp2syn.mod diff --git a/nmodl/ext/example/expsyn.mod b/python/nmodl/ext/example/expsyn.mod similarity index 100% rename from nmodl/ext/example/expsyn.mod rename to python/nmodl/ext/example/expsyn.mod diff --git a/nmodl/ext/example/hh.mod b/python/nmodl/ext/example/hh.mod similarity index 100% rename from nmodl/ext/example/hh.mod rename to python/nmodl/ext/example/hh.mod diff --git a/nmodl/ext/example/passive.mod b/python/nmodl/ext/example/passive.mod similarity index 100% rename from nmodl/ext/example/passive.mod rename to python/nmodl/ext/example/passive.mod diff --git a/nmodl/ext/viz/css/tree.css b/python/nmodl/ext/viz/css/tree.css similarity index 100% rename from nmodl/ext/viz/css/tree.css rename to python/nmodl/ext/viz/css/tree.css diff --git a/nmodl/ext/viz/index.html b/python/nmodl/ext/viz/index.html similarity index 100% rename from nmodl/ext/viz/index.html rename to python/nmodl/ext/viz/index.html diff --git a/nmodl/ext/viz/js/d3.min.js b/python/nmodl/ext/viz/js/d3.min.js similarity index 100% rename from nmodl/ext/viz/js/d3.min.js rename to python/nmodl/ext/viz/js/d3.min.js diff --git a/nmodl/ext/viz/js/tree.js b/python/nmodl/ext/viz/js/tree.js similarity index 100% rename from nmodl/ext/viz/js/tree.js rename to python/nmodl/ext/viz/js/tree.js diff --git a/nmodl/ode.py b/python/nmodl/ode.py similarity index 100% rename from nmodl/ode.py rename to python/nmodl/ode.py diff --git a/nmodl/symtab.py b/python/nmodl/symtab.py similarity index 100% rename from nmodl/symtab.py rename to python/nmodl/symtab.py diff --git a/nmodl/visitor.py b/python/nmodl/visitor.py similarity index 100% rename from nmodl/visitor.py rename to python/nmodl/visitor.py diff --git a/src/language/code_generator.cmake b/src/language/code_generator.cmake index 0c6ccae18..a3dea0767 100644 --- a/src/language/code_generator.cmake +++ b/src/language/code_generator.cmake @@ -34,9 +34,9 @@ set(CODE_GENERATOR_JINJA_FILES set(CODE_GENERATOR_PY_FILES ${PROJECT_SOURCE_DIR}/src/language/argument.py ${PROJECT_SOURCE_DIR}/src/language/code_generator.py + ${PROJECT_SOURCE_DIR}/src/language/language_parser.py ${PROJECT_SOURCE_DIR}/src/language/node_info.py ${PROJECT_SOURCE_DIR}/src/language/nodes.py - ${PROJECT_SOURCE_DIR}/src/language/language_parser.py ${PROJECT_SOURCE_DIR}/src/language/utils.py ) diff --git a/src/pybind/CMakeLists.txt b/src/pybind/CMakeLists.txt index 9600515e1..0d7516874 100644 --- a/src/pybind/CMakeLists.txt +++ b/src/pybind/CMakeLists.txt @@ -70,14 +70,14 @@ endif() # ============================================================================= file( GLOB NMODL_PYTHON_FILES - RELATIVE "${NMODL_PROJECT_SOURCE_DIR}/nmodl/" - CONFIGURE_DEPENDS "${NMODL_PROJECT_SOURCE_DIR}/nmodl/*.py") + RELATIVE "${NMODL_PROJECT_SOURCE_DIR}/python/nmodl/" + CONFIGURE_DEPENDS "${NMODL_PROJECT_SOURCE_DIR}/python/nmodl/*.py") foreach(file IN LISTS NMODL_PYTHON_FILES) - cpp_cc_build_time_copy(INPUT ${NMODL_PROJECT_SOURCE_DIR}/nmodl/${file} OUTPUT + cpp_cc_build_time_copy(INPUT ${NMODL_PROJECT_SOURCE_DIR}/python/nmodl/${file} OUTPUT ${CMAKE_BINARY_DIR}/lib/nmodl/${file}) endforeach() -file(COPY ${NMODL_PROJECT_SOURCE_DIR}/nmodl/ext DESTINATION ${CMAKE_BINARY_DIR}/lib/nmodl/) +file(COPY ${NMODL_PROJECT_SOURCE_DIR}/python/nmodl/ext DESTINATION ${CMAKE_BINARY_DIR}/lib/nmodl/) # ============================================================================= # Install python binding components