This will cover installing PyBlosxom from the git repositories in a way that won’t interfere with the packages or modules already installed on the system.
Installing PyBlosxom to hack on it is a little different since you:
As such, this document covers installing Pyblosxom into a virtual environment and deploying it using Paste.
This requires:
To install:
Create a virtual environment for Pyblosxom into a directory of your choosing as denoted by <VIRTUAL-ENV-DIR>:
virtualenv <VIRTUAL-ENV-DIR>
This is the virtual environment that Pyblosxom will run in. If you decide to delete Pyblosxom at some point, you can just remove this virtual environment directory.
Activate the virtual environment:
source <VIRTUAL-ENV-DIR>/bin/activate
Remember to activate the virtual environment every time you do something with Pyblosxom.
Additionally, if you’re running Pyblosxom from CGI or a cron job, you want to use the python interpreter located in the bin directory of your virtual environment–not the system one.
Using git, clone the Pyblosxom repository:
git clone https://github.com/pyblosxom/pyblosxom.git
Change directories into the pyblosxom directory and run:
python setup.py develop
When you want to run Pyblosxom from your git clone in your virtual environment, you will:
Make sure the virtual environment is activated and if it isn’t do:
source <VIRTUAL-ENV-DIR>/bin/activate
Change directories into where you have your blog and do:
paster serve blog.ini
Note: If you get an error message about “paster” not being currently installed, or about the system not finding PyBlosxom, it is likely that you have Paster and PyBlosxom installed in different places. To ensure Paster is installed in your virtualenv, make sure it is activated (see step 1) and then use pip to install paste.
Note 2: Due to a bug in some linux distributions, it is recommended to install paste in the following three steps:
pip install paste
pip install pastedeploy
pip install pastescript
Because you installed Pyblosxom with python setup.py develop, when you make changes to the Pyblosxom code, they’ll be available in the environment—you don’t need to re-run python setup.py develop.
Once set up, you can continue to the Creating your blog. chapter