tree: ca2db13c9cd1bcd23f50da48383659d874a0dc47 [path history] [tgz]
  1. CMakeLists.txt
  2. README.md
  3. config.py.in
  4. examples/
  5. run_python_test.sh
  6. tests/
  7. yang.i
swig/python/README.md

Requirements

  • cmake >= 2.8.12
  • swig
  • python3-dev (for python3 bindings)
  • python-dev (for python2 bindings)

Install

$ cd libyang/build
$ cmake -DGEN_LANGUAGE_BINDINGS=ON -DGEN_CPP_BINDINGS=ON -DGEN_PYTHON_BINDINGS=ON ..
$ # for python2 bindings add -DGEN_PYTHON_VERSION=2
$ make
$ make install

Recommendations

To avoid problems it is recommended to use separate build directories for Python 2 and Python 3 bindings.