copy make_version solution from binstar