port to python-solv