http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10329
Revision: 10329 Author: xqt Date: 2012-06-08 14:04:58 +0000 (Fri, 08 Jun 2012) Log Message: ----------- python 2.6 is needed for setter/deleter properties
Modified Paths: -------------- branches/rewrite/pwb.py branches/rewrite/setup.py
Property Changed: ---------------- branches/rewrite/setup.py
Modified: branches/rewrite/pwb.py =================================================================== --- branches/rewrite/pwb.py 2012-06-08 14:03:58 UTC (rev 10328) +++ branches/rewrite/pwb.py 2012-06-08 14:04:58 UTC (rev 10329) @@ -13,6 +13,14 @@ #
import sys,os + +if sys.version_info[0] != 2: + raise RuntimeError("ERROR: Pywikipediabot only runs under Python 2") +if sys.version_info[0] == 3: + raise RuntimeError("ERROR: Pywikipediabot does not run under Python 3") +if sys.version_info[1] < 6: + raise RuntimeError("ERROR: Pywikipediabot only runs under Python 2.6 or higher") + sys.path.append('.') sys.path.append('externals/httplib2') sys.path.append('pywikibot/compat')
Modified: branches/rewrite/setup.py =================================================================== --- branches/rewrite/setup.py 2012-06-08 14:03:58 UTC (rev 10328) +++ branches/rewrite/setup.py 2012-06-08 14:04:58 UTC (rev 10329) @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +"""installer script for pywikibot 2.0 framework""" +# +# (C) Pywikipedia team, 2009-2012 +# +__version__ = '$Id$' +# +# Distributed under the terms of the MIT license. +# import sys
from distribute_setup import use_setuptools @@ -7,10 +16,10 @@
if sys.version_info[0] != 2: raise RuntimeError("ERROR: Pywikipediabot only runs under Python 2") -if sys.version_info[1] < 5: - raise RuntimeError("ERROR: Pywikipediabot only runs under Python 2.5 or higher") -elif sys.version_info[1] == 5: - depend = ['simplejson', 'httplib2>=0.6.0'] +if sys.version_info[0] == 3: + raise RuntimeError("ERROR: Pywikipediabot does not run under Python 3") +if sys.version_info[1] < 6: + raise RuntimeError("ERROR: Pywikipediabot only runs under Python 2.6 or higher") else: depend = ['httplib2>=0.6.0']
Property changes on: branches/rewrite/setup.py ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision