Skip to content
Snippets Groups Projects
  • Benjamin Cumming's avatar
    More robust Python installation (#971) · b43cd07e
    Benjamin Cumming authored
    Improve the Python wrapper generation and installation:
      - install a proper module that can be extended with Python code;
      - give the user more control over where to install the module (e.g. as a user package or in a virtualenv).
    
    During building, the following sub-directory is built in the build director (`CMAKE_BINARY_DIR`)
    ```
    └── python
        └── arbor
                ├── __init__.py
                ├── arbor.so
                └── VERSION
    ```
    This path can then be copied VERBATIM to the target installation path. By default this will be in `CMAKE_INSTALL_PREFIX/lib/python%d.%d/site-packages`.
    An additional CMake parameter `ARB_PYTHON_PREFIX` can be used to specify an alternative destination for installing the Python module.
    
    The Python part of the wrapper, implemented in `__init__.py` is currently very limited, only providing `__version__` and `__config__` variables.
    
    The installation guide was updated to cover the Python installation.
    Unverified
    b43cd07e