Split optional dependencies to python packages and other apps

Closes #227.