In order to make the bdist_rpm target in distutils work with a broader range of rpm versions, it is necessary to use the 'rpmbuild' command, rather than 'rpm' to build rpms. Using 'rpm -ba ...' has been deprecated for a couple of years and is no longer part of rpm 4.1 (which is distributed by default with Red Hat 8.0 a.o.). The attached patch fixes this.