aboutsummaryrefslogtreecommitdiffstats
path: root/README
blob: ccf454ade363e03f7f5e182fb4866e97621140c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#####################################################

EO Introspection - Scanner, Graph Generator

#####################################################

Scanner is a part of EObject introspection module.
It analyzes source and header C files, which can contain EO-styled class definition,
   and generates XML - description for each found class

#####################################################

1. Introspecting folder:
    Scanner runs recursively on defined folders
    a. > python eo_xml_gen.py --dir=IN_DIR --dir=IN_DIR2 --outdir=OUT_DIR -include=INCLUDE_DIR
      script searches for dependency xmlfiles in Python env paths.
      if PYTHONPATH wasn't set explicit --include=INCLUDE_DIR can be needed

    b. Building classes graph chart:
      Graph generator runs recursively on defined folders and generates graphviz dot file,
      which can be used to generate image

      > python eo_graph_gen.py --dir=FOLDER_WITH_XML1 --dir=FOLDER_WITH_XMLS --outfile=OUTFILE.dot
      > dot -Tpng OUTFILE.dot -o out.png
      > eog out.png

2. Generating python-bindings: read /eo_py/README


1. Creating eobase module:
   a. Creating new dir - PY_EOBASE
   b. Introspecting base module folder - EOBASE
      > python e_scan.py --dir=EOBASE --outdir=PY_EOBASE
      - eobase.xml will be created in PY_EOBASE
   c. Creating eobase python sources:
      > python e_compile.py  --dir=PY_EOBASE --outdir=PY_EOBASE --module=eobase
      --pkg="elementary eo"
      To create base module use option --module="eobase"
      - eobase.pxd, eobase.pyx - will be created
      - eodefault.pxd, eodefault.pyx - will be copied from script folder
      - setup.py will be created.
        setup.py can be modified in order to add include paths and libraries,
        which weren't mentioned in --pkg option
   d. Compiling python sources into python module.
      >  python setup.py build_ext --inplace
      - eodefault.so, eobase.so will be created
   e. Copy __init__.py to PY_EOBASE
      Add PYTHONPATH = PY_EOBASE