https://github.com/borglab/wrap-project-python
Template project for wrapping c++ with the borglab/wrap utility. No GTSAM dependence here.
https://github.com/borglab/wrap-project-python
Last synced: 7 months ago
JSON representation
Template project for wrapping c++ with the borglab/wrap utility. No GTSAM dependence here.
- Host: GitHub
- URL: https://github.com/borglab/wrap-project-python
- Owner: borglab
- License: bsd-2-clause
- Created: 2020-07-12T15:20:20.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-12-27T14:13:30.000Z (over 4 years ago)
- Last Synced: 2025-05-07T13:53:08.637Z (over 1 year ago)
- Language: CMake
- Size: 82 KB
- Stars: 0
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wrap-project-python
Project template illustrating python wrapping with borglab/wrap, **no** GTSAM.
This file will be included as the python package description :)
## PREREQUISITES
- Python 3.6+ is required.
- Install the `wrap` repo located [here](https://github.com/borglab/wrap).
## INSTALL
- Clone this repository with all submodules by `git clone https://github.com/borglab/wrap-project-python.git`
- In the project directory, create a `build` directory and `cd` into it.
- Run `cmake ..` (with optional prefix of your choice)
- Run `make`, and the wrapped module will built into build/python.
- Run `make install`, which will install the C++ library (only) to the cmake prefix.
- Run `make python-install`, which will run `python build/setup.py install` in your current environment.
## TEST
After install, you can test whether everything works using, say, a quick ipython session:
```
> ipython
Python 3.7.7 (default, Mar 26 2020, 10:32:53)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.13.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import wrap_example
In [2]: g = wrap_example.Greeting()
In [3]: g.sayHello()
Hello from C++!
In [4]: g.sayGoodbye()
Goodbye, robot
```