• Home
Name Date Size #Lines LOC

..--

llvm/03-May-2024-2,0111,471

README.txtD03-May-20241.4 KiB6839

README.txt

1This directory contains Python bindings for LLVM's C library.
2
3The bindings are currently a work in progress and are far from complete.
4Use at your own risk.
5
6Developer Info
7==============
8
9The single Python package is "llvm." Modules inside this package roughly
10follow the names of the modules/headers defined by LLVM's C API.
11
12Testing
13-------
14
15All test code is location in llvm/tests. Tests are written as classes
16which inherit from llvm.tests.base.TestBase, which is a convenience base
17class that provides common functionality.
18
19Tests can be executed by installing nose:
20
21    pip install nosetests
22
23Then by running nosetests:
24
25    nosetests
26
27To see more output:
28
29    nosetests -v
30
31To step into the Python debugger while running a test, add the following
32to your test at the point you wish to enter the debugger:
33
34    import pdb; pdb.set_trace()
35
36Then run nosetests:
37
38    nosetests -s -v
39
40You should strive for high code coverage. To see current coverage:
41
42    pip install coverage
43    nosetests --with-coverage --cover-html
44
45Then open cover/index.html in your browser of choice to see the code coverage.
46
47Style Convention
48----------------
49
50All code should pass PyFlakes. First, install PyFlakes:
51
52    pip install pyflakes
53
54Then at any time run it to see a report:
55
56    pyflakes .
57
58Eventually we'll provide a Pylint config file. In the meantime, install
59Pylint:
60
61    pip install pylint
62
63And run:
64
65    pylint llvm
66
67And try to keep the number of violations to a minimum.
68