Merge branch 'devel' of https://github.com/cesnet/libnetconf2 into devel
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7de25b4..6a51779 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,7 +32,7 @@
 # set version
 set(LIBNETCONF2_MAJOR_VERSION 0)
 set(LIBNETCONF2_MINOR_VERSION 11)
-set(LIBNETCONF2_MICRO_VERSION 20)
+set(LIBNETCONF2_MICRO_VERSION 22)
 set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION})
 set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
 
diff --git a/packages/debian.python3-netconf2-experimental.install b/packages/debian.python3-netconf2-experimental.install
index de413f0..c9a0b54 100644
--- a/packages/debian.python3-netconf2-experimental.install
+++ b/packages/debian.python3-netconf2-experimental.install
@@ -1 +1 @@
-usr/lib/python*/site-packages/*
+usr/lib*/python*/*-packages/*
diff --git a/packages/libnetconf2.spec.in b/packages/libnetconf2.spec.in
index f8e8ebf..5700ac9 100644
--- a/packages/libnetconf2.spec.in
+++ b/packages/libnetconf2.spec.in
@@ -77,6 +77,6 @@
 
 %files -n python3-netconf2@COMPAT_PACKAGES@
 %defattr(-,root,root)
-%{_libdir}/python*
+/usr/lib*/python*/*-packages/*
 
 %changelog
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index c164e0b..7edae15 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -22,5 +22,7 @@
     configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docs/Makefile.in ${CMAKE_CURRENT_SOURCE_DIR}/docs/Makefile)
 	add_custom_target(pyapi ALL COMMAND ${PYTHON} ${SETUP_PY} build -b ${PYAPI_BUILD_DIR} ${DEBUG})
 	add_custom_target(pyapidoc COMMAND make -f ${CMAKE_CURRENT_SOURCE_DIR}/docs/Makefile html)
-    install(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} build -b ${PYAPI_BUILD_DIR} install --root=\$ENV{DESTDIR}/ --prefix=${CMAKE_INSTALL_PREFIX})")
+    execute_process(COMMAND ${PYTHON} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(plat_specific=True))"
+        OUTPUT_VARIABLE PYTHON_MODULE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
+    install(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} build -b ${PYAPI_BUILD_DIR} install --install-lib=\$ENV{DESTDIR}/${PYTHON_MODULE_PATH})")
 endif()