Revision: 8116 Author: russblau Date: 2010-04-20 14:09:05 +0000 (Tue, 20 Apr 2010)
Log Message: ----------- Add installation instructions and update setup.py script
Modified Paths: -------------- branches/rewrite/setup.py
Added Paths: ----------- branches/rewrite/INSTALL
Added: branches/rewrite/INSTALL =================================================================== --- branches/rewrite/INSTALL (rev 0) +++ branches/rewrite/INSTALL 2010-04-20 14:09:05 UTC (rev 8116) @@ -0,0 +1,21 @@ +To install the Pywikipediabot framework: + +1) Extract/unzip this package to a directory on your computer. +2) Open a command prompt in that directory, and run the command: + + python setup.py install + +This will install the package to the "site-packages" directory of your Python +installation. Linux/Unix users may need to add "sudo" at the beginning of the +command line to get access to the site-packages directory; or, they can +install the package to a different location by running: + + python setup.py install --home=/path/to/location + +where "/path/to/location" is the directory that you want the Pywikipediabot +files installed to. + +Note: You will need to have an active Internet connection when you run the +setup script, in case the installer needs to download other modules required +by the framework. +
Modified: branches/rewrite/setup.py =================================================================== --- branches/rewrite/setup.py 2010-04-19 21:03:51 UTC (rev 8115) +++ branches/rewrite/setup.py 2010-04-20 14:09:05 UTC (rev 8116) @@ -1,3 +1,5 @@ +import sys + import ez_setup ez_setup.use_setuptools()
@@ -3,10 +5,25 @@ from setuptools import setup, find_packages
-setup(name='pywikibot', - version ='0.1.0dev', +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'] +else: + depend = ['httplib2>=0.6.0'] + +setup(name='Pywikipediabot', + version ='2.0alpha', description ='Python Wikipedia Bot Framework', + license = 'MIT', packages = find_packages(), - license = 'MIT', - install_requites = ['simplejson', 'httplib2>=0.4.0'] + install_requires = depend )
+# automatically launch generate_user_files.py + +import subprocess +python = sys.executable +python = python.replace("pythonw.exe", "python.exe") # for Windows +ignore = subprocess.call([python, "generate_user_files.py"]) \ No newline at end of file
pywikipedia-svn@lists.wikimedia.org