[Distutils] Version number required for setup?
M.-A. Lemburg
mal@lemburg.com
Tue Nov 20 08:51:01 2001
Thomas Heller wrote:
>
> distutils/command/dist.py contains this code
>
> # -- Metadata query methods ----------------------------------------
> ...
> def get_version(self):
> return self.version or "???"
>
> which returns '???' as a version number if none is specified
> in the setup script.
>
> Since the bdist commands construct a filename containing the version
> number this leads to an invalid filename under windows, and the builds
> fail with a traceback like this:
>
> zip -rq D:\workspace\projects\epos\bin\dist\startup-???.win32.zip .
> creating 'D:\workspace\projects\epos\bin\dist\startup-???.win32.zip'
> and adding '.' to it
> error: D:\workspace\projects\epos\bin\dist\startup-???.win32.zip:
> Invalid argument
>
> The fix for bug #409403 (Signal an error if the distribution's metadata
> has no version) fixed this behaviour by requiring a version number:
>
> if self.metadata.version is None:
> raise DistutilsSetupError, \
> "No version number specified for distribution"
>
> In the meantime, version 1.47 of dist.py, this code has been removed again.
> Log message: "Back out the requirement to supply a version number".
> Why was this done?
No idea and I think that we should indeed require the version
number -- it's not much of an effort for a developer to add
a version number after all.
> I do not know whether we should require a version number or not, but at
> least the "???" string literal should be changed to something which can
> be part of a valid filename under windows (although IMO 'UNKNOWN' isn't
> really a better version number than '???')...
How about '0.0.0' ?!
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Consulting & Company: http://www.egenix.com/
Python Software: http://www.lemburg.com/python/