Installation

Requirements

Defernia is made with several open source softwares. Defernia depends on the following softwares:

Python 2.6–2.7 or PyPy 1.5+

The Defernia system is mostly written in Python programming language. There’s big incompatibility between Python 2.x and Python 3.x, so you must not use Python 3.0 nor more.

It works on PyPy 1.5+ as well.

PostgreSQL 8.3+ or SQLite 3+

Defernia uses RDBMS to store data. Recommend PostgreSQL for production use and SQLite for development-purpose.

Note

It probably works well on MySQL also, but we don’t recommend it.

Any other many Python packages

Defernia depends on any other many Python packages listed following, but you can be free from these libraries. Because these libraries are installed automatically.

Note

How to install the above softwares from Debian/Ubuntu Linux:

$ apt-get install python postgresql  # production
$ apt-get install python sqlite3     # development

Easy way

The easiest way to install Defernia is just using pip. It downloads Defernia itself and resolves dependencies also automatically.

$ pip install hg+https://bitbucket.org/dahlia/defernia

Hard way

Defernia is an ordinary Python package that follows the standard Python distribution way. It means that you can download the Defernia source code and install it by yourself.

$ hg clone https://bitbucket.org/dahlia/defernia
$ cd defernia/
defernia$ python setup.py install

If setuptools or Distribute is installed in your system, setup.py must have resolved its dependencies automatically as well.

Using virtualenv

If you have an idea to develop Defernia (and contribute to it), virtualenv would be helpful. It helps to isolate the working Python site-packages environemt from the system global site-packages environment. If there’s no installed virtualenv command in your system yet, install it first: (It might need a system administrator permission: use sudo then.)

$ easy_install virtualenv

Note

Most of Linux distributions provide virtualenv as package. For example, in Debian or Ubuntu like APT-based distributions you can install it like:

$ apt-get install python-virtualenv

And then, make your isolated environment for Defernia development via virtualenv:

$ virtualenv --distribute defernia-env
defernia-env$ cd defernia-env/
(defernia-env)defernia-env$ source bin/activate

The last command makes your command line prompt to enter the created defernia-env enviroment. The (defernia-env) prefix indicates where you are in. When you want to back from here, type deactivate in the prompt.

What you have to do next is to checkout the Defernia source code.

(defernia-env)defernia-env$ hg clone https://bitbucket.org/dahlia/defernia
(defernia-env)defernia-env$ cd defernia/

To install Defernia in development mode and resolve the dependencies, use setup.py develop subcommand instead of setup.py install.

(defernia-env)defernia$ python setup.py develop

It’s finished. Now you can hack the Defernia system.

Note

hg is a command provided by Mercurial.

Project Versions

Table Of Contents

Previous topic

Defernia Developer Documentation

Next topic

Getting started

This Page