Index: branches/rewrite/scripts/version.py |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | import os |
13 | 13 | import time |
14 | 14 | import sys |
15 | | -import config |
| 15 | +from pywikibot import config2 as config |
16 | 16 | |
17 | 17 | cache = None |
18 | 18 | |
— | — | @@ -31,8 +31,8 @@ |
32 | 32 | try: |
33 | 33 | (tag, rev, date) = getversion_nightly() |
34 | 34 | except Exception, e: |
35 | | - import wikipedia |
36 | | - version = wikipedia.__version__ |
| 35 | + import pywikibot |
| 36 | + version = pywikibot.__version__ |
37 | 37 | if len(version) == 4: |
38 | 38 | # the value is most likely '$Id' + '$', it means that |
39 | 39 | # wikipedia.py got imported without using svn at all |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | id, file, rev, date, ts, author, dollar = version.split(' ') |
44 | 44 | tag = '' |
45 | 45 | date = time.strptime('%sT%s' % (date, ts), '%Y-%m-%dT%H:%M:%SZ') |
46 | | - rev += ' (wikipedia.py)' |
| 46 | + rev += ' (pywikibot.py)' |
47 | 47 | datestring = time.strftime('%Y/%m/%d, %H:%M:%S', date) |
48 | 48 | cache = dict(tag=tag, rev=rev, date=datestring) |
49 | 49 | return cache |
— | — | @@ -76,11 +76,8 @@ |
77 | 77 | return (tag, rev, date) |
78 | 78 | |
79 | 79 | if __name__ == '__main__': |
80 | | - print 'Pywikipedia %s' % getversion() |
| 80 | + print 'Pywikibot %s' % getversion() |
81 | 81 | print 'Python %s' % sys.version |
82 | | - print 'config-settings:' |
83 | | - print 'use_api =', config.use_api |
84 | | - print 'use_api_login =', config.use_api_login |
85 | 82 | if not __import__('unicodedata').normalize('NFC', u'\u092e\u093e\u0930\u094d\u0915 \u091c\u093c\u0941\u0915\u0947\u0930\u092c\u0930\u094d\u0917') == u'\u092e\u093e\u0930\u094d\u0915 \u091c\u093c\u0941\u0915\u0947\u0930\u092c\u0930\u094d\u0917': |
86 | 83 | print u'unicode test: triggers problem #3081100' |
87 | 84 | else: |