refactor of shibboleth building script to python