More robust Python installation (#971)
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.
Showing
- CMakeLists.txt 7 additions, 0 deletionsCMakeLists.txt
- doc/install.rst 44 additions, 8 deletionsdoc/install.rst
- doc/python.rst 24 additions, 17 deletionsdoc/python.rst
- python/CMakeLists.txt 20 additions, 9 deletionspython/CMakeLists.txt
- python/__init__.py 15 additions, 0 deletionspython/__init__.py
- python/pyarb.cpp 1 addition, 1 deletionpython/pyarb.cpp
- python/setup.py 38 additions, 0 deletionspython/setup.py
- python/test/unit/test_domain_decompositions.py 1 addition, 2 deletionspython/test/unit/test_domain_decompositions.py
- python/test/unit_distributed/runner.py 2 additions, 3 deletionspython/test/unit_distributed/runner.py
- python/test/unit_distributed/test_contexts_arbmpi.py 1 addition, 2 deletionspython/test/unit_distributed/test_contexts_arbmpi.py
- python/test/unit_distributed/test_contexts_mpi4py.py 2 additions, 3 deletionspython/test/unit_distributed/test_contexts_mpi4py.py
- python/test/unit_distributed/test_domain_decompositions.py 2 additions, 3 deletionspython/test/unit_distributed/test_domain_decompositions.py
- scripts/travis/build.sh 2 additions, 1 deletionscripts/travis/build.sh
Please register or sign in to comment