Skip to content

jbcoe/py_cppmodel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6e46eb6 · Mar 31, 2024

History

19 Commits
Mar 31, 2024
Mar 31, 2024
Mar 31, 2024
Mar 31, 2024
Mar 31, 2024
Jun 4, 2023
Mar 31, 2024
Mar 31, 2024
Mar 31, 2024
Mar 31, 2024
Mar 31, 2024
Mar 31, 2024
Mar 31, 2024
Mar 31, 2024
Mar 31, 2024

Repository files navigation

py_cppmodel

license issues pre-commit

py_cppmodel is a Python wrapper around clang's python bindings to generate a simple Python model of a C++ translation unit.

Limitations

Currently the environment variable PY_CPPMODEL_LIBCLANG_PATH must be defined to specify where libclang can be found. This may be fixed in the future.

Testing

To run the tests, run:

python3 -m venv .venv           # Create a Python virtual env.
source ./.venv/bin/activate     # Activate the virtual env for bash by source.

mypy *.py --check-untyped-defs  # Run mypy to check type hints.
unittest discover .             # Run tests.

Attribution

We've made considerable use of the following in putting this together:

Design of the python bindings is taken from clang's cindex.

Mistakes are our own.

About

Python wrappers for clang's parsing of C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published