<commit_before>.. _deploy:

==============
Build Devilry
==============
Devilry does not come pre-packaged. Instead, we deploy using `buildout <http://www.buildout.org/>`_.
There is several reasons for that:

- It is easier to maintain deployment through buildout.
- It is easier to customize Devilry when we do not have to force defaults on
  people. With the current method of deployment, admins can easily intergrate
  local devilry addons.
- The method we are using seems to work very well for the Plone CMS.

What this means for you is that you have to setup a very minimal
buildout-config instead of downloading an archive and unzipping it.


Configure buildout
==================
Create a directory that will be used to configure your Devilry build::

    $ mkdir devilrybuild

Create a configuration file named ``buildout.cfg`` in the directory. Add the
following to the configuration file::

    [buildout]
    extends = https://raw.github.com/devilry/devilry-deploy/REVISION/buildout/buildout-base.cfg

Replace ``REVISION`` (in the extends url) with the Devilry version you want to
use (E.g.: ``1.2.1``).


Install required system packages
================================
See :ref:`required-system-packages`.


Intialize the buildout
======================

CD to the directory and run the following commands to download Devilry and
all dependencies into a Python virtualenv. The end result is a
selfcontained devilry build that only depends on the availability of a 
compatible Python interpreter to run. The virtualenv is not affected by
other Python packages installed globally::

    $ cd devilrybuild/<commit_msg>docs.deploy: Listing tags and releasenotes.<commit_after>.. _deploy:

==============
Build Devilry
==============
Devilry does not come pre-packaged. Instead, we deploy using `buildout <http://www.buildout.org/>`_.
There is several reasons for that:

- It is easier to maintain deployment through buildout.
- It is easier to customize Devilry when we do not have to force defaults on
  people. With the current method of deployment, admins can easily intergrate
  local devilry addons.
- The method we are using seems to work very well for the Plone CMS.

What this means for you is that you have to setup a very minimal
buildout-config instead of downloading an archive and unzipping it.


Configure buildout
==================
Create a directory that will be used to configure your Devilry build::

    $ mkdir devilrybuild

Create a configuration file named ``buildout.cfg`` in the directory. Add the
following to the configuration file::

    [buildout]
    extends = https://raw.github.com/devilry/devilry-deploy/REVISION/buildout/buildout-base.cfg

Replace ``REVISION`` (in the extends url) with the Devilry version you want to
use (E.g.: ``v1.2.1``). See https://github.com/devilry/devilry-deploy/tags for
the current releases, and refer to :devilrydoc:`The releasenotes listing
<releasenoteslisting.html>` for the information about each release.


Install required system packages
================================
See :ref:`required-system-packages`.


Intialize the buildout
======================

CD to the directory and run the following commands to download Devilry and
all dependencies into a Python virtualenv. The end result is a
selfcontained devilry build that only depends on the availability of a 
compatible Python interpreter to run. The virtualenv is not affected by
other Python packages installed globally::

    $ cd devilrybuild/
{'fraction_non_alphanumeric': 0.11420373027259684, 'fraction_numerical': 0.001721664275466284, 'mean_word_length': 4.524564183835182, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4968163', 'n_tokens_mistral': 936, 'n_tokens_neox': 880, 'n_words': 438}