Improve installation folder structure #2419
Replies: 5 comments 17 replies
-
@alexsavulescu I no longer know how to answer this question. Originally, I would have suggested
But that is long gone, presumably due to 799a104 with the item
|
Beta Was this translation helpful? Give feedback.
-
Basic testing looks like using pip to install from a CMake installation works: python3 -m venv venvinst
source ./venvinst/bin/activate
python3 -m pip install neuron-nightly --find-links ~/Workspace/nrn/build/install Looking in links: /home/savulesc/Workspace/nrn/build/install
Collecting neuron-nightly
Downloading NEURON_nightly-9.0.dev1384-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.2/16.2 MB 52.7 MB/s eta 0:00:00
Requirement already satisfied: packaging in ./lib/python3.10/site-packages (from neuron-nightly) (23.1)
Requirement already satisfied: numpy>=1.9.3 in ./lib/python3.10/site-packages (from neuron-nightly) (1.25.1)
Requirement already satisfied: find-libpython in ./lib/python3.10/site-packages (from neuron-nightly) (0.3.0)
Installing collected packages: neuron-nightly
Successfully installed neuron-nightly-9.0.dev1384 haven't tested, but |
Beta Was this translation helpful? Give feedback.
-
This seems to be a solution to the issue. But I don't understand the need for
Is it the case that one cannot do the install in the absence of an internet connection? |
Beta Was this translation helpful? Give feedback.
-
Hey *, @jamesgking pinged me in the EBRAINS chat… here are some comments and questions :)
|
Beta Was this translation helpful? Give feedback.
-
Sorry for not following up earlier, in my (very limited(!) testing), I think something like this would be sufficient: diff --git i/cmake/BuildOptionDefaults.cmake w/cmake/BuildOptionDefaults.cmake
index cdf1b2892..b5c90d84a 100644
--- i/cmake/BuildOptionDefaults.cmake
+++ w/cmake/BuildOptionDefaults.cmake
@@ -32,7 +32,7 @@ else()
set(NRN_ENABLE_INTERNAL_READLINE_DEFAULT OFF)
endif()
# Some distributions may set the prefix. To avoid errors, unset it
-set(NRN_MODULE_INSTALL_OPTIONS_DEFAULT "--prefix= --home=${CMAKE_INSTALL_PREFIX}")
+set(NRN_MODULE_INSTALL_OPTIONS_DEFAULT "--prefix=${CMAKE_INSTALL_PREFIX}")
set(NRN_PYTHON_DYNAMIC_DEFAULT "")
set(NRN_MPI_DYNAMIC_DEFAULT "")
set(NRN_RX3D_OPT_LEVEL_DEFAULT "0") It changes the installation of these files (I also didn't enable many install options) from
(I did not look at the development HEAD/release-9 — there, the patch doesn't apply as the variable is gone.) |
Beta Was this translation helpful? Give feedback.
-
From Eric Mueller:
Hey, we have been looking at the new EBRAINS software release and found exactly 3 packages that install Python modules or CPython libraries into non-distribution-like folder structure.
In particular the BrainScaleS packages (that I am maintaining :)) and the neuron package.
I had a quick look at neuron and we probably could just move these things (example from old release) after the installer has completed:
into
/srv/main-spack-instance-2302/spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-10.3.0/neuron-8.2.2-76cjprzftpyrex46m2dn35qpid32efo7/lib/python3.8/site-packages
.However, it would be much nicer if we would be able to instruct CMake directly — do you know if there is an option for this (I had a quick look at the cmake helpers for python, but I'm not really a CMake expert, and I'm always 100% sure where things come from, so… 😬)?
The "move module after install" approach would work, if we are sure that no module loads this hoc….so from the python installation folder as the RPATHs would require updating → we could also do this in the post-install-move step… but it's ugly 😉.
(For BrainScaleS I work on modifying the build flow to install distribution-folder style…)
Beta Was this translation helpful? Give feedback.
All reactions