[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - publication.py:1.6
Fred L. Drake, Jr.
fred at zope.com
Tue Jun 8 14:53:48 EDT 2004
Update of /cvs-repository/Packages/zpkgtools/zpkgtools
In directory cvs.zope.org:/tmp/cvs-serv22734
Modified Files:
publication.py
Log Message:
The dump() function generates version 1.1 metadata if certain fields
are present; use the lowest possible value for the generated
Metadata-Version field.
=== Packages/zpkgtools/zpkgtools/publication.py 1.5 => 1.6 ===
--- Packages/zpkgtools/zpkgtools/publication.py:1.5 Tue Apr 27 12:07:45 2004
+++ Packages/zpkgtools/zpkgtools/publication.py Tue Jun 8 14:53:47 2004
@@ -43,7 +43,11 @@
:param f: Open file object to write to.
"""
- print >>f, "Metadata-Version: 1.0"
+ metadata_version = "1.0"
+ if (metadata.maintainer or metadata.maintainer_email
+ or metadata.url or metadata.get_classifiers()):
+ metadata_version = "1.1"
+ print >>f, "Metadata-Version:", metadata_version
print >>f, "Name:", metadata.get_name()
if metadata.version:
print >>f, "Version:", metadata.get_version()
More information about the Zope-CVS
mailing list