<br>Hello all,<br><div class="gmail_quote"><br><i>As several people have mentioned they had trouble starting with the rewrite branch, I decided to do a step-by-step log of installing the rewrite in a way that is good for developing -- this means you are able to edit the framework files, while not inflicting any changes on other users (or other bots you run!) of the system. By using setup.py develop, edits you make to the framework will immediately be used (no need to setup.py install them), but only within the virtualenv.</i></div>
<div class="gmail_quote"><br></div><div class="gmail_quote"><b>This is the windows version of my earlier email</b></div><div class="gmail_quote"><b><br></b></div><div class="gmail_quote">I do not run python on windows, so this is a tutorial that starts with installing python. It's a bit rougher than the unix one, as I did not want to spend too much time on it.<br>
<br></div><div class="gmail_quote">1. Install python 2.7</div><div class="gmail_quote"><a href="http://python.org/download/">http://python.org/ftp/python/2.7.1/python-2.7.1.msi</a> (do <b>not</b> use the 64-bit version, due to <a href="http://bugs.python.org/issue6792">http://bugs.python.org/issue6792</a> )</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">2. Install Setuptools</div><div class="gmail_quote"><a href="http://pypi.python.org/pypi/setuptools#files">http://pypi.python.org/pypi/setuptools#files</a></div>
<div class="gmail_quote"><br></div><div class="gmail_quote">3. Install Virtualenv</div><div class="gmail_quote">start/run: cmd</div><div class="gmail_quote">c:\Python27\Scripts\easy_install.exe virtualenv</div><div class="gmail_quote">
<br></div><div class="gmail_quote">4. create a virtualenv for pwb</div><div class="gmail_quote"><div class="gmail_quote">C:\Users\valhallasw>c:\Python27\Scripts\virtualenv.exe pywikibot</div><div class="gmail_quote">New python executable in pywikibot\Scripts\python.exe</div>
<div class="gmail_quote">Installing setuptools.....................done.</div><div class="gmail_quote"><br></div><div class="gmail_quote">5. Go to C:\Users\valhallasw\pywikibot and use tortoisesvn to get the rewrite</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">6. create a shortcut to cmd /k c:\users\valhallasw\pywikibot\scripts\activate.bat</div><div class="gmail_quote"> with working path C:\Users\valhallasw\pywikibot\rewrite</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">7. Use the shortcut. You now have a new cmd.exe window</div><div class="gmail_quote"><br></div><div class="gmail_quote">8. python setup.py develop</div><div class="gmail_quote">
<br></div><div class="gmail_quote"><div class="gmail_quote">Your default user directory is "C:\Users\valhallasw\AppData\Roaming\pywikibot"</div><div class="gmail_quote">How to proceed? ([K]eep [c]hange)</div><div class="gmail_quote">
<br></div><div class="gmail_quote">change, to c:\users\valhallasw\pywikibot\conf\</div><div class="gmail_quote">Answer 'y' to the warning prompt (not 'yes')</div><div class="gmail_quote"><br></div><div class="gmail_quote">
Do you want to copy files: y</div><div class="gmail_quote">[note: I copied my unix user-config.py to c:\users\valhallasw\pywikibot]</div><div class="gmail_quote"><div class="gmail_quote">Path to existing wikipedia.py? C:\Users\valhallasw\pywikibot</div>
<div class="gmail_quote">NOTE: user-config.py already exists in the directory</div><div class="gmail_quote">Create user-fixes.py file? ([y]es, [N]o) n</div></div><div class="gmail_quote"><br></div><div class="gmail_quote">
<div class="gmail_quote">(pywikibot) C:\Users\valhallasw\pywikibot\rewrite>echo SET PYWIKIBOT2_DIR=c:\users\valhallasw\pywikibot\conf>> ..\Scripts\activate.bat</div><div class="gmail_quote"><br></div><div class="gmail_quote">
(DON'T put a space between f and >>!)</div><div class="gmail_quote"><br></div><div class="gmail_quote">Close the window, and</div><div class="gmail_quote"><br></div><div class="gmail_quote">9. Use the shortcut from (7) again</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">You should now have a cmd.exe with a working pywikibot setup!</div><div class="gmail_quote"><br></div><div class="gmail_quote"><div class="gmail_quote">(pywikibot) C:\Users\valhallasw\pywikibot\rewrite\scripts>python touch.py Gebruiker:Valhallasw</div>
<div class="gmail_quote">Retrieving 1 pages from wikipedia:nl.</div><div class="gmail_quote">Page [[Gebruiker:Valhallasw]] saved</div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">
NOTE: you <b>must</b> use 'python' in front of the script name, or python will not find the pywikibot directory.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Good luck!</div><div class="gmail_quote">
<br></div><div class="gmail_quote">Merlijn</div></div></div></div></div>