Distribute your extension module as a pip installable package
MIT License
pipnest packages your NEST extension modules into pip installable packages. This is a benefit when you're distributing a Python model for the NEST simulator and have a dependency on an extension module. Instead of having to provide installation instructions to your end-users you can have pip download and build the extension module into the target machine's nest installation.
Your project structure should look like this:
- my_module
- my_module
- my_file1.cpp
- my_file2.cpp
- ...
In this example your NEST module should be called the my_modulemodule
.
Run the pipnest init
command from the root folder and fill in the
requested metadata:
cd my_module
pipnest init .
This should create a setup.py and README.md, be sure to edit the latter.
Check that your module is present under the packages
keyword argument
in setup.py
.
Create the source distribution:
python setup.py sdist
$NEST_INSTALL_DIR/lib/nest
folderpip install dist/*
. (If an MPI error occurs, restart yourUse twine to upload your package:
twine upload dist/* --skip-existing