README.md 2.4 KB
Newer Older
1 2 3 4 5 6 7
## VAPython

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


### License

8
Copyright 2015-2018 Institute of Technical Acoustics (ITA), RWTH Aachen University
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

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

<http://www.apache.org/licenses/LICENSE-2.0>

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
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

31
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](https://docs.python.org/3.6/library/distutils.html) for more information.
32
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.
33 34 35

`python setup.py build`
`python setup.py install --prefix=dist`
36
`python setup.py sdist`
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)
Windows:
`VABase.dll VANet.dll VistaBase.dll VistaAspects.dll VistaInterProcComm.dll`
Other OS: replace `dll` with `so`