[Distutils] Is a version number required in the setup script?
M.-A. Lemburg
mal@lemburg.com
Fri Mar 16 16:11:01 2001
Thomas Heller wrote:
>
> It has been reported by Riaan Booysen that executing
> 'python setup.py bdist_wininst' with a setup-script
> not defining a version number dies with a traceback.
> The reason is that distutils uses '???' as version number,
> and xxx-???.win32.zip is an invalid filename on windows:
>
> c:\util\zip.exe -rq C:\temp\test\build\bdist.win32\wininst\x-???.win32.zip .
> zip error: Invalid argument
>
> zip error: Could not create output file (C:/temp/test/build/bdist.win32/wininst/x-???.win32.zip)
> creating 'C:\temp\test\build\bdist.win32\wininst\x-???.win32.zip' and adding '.' to it
> Exception exceptions.AttributeError: "'ZipFile' instance has no attribute 'fp'" in <method ZipFile.__del__ of ZipFile instance at
> 00885B24> ignored
> error: C:\temp\test\build\bdist.win32\wininst\x-???.win32.zip: Invalid argument
>
> IMO this should be fixed so that either a check is done
> for a version number - or - a version number of 0.0.0
> should be used.
I'd suggest that a DistutilsError is raised preventing the build
altogether. Packages without version number don't really make
sense, IMHO.
--
Marc-Andre Lemburg
______________________________________________________________________
Company & Consulting: http://www.egenix.com/
Python Pages: http://www.lemburg.com/python/