GithubHelp home page GithubHelp logo

xdress / clang Goto Github PK

View Code? Open in Web Editor NEW

This project forked from llvm-mirror/clang

2.0 2.0 3.0 92.83 MB

Extensions of the clang C/python bindings for use with xdress

Home Page: http://clang.llvm.org

License: Other

Objective-C 10.22% C++ 74.82% C 13.86% Python 0.85% Shell 0.03% CSS 0.05% Perl 0.05% MATLAB 0.06% Assembly 0.01% Fortran 0.02% M 0.01% Emacs Lisp 0.02% JavaScript 0.01%

clang's Introduction

XDress

XDress is an automatic wrapper generator for C/C++ written in pure Python. Currently, xdress may generate Python bindings (via Cython) for C++ classes & functions and in-memory wrappers for C++ standard library containers (sets, vectors, maps). In the future, other tools and bindings will be supported.

The main enabling feature of xdress is a dynamic type system that was designed with the purpose of API generation in mind.

Go here for the latest version of the docs!

:ref:`Go here for previous versions of the code & documentation. <previous_versions>`

Contents

.. toctree::
    :maxdepth: 1

    tutorial
    advtut
    libclang
    libref/index
    rcdocs
    previous/index
    other/index
    faq
    authors

Installation

Since xdress is pure Python code, the pip or easy_install may be used to grab and install the code:

$ pip install xdress

$ easy_install xdress

The source code repository for xdress may be found at the GitHub project site. You may simply clone the development branch using git:

git clone git://github.com/xdress/xdress.git

Also, if you wish to have the optional BASH completion, please add the following lines to your ~/.bashrc file:

# Enable completion for xdress
eval "$(register-python-argcomplete xdress)"

Dependencies

XDress currently has the following external dependencies,

Run Time:

  1. Clang/LLVM, optional for C/C++
  2. pycparser, optional for C
  3. GCC-XML, optional for C++
  4. dOxygen, optional for docstrings
  5. lxml, optional (but nice!)
  6. argcomplete, optional for BASH completion

Compile Time:

  1. Cython
  2. NumPy

Test Time:

  1. nose
  2. CMake, optional for integration tests

To install the dependencies on Ubuntu 14.04 use the following command:

$ apt-get install -y gccxml cython python-numpy python-pycparser python-nose cmake python-lxml llvm-dev libedit-dev libclang-3.5-dev
$ apt-get remove -y llvm-3.4

Examples of Use

To see examples of xdress in action (and sample run control files), here are a few places to look:

  • xdress/tests/cproj: This is a fully functioning sample C project which uses xdress locally. THIS PROJECT IS FOR TESTING PURPOSES ONLY!
  • xdress/tests/cppproj: This is a fully functioning sample C++ project which uses xdress locally. THIS PROJECT IS FOR TESTING PURPOSES ONLY!
  • PyNE: This uses xdress to generate STL container wrappers.
  • Bright: This uses xdress to automatically wrap a suite of interacting C++ class. This was the motivating use case for the xdress project.

Testing

XDress has two major test types: unit tests which test library functionality and integration tests which test the command line tool, the parsers, compilers, etc. The unit tests are generally fast while the integration are slower. From the tope level of the repository you may use nose to run the tests together or individually:

# Run just the unit tests
$ nosetests -a unit

# Run just the integration tests
$ nosetests -a integration

# Run all of the tests together
$ nosetests

Note that the integration tests require CMake in order to build the sample projects.

Contact Us

If you have questions or comments, please sign up for the the mailing list at https://groups.google.com/forum/#!forum/xdress and send an email to [email protected]. Alternatively, please contact the authors directly or open an issue on GitHub.

Contributing

We highly encourage contributions to xdress! If you would like to contribute, it is as easy as forking the repository on GitHub, making your changes, and issuing a pull request. If you have any questions about this process don't hesitate to ask the mailing list ([email protected]).

Helpful Links

clang's People

Contributors

akyrtzi avatar annazaks avatar belkadan avatar bob-wilson avatar chandlerc avatar chapuni avatar d0k avatar ddunbar avatar djasper avatar douggregor avatar dwblaikie avatar echristo avatar eefriedman avatar espindola avatar fpichet avatar gribozavr avatar isanbard avatar jrose-apple avatar lattner avatar nico avatar nlewycky avatar pcc avatar r4nt avatar rjmccall avatar tkremenek avatar topperc avatar weverything avatar xuzhongxing avatar zmodem avatar zygoloid avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

scopatz mpcdmb jetuk

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.