~ubuntu-branches/ubuntu/gutsy/moin/gutsy

« back to all changes in this revision

Viewing changes to MoinMoin/version.py

  • Committer: Bazaar Package Importer
  • Author(s): Sivan Greenberg
  • Date: 2006-07-09 19:28:02 UTC
  • Revision ID: james.westby@ubuntu.com-20060709192802-oaeuvt4v3e9300uj
Tags: 1.5.3-1ubuntu1
* Merge new debian version.
* Reapply Ubuntu changes:
    + debian/rules:
      - Comment out usage of control.ubuntu.in (doesn't fit!).
    + debian/control.in:
      - Dropped python2.3 binary package.
    + debian/control:
      - Dropped python2.3 binary, again.
      - Dropped python2.3-dev from Build-Depends-Indep.
    + debian/patches/001-attachment-xss-fix.patch:
      - Dropped this patch. It's now in upstream's distribution.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
    @copyright: 2000-2006 by J�rgen Hermann <jh@web.de>
7
7
    @license: GNU GPL, see COPYING for details.
8
8
"""
 
9
import sys
9
10
 
10
11
try:
11
12
    from patchlevel import patchlevel
13
14
    patchlevel = 'release'
14
15
 
15
16
project = "MoinMoin"
16
 
release  = '1.5.2'
 
17
release  = '1.5.3'
17
18
revision = patchlevel
18
19
 
 
20
def update():
 
21
    """ update the version information in package init """
 
22
    fname = 'MoinMoin/__init__.py'
 
23
    f = file(fname)
 
24
    lines = f.readlines()
 
25
    f.close()
 
26
    f = file(fname, "w")
 
27
    version_pattern = "%s Version " % project
 
28
    version_string = version_pattern + "%s %s" % (release, revision)
 
29
    for line in lines:
 
30
        if version_pattern in line:
 
31
            f.write("%s\n" % version_string)
 
32
        else:
 
33
            f.write(line)
 
34
    f.close()
 
35
 
19
36
if __name__ == '__main__':
20
 
    print project, release, revision
 
37
    if len(sys.argv) > 1 and sys.argv[1] == "update":
 
38
        update()
 
39
    else:
 
40
        print project, release, revision
21
41