Commit 5f2a5897 authored by Joe Snyder's avatar Joe Snyder
Browse files

Add README

parent cf6305a3
Wrapper Generator
==================
This repository contains the first set of Python code which could be used to
automatically generate PyBin11 code from C++ files with proper annotation.
Prereq Install
---------------
On Ubuntu::
sudo apt install python3-pygccxml
which will install both a version of CastXML and PyGCCXML
Both could be build from source as well. At this point, there is no
reason to require a build from source.
C++ Setup
---------
Each directory with content to wrap should contain a file named
``wrapper_input.json``. This content should describe <filler>
Running the Generator
---------------------
This script assumes that Python 3.* is used.
The Python script has help for the arguments::
$ python3 generator.py -h
usage: generator.py [-h] [-s SOURCE_DIR] [-j JSON_PATH] -g CASTXML_PATH
[--includes INCLUDES] [--no-generation]
optional arguments:
-h, --help show this help message and exit
-s SOURCE_DIR, --source SOURCE_DIR
-j JSON_PATH, --input_json JSON_PATH
Path to input JSON file of namespaces
-g CASTXML_PATH, --castxml-path CASTXML_PATH
Path to castxml
--includes INCLUDES, -i INCLUDES
Path to the includes directory.
--no-generation, -n Only print name of files to be generated
To run over the entirety of the local example, we use a command like this::
$ python3 generator.py -g ~/Work/TRI/CastXML/build/bin/castxml -s ~/Work/TRI/wrapper_generator/example/
which would output a single C++ files of wrapper code called ``test_py.cpp``
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment