feat(neuron): Use default install path for Python libs
Merge request reports
Activity
added 1 commit
- da1c2cde - feat(neuron): Use default install path for Python libs
- Resolved by Eleni Mathioulaki
added 1 commit
- 353447a4 - feat(neuron): Use default install path for Python libs
I think something along these lines is still needed for the
+coreneuron
variant installation… however, it's not yet working (${Python_SITEARCH}
provides an absolute path to the underlying Python, i.e. someopt/spack/…/python3.8…-hash/lib/python3.8/site-packages/…
→ I read about some magic happening when the prefix is specified, but not no success yet.)@@ -142,7 +142,7 @@ endif() # Install package files that were created in build (e.g. .py.in) install( DIRECTORY ${PROJECT_BINARY_DIR}/share/lib/python - DESTINATION ${NRN_LIBDIR} + DESTINATION ${CMAKE_INSTALL_PREFIX}/${Python_SITEARCH} FILES_MATCHING PATTERN *.py PATTERN *.so
added 1 commit
- fad07738 - feat(neuron): Use default install path for Python libs
Now it looks like:
lib/libcoreneuron.so lib/libcorenrnmech.so lib/libnrniv.so lib/librxdmath.so lib/libscopmath.a lib/python3.8/site-packages/NEURON-8.2.3-py3.8.egg-info lib/python3.8/site-packages/neuron/… # lots of python files lib/python3.8/site-packages/neuron/hoc.cpython-38-x86_64-linux-gnu.so lib/python3.8/site-packages/neuron/rxd/geometry3d/graphicsPrimitives.cpython-38-x86_64-linux-gnu.so lib/python3.8/site-packages/neuron/rxd/geometry3d/surfaces.cpython-38-x86_64-linux-gnu.so lib/python3.8/site-packages/neuron/rxd/geometry3d/ctng.cpython-38-x86_64-linux-gnu.so
hmm.. now it's just
-- Installing: /builds/.../neuron-8.2.3-6lzi7pc57yh7swndm2yqduxc3ukdzko3//mnt/spack_v0.19.2/spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-10.3.0/python-3.8.11-nyq5bpavmemjaumb2d2xtuichitaaptd/lib/python3.8/site-packages/python/neuron/rxd
instead of
-- Installing: /builds/.../neuron-8.2.3-ihk6gmbejczrdhizm7zmcdg66rr23b53/lib/python/neuron/rxd
anyway, you're right, it's just build-time stuff.. I think the first patch was fine
Edited by Eleni MathioulakiOK, I finally had a look at this.
Just fixing
NRN_MODULE_INSTALL_OPTIONS
as you initially tried works fine: all the python modules/libraries are correctly installed in{prefix}/lib/python3.8/site-packages/neuron
. There is still a{prefix}/lib/python/neuron
, but it only contains asetup.py
and some empty dirs:$ tree -pl lib/python lib/python └── [drwxr-sr-x] neuron └── [drwxr-sr-x] rxd └── [drwxr-sr-x] geometry3d ├── [drwxr-sr-x] build │ └── [drwxr-sr-x] temp.linux-x86_64-3.10 │ └── [drwxr-sr-x] scratch_local │ └── [drwxr-sr-x] emathiou │ └── [drwxr-sr-x] spack-stage │ └── [drwxr-sr-x] spack-stage-neuron-8.2.3-i4b2htcob3neog3o5wd42i6pftsnphbw │ └── [drwxr-sr-x] spack-src │ └── [drwxr-sr-x] src │ └── [drwxr-sr-x] nrnpython ├── [drwxr-sr-x] CMakeFiles │ ├── [drwxr-sr-x] rx3d.dir │ ├── [drwxr-sr-x] rx3dextensions_0.dir │ └── [drwxr-sr-x] rxd_cython_generated.dir └── [-rw-r--r--] setup.py 16 directories, 1 file
I think that bit is why this happens:
setup.py
matches*.py
and the empty directories being installed are apparently a CMake thing. So I guess we could patch CMakeLists.txt to avoid that, but it's not necessary - it's just a useless extra dir.The longer patch just creates the same
python/neuron/rxd/geometry3d
dir in{prefix}//mnt/spack_v0.19.2/spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-10.3.0/python-3.8.11-nyq5bpavmemjaumb2d2xtuichitaaptd/lib/python3.8/site-packages/python/
instead: like you wrote in the comment above,${Python_SITEARCH}
is the absolute path to python - so it doesn't really work.So I suggest we go back to the first option. Is that OK? Am I missing sth?
@emuller ping?
I begged some people to review my changes (they are technically "green" now in our internal CI) → @pspilger
.Sorry, I was a bit too busy when reading it
→ pushing old state now, and rebasing.Edited by Eric Müller
added 1 commit
- 353447a4 - feat(neuron): Use default install path for Python libs
added 137 commits
-
353447a4...f43c3537 - 136 commits from branch
master
- 7a1f7294 - feat(neuron): Use default install path for Python libs
-
353447a4...f43c3537 - 136 commits from branch
mentioned in commit b987335a
mentioned in merge request !621