One thing I hate about distutils (I guess he is the evil who does this) is that it changes the shebang line. In other words, the more rational and environment-vars decided s
In one of the latest versions of distutils, there is a flag --no-autoreq that have worked for me:
--no-autoreq do not automatically calculate dependencies
In my case, I was creating RPM files with python2.4 executable, in a server with both 2.4 and 2.6 installations. bdist just left the shebangs as they were, after running:
python setup.py bdist_rpm --no-autoreq
In the case that you are handling the spec files, you may use the solution explained at https://stackoverflow.com/a/7423994/722997, adding:
AutoReq: no