Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Commit

Permalink
Support packages with underscores in their name.
Browse files Browse the repository at this point in the history
  • Loading branch information
hannosch committed Jul 13, 2010
1 parent 61f8523 commit 61fec1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions zope/z2release/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ def main():
version = CP.get('versions', package)
if '#' in version:
version = version.split('#')[0].strip()
if '_' in package:
package = package.replace('_', '-')
write_index(server, package, version, dirname)

if __name__ == '__main__':
Expand Down
5 changes: 5 additions & 0 deletions zope/z2release/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ def optionxform(self, option):


def write_index(server, package, version, dirname):
if '-' in package:
exists = server.search(dict(name=package))
if not exists:
package = package.replace('-', '_')

print >>sys.stderr, 'Package %s==%s' % (package, version)
dest_dir = os.path.join(dirname, package)
if not os.path.exists(dest_dir):
Expand Down

0 comments on commit 61fec1d

Please sign in to comment.