Hi Charl

I'm not very sure. The extension modules I used to test were both from colleagues who I think generated them with NESTML and then adapted them. Their cmake builds and subsequent installs both produced .so libraries in a subfolder of the NEST installation, and it seems no manipulation of any path is required for NEST to find them. Do not all extension modules take care of this themselves? If not I'd require some technical guidance on exactly how I best make them discoverable, but good news:

pipnest generates "source distributions" which are Python packages that build their binary dependencies on the target system. If a consumer writes  "pip install pipnest-module", pip builds these source distributions and there's a few hooks that I use (thanks to a script by Benjamin Cummings) to turn the pip install into a CMake build. These hooks allow arbitrary code execution (which is why `sudo pip` is a bad idea) and I hope that from these hooks we can do what we need to cover the workflows you describe.

Il giorno mer 17 giu 2020 alle ore 15:07 Charl Linssen <nest-users@turingbirds.com> ha scritto:
Dear Robin,

This is really cool! Seeing as NESTML also generates user modules, I am more than a little interested in this feature.

To address the more technical point: does running with the user module .so path in the LD_LIBRARY_PATH environment variable allow NEST to find it? Some changes are happening with the paths—see https://github.com/nest/nest-simulator/pull/1578—but the use of LD_LIBRARY_PATH will, as far as I'm aware, be the recommended approach to locate user modules. This contrasts with having a single "predefined" user module installation directory (e.g. "/home/charl/.local/lib/nest/user_modules") that is retrieved by invoking nest-config. Will the first option fit into the workflow of someone who wants to install a pipnest-generated package? What is the workaround that you came up with?

Cheers,
Charl


On Thu, May 28, 2020, at 00:37, Robin Gilbert De Schepper wrote:
Hi,

I created a little tool that provides packaging for NEST extension modules into python packages that can be `pip installed` on the target machine.  https://pip-nest.readthedocs.io/en/latest/  

First off, is this interesting to the community? It certainly seems easier to `pip install some-module` than to provide installation instructions, and I can now specify my modules as dependencies in code I distribute.

Secondly, there are some shortcomings based on the fact that the pip install only reliably produces the build artifacts into python's site-packages and nest doesn't look for them there. This can probably only be elegantly solved by adding an `entry_point` to the nest python module so that these pip nest modules can announce themselves there?


--
Robin De Schepper, MSc
Department of Brain and Behavioral Sciences
Unit of Neurophysiology
University of Pavia, Italy
Via Forlanini 6, 27100 Pavia - Italy
Tel: (+39) 038298-7607
_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org


_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org


--
Robin De Schepper, MSc
Department of Brain and Behavioral Sciences
Unit of Neurophysiology
University of Pavia, Italy
Via Forlanini 6, 27100 Pavia - Italy
Tel: (+39) 038298-7607
http://www-5.unipv.it/dangelo/