DRYed up deprecation check and fixed wheel bug