Setting up Nikola on PLU computers

We set up our site for our github page last night using a Linux computer that already had nikola installed. Since we also needed to work on the site at school, we also had to set nikola up on school computers. To do this, we had to run the following commands:

  1. Install most of the dependencies using pip
    \Python34\Scripts\pip install --root=/path/to/destdir nikola
  2. Install nikola using the github version
  3. Edit C:\Python34\Lib\distutils\msvc9compiler.py at line 294 to hardcode 12.0 as the MSVC version
  4. Remove all instances of -mcygwin from C:\Python34\Lib\distutils\cygwinccompiler.py
  5. Install lxml using the official instructions for MS Windows and specify the path to install like in step 1.
  6. Install blinker, six, markupsafe, logbook, natsort, yapsy, and pyrss2gen manually with pip
  7. Construct a shell script file to automagically set environment variables to make manually copying nikola to a location where the executable can be run a lot less painful (as in, no need to type out extremely long path names):
if test -d /cygdrive;then
    #export PYPREFIX="/cygdrive/x/Apps/pylibs"
    export PYPREFIX="/cygdrive/c/Users/PLUCSCE/Downloads/pylibs"
else
    #export PYPREFIX="/x/Apps/pylibs"
    export PYPREFIX="/c/Users/PLUCSCE/Downloads/pylibs"
fi

export PYTHONPATH="${PYPREFIX}/Python34:${PYPREFIX}/Python34/lib:${PYPREFIX}/Python34/lib/site-packages"
export PATH="${PYPREFIX}/Python34/Scripts:${PATH}"

With the installation complete, all we had to do was keep a copy on our x drives before copying it to the Downloads folder and source the script file before continuing to work with our site.

Comments

robobrainz forums