GithubHelp home page GithubHelp logo

earowley / pxdgen Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 1.0 173 KB

A tool for converting C/C++ header files to Cython header files

License: GNU General Public License v3.0

Python 54.32% C++ 7.39% C 38.29%
cython pxd converter ffi

pxdgen's Introduction

PxdGen

PxdGen is a tool which uses Clang to convert C/C++ header files to Cython pxd files. It has two modes of operation: single-file mode and directory mode. Single file mode is well suited for C/C++ libraries that consolodate all definitions into a single header, while directory mode is better suited for large projects with many independent headers. There are some examples which use PxdGen on C/C++ libraries in the tests folder.

Installation

pip install pxdgen

Requirements

  • Clang - The version of libclang.(dll/so/dylib) on your system should match the version of the Python bindings to Clang. If it is not found by the standard library search path on your system, PxdGen allows you to point it to the library with -L.

Bugs/Limitations

  • Experimental C++ support

Usage

pxdgen [-h] [-o OUTPUT] [-p RELPATH] [-r] [-x LANGUAGE] [-I INCLUDE] [-L LIBS] [-v] [-f FLAGS] header

A tool that converts C/C++ headers to pxd files

positional arguments:
  header                Path to C/C++ header file or project directory to parse

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        Path to output file or directory (defaults to stdout)
  -p RELPATH, --relpath RELPATH
                        Relative path to parse from (defaults to pwd)
  -r, --recursive       Include declarations from all nested headers
  -x LANGUAGE, --language LANGUAGE
                        Force Clang to use the specified language for interpretation
  -I INCLUDE, --include INCLUDE
                        Add a directory to Clang's include path
  -L LIBS, --libclang-path LIBS
                        Specify the path to a directory containing libclang and its dependencies
  -v, --verbose         Print the status of the application to stdout
  -f FLAGS, --flag FLAGS
                        Set a flag to further tune the program output

pxdgen's People

Contributors

earowley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

masknugget

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.