1 This directory contains Python bindings for LLVM's C library.
3 The bindings are currently a work in progress and are far from complete.
9 The single Python package is "llvm." Modules inside this package roughly
10 follow the names of the modules/headers defined by LLVM's C API.
15 All test code is location in llvm/tests. Tests are written as classes
16 which inherit from llvm.tests.base.TestBase, which is a convenience base
17 class that provides common functionality.
19 Tests can be executed by installing nose:
23 Then by running nosetests:
31 To step into the Python debugger while running a test, add the following
32 to your test at the point you wish to enter the debugger:
34 import pdb; pdb.set_trace()
40 You should strive for high code coverage. To see current coverage:
43 nosetests --with-coverage --cover-html
45 Then open cover/index.html in your browser of choice to see the code coverage.
50 All code should pass PyFlakes. First, install PyFlakes:
54 Then at any time run it to see a report:
58 Eventually we'll provide a Pylint config file. In the meantime, install
67 And try to keep the number of violations to a minimum.