2.39 KB
Newer Older
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
## VAPython

VAPython contains is a C++ extension for the Python3 interpreter that provides a (networked) interface to VA.

### License

Copyright 2015-2017 Institute of Technical Acoustics, RWTH Aachen University

Licensed under the Apache License, Version 2.0 (the "License");
you may not use files of this project except in compliance with the License.
You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

### Quick build guide

25 26 27 28 29 30
#### Visual Studio

Although the CMakeLists creates a Visual Studio project, this project is of no use for Python. It is just for convenience to compile and link the VAPython source code. But it will handle some file copying for distutils, see below. It therefore is necessary to run the `INSTALL` project in order to prepare this.

#### Distutils

Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
Use Pythons *distutils* to build the module that is called `va`. Depending on the version, you will have to install the matching compiler build tools. See the [Python documentation]( for more information.
It is very important to build and install VA using CMake with the `ITA_VA_WITH_BINDING_PYTHON` option beforehand. This will prepare some paths in the setup configuration and this will also add the required shared libraries into the `bin` folder, where the package distribution command will expect them to be.
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
33 34 35

`python build`
`python install --prefix=dist`
`python sdist'
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
37 38

Drop the `prefix` argument if you want to integrate the module into your site-packages folder, which might require that you use a command window with administration privileges.
39 40 41 42 43 44 45

#### Trouble shooting

If you get some errors like `module not found`, this usually refers to missing or incompatible shared libraries that the `va` module is trying to load upon import within the Python interpreter. Make sure the following files are available (i.e. copy them next to the va*.pyc file in the dist/lib/	site-packages folder or into the distribution zip file)
`VABase.dll VANet.dll VistaBase.dll VistaAspects.dll VistaInterProcComm.dll`
Other OS: replace `dll` with `so`