README.md, README-bindings.md - breakout python bindings readme.

The python bindings info is getting long and detailed
so move to its own README.
This commit is contained in:
Allen Winter
2021-05-10 12:56:59 -04:00
parent 18dbbb291a
commit 917dbf09f6
2 changed files with 75 additions and 33 deletions

View File

@@ -123,39 +123,7 @@ on where you installed KDDockWidgets.
Python Bindings
================
Make sure you have PySide2, shiboken2 and shiboken2-generator installed.
As this time, you cannot get shiboken2-generator because the wheels are not on PyPi.
To use the wheels do this:
```
% pip3 install \
--index-url=http://download.qt.io/official_releases/QtForPython/ \
--trusted-host download.qt.io \
shiboken2 pyside2 shiboken2_generator
```
For more info visit https://doc.qt.io/qtforpython/shiboken2/gettingstarted.html
Once QtForPython is installed you are ready to generate the PySide2 bindings
for KDDockWidgets.
Next pass `-DKDDockWidgets_PYTHON_BINDINGS=ON` to CMake, followed by the
make command.
The bindings will be installed to the passed `-DCMAKE_INSTALL_PREFIX`, which
might require setting the `PYTHONPATH` env variable to point to that path when
running applications. Alternatively, configure the bindings install location
by passing `-DKDDockWidgets_PYTHON_BINDINGS_INSTALL_PREFIX=/usr/lib/python3.8/site-packages`
to CMake (adjust to the python path on your system).
To run the KDDW python example
```
$ export PYTHONPATH=/kddw/install/path # Only if needed
$ cd python/examples/
$ rcc -g python -o rc_assets.py ../../examples/dockwidgets/resources_example.qrc
$ python3 main.py
```
Please refer to [README-bindings.md](README-bindings.md).
Versioning
==========