@@ -306,6 +306,30 @@ NRN_ENABLE_PYTHON:BOOL=ON
306306 Enable Python interpreter support
307307 (default python, fallback to python3, but see PYTHON_EXECUTABLE below)
308308
309+ NRN_INSTALL_PYTHON_PREFIX:STRING="lib/python/neuron/"
310+ -----------------------------------------------------
311+ Path where NEURON Python components will be installed, relative to CMAKE_INSTALL_PREFIX. Must end with a directory named "neuron"
312+
313+ Environment variable PYTHONPATH must contain the real path to NRN_INSTALL_PYTHON_PREFIX in order for python to find neuron.
314+
315+ This path must end with a directory named "neuron"
316+
317+ For venv's, configure cmake with:
318+
319+ .. code-block :: shell
320+
321+ -DCMAKE_INSTALL_PREFIX=$( python -c " import sysconfig; print(sysconfig.get_path('data', 'venv'))" ) \
322+ -DNRN_INSTALL_PYTHON_PREFIX=$( python -c " import sysconfig; print(sysconfig.get_path('platlib', 'venv') + '/neuron')" )
323+
324+ To install to your home directory, configure cmake with:
325+
326+ .. code-block :: shell
327+
328+ -DCMAKE_INSTALL_PREFIX=$( python3 -m site --user-base) \
329+ -DNRN_INSTALL_PYTHON_PREFIX=$( python3 -m site --user-site) /neuron
330+
331+ This option is ignored when building a wheel, in which case the value is forced to "neuron/"
332+
309333.. _cmake_nrn_enable_python_dynamic :
310334NRN_ENABLE_PYTHON_DYNAMIC:BOOL=OFF
311335----------------------------------
@@ -544,7 +568,7 @@ NRN_ENABLE_TESTS:BOOL=OFF
544568 python3 -m pytest test_currents.py
545569
546570 NRN_ENABLE_COVERAGE:BOOL=OFF
547- ---------------------------
571+ ----------------------------
548572 Enable code coverage
549573
550574 Requires ``lcov `` (e.g. ``sudo apt install lcov ``).
@@ -677,7 +701,7 @@ NRN_ENABLE_DIGEST:BOOL=OFF
677701 Requires libcrypto
678702
679703NRN_ENABLE_ARCH_INDEP_EXP_POW:BOOL=OFF
680- ---------------------------------
704+ --------------------------------------
681705 Provides \ :func: `use_exp_pow_precision ` function so that exp and pow produce
682706 same results on all platforms.
683707
0 commit comments