Rewrite script/create-dist in Python