Wednesday, June 10, 2009

virtualenv 101

I'm working furiously on the Python textbook. The html2rst.py script I used to convert lore to reST did a pretty good job, but it now requires a human touch to get it looking right. I'm using Sphinx to build the web version, and last night I asked Filip Sufitchi if he could help me get the auto index generation working. He said he would, which is great news!

A quick review of how I setup a new python virtual environment so I could run the latest version of Sphinx and build the book from the reST source without messing up my Ubuntu installation:
  • make sure the python-virtualenv package is installed
  • $ virtualenv --no-site-packages PythonVEone
  • $ source PythonVEone/bin/activate
  • $ cd PythonVEone
  • $ easy_install sphinx
  • $ cp -r ../Ubuntu\ One/My\ Files/Projects/Sphinx/thinkcspy2/english2e/ thinkcspy2e
  • $ thinkcspy2e
  • $ sphinx-build source build
OK, back to work on the book...

No comments:

Post a Comment