Skip to content

Commit

Permalink
Merge branch 'jelic/move_python_dir' into jelic/pyproject
Browse files Browse the repository at this point in the history
  • Loading branch information
JCGoran committed Mar 1, 2024
2 parents 5c67ac7 + 729a306 commit ce03dd8
Show file tree
Hide file tree
Showing 19 changed files with 7 additions and 9 deletions.
4 changes: 1 addition & 3 deletions packaging/test_wheel.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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) =="
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/language/code_generator.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
8 changes: 4 additions & 4 deletions src/pybind/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ce03dd8

Please sign in to comment.