# DP: suggest installation of the pythonX.Y-dev package, if bdist_wininst # DP: cannot find the wininst-* files. --- a/Lib/distutils/command/bdist_wininst.py +++ b/Lib/distutils/command/bdist_wininst.py @@ -340,7 +340,10 @@ sfix = '' filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix)) - f = open(filename, "rb") + try: + f = open(filename, "rb") + except IOError as e: + raise DistutilsFileError(str(e) + ', please install the python%s-dev package' % sys.version[:3]) try: return f.read() finally: