Commit aec3e682 authored by Tres Seaver's avatar Tres Seaver

Suppress case-flattening ConfigParser stupidity.

parent e87439c4
...@@ -10,10 +10,10 @@ import urlparse ...@@ -10,10 +10,10 @@ import urlparse
from xmlrpclib import Server from xmlrpclib import Server
from ConfigParser import RawConfigParser as ConfigParser from ConfigParser import RawConfigParser as ConfigParser
# packages containing upper-case letters class CasePreservingConfigParser(ConfigParser):
upper_names = ('ClientForm', 'RestrictedPython', 'ZConfig', 'ZODB3', 'zLOG',
'Acquisition', 'DateTime', 'ExtensionClass', 'Persistence', def optionxform(self, option):
'ZopeUndo', 'Missing', 'MultiMapping', 'Record', 'ThreadLock', ) return option # don't flatten case!
def write_index(package, version): def write_index(package, version):
print >>sys.stderr, 'Package %s==%s' % (package, version) print >>sys.stderr, 'Package %s==%s' % (package, version)
...@@ -43,7 +43,7 @@ def write_index(package, version): ...@@ -43,7 +43,7 @@ def write_index(package, version):
print >>fp, '</body></html>' print >>fp, '</body></html>'
fp.close() fp.close()
CP = ConfigParser() CP = CasePreservingConfigParser()
CP.read(['versions.cfg']) CP.read(['versions.cfg'])
server = Server('http://pypi.python.org/pypi') server = Server('http://pypi.python.org/pypi')
...@@ -54,11 +54,5 @@ write_index('Zope2', '2.13.0dev') ...@@ -54,11 +54,5 @@ write_index('Zope2', '2.13.0dev')
for package in CP.options('versions'): for package in CP.options('versions'):
# options() returns all options in lowercase but
# we must preserve the case for package names
for name in upper_names:
if name.lower() == package:
package = name
break
version = CP.get('versions', package) version = CP.get('versions', package)
write_index(package, version) write_index(package, version)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment