<commit_before># Installing Loom

Loom targets Ubuntu 12.04 systems and requires the
[distributions](https://github.com/forcedotcom/distributions) library.

Step 1: build distributions.

    export DISTRIBUTIONS_PATH=/desired/path/to/distributions
    git clone https://github.com/forcedotcom/distributions $DISTRIBUTIONS_PATH
    cd $DISTRIBUTIONS_PATH
    make

Step 2: build loom

    export LOOM_PATH=/desired/path/to/loom
    git clone https://github.com/forcedotcom/loom $LOOM_PATH
    cd $LOOM_PATH
    ./requirements.sh
    make

## Notes

In Ubuntu 14.04 the distributions.io library needs to be manally rebuilt:

Step 1.5:

    cd $DISTRIBUTIONS_PATH
    make protobuf
    make<commit_msg>Update docs for installed distributions.<commit_after># Installing Loom

Loom targets Ubuntu 12.04 systems and requires the
[distributions](https://github.com/forcedotcom/distributions) library.

Loom assumes distributions is installed in a standard location. You
may need to set `CMAKE_PREFIX_PATH` for loom to find distributions.

## virtualenv

Within a virtualenv, both distributions and loom assume a prefix of
`$VIRTUAL_ENV`. `make install` installs headers to
`$VIRTUAL_ENV/include`, libs to `VIRTUAL_ENV/lib`, and so on.

For distributions and loom to find these installed libraries at
runtime, `LD_LIBRARY_PATH` must include `$VIRTUAL_ENV/lib`. With
virtualenvwrapper, it's convenient to do this in a postactivate hook:

    echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$VIRTUAL_ENV/lib' >> $VIRTUAL_ENV/bin/postactivate

## build

These steps assume you are running within a virtualenv.

Step 1: build distributions with protobuf support.

    git clone https://github.com/forcedotcom/distributions
    cd distributions
    DISTRIBUTIONS_USE_PROTOBUF=1 make install

Step 2: build loom

    git clone https://github.com/forcedotcom/loom
    cd loom
    ./requirements.sh
    make

## Ubuntu 14.04

In Ubuntu 14.04 the distributions.io library needs to be manally rebuilt:

Step 1.5:

    cd distributions
    make protobuf
    DISTRIBUTIONS_USE_PROTOBUF=1 make install
{'fraction_non_alphanumeric': 0.07218479307025986, 'fraction_numerical': 0.014436958614051972, 'mean_word_length': 4.1975, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3055464', 'n_tokens_mistral': 692, 'n_tokens_neox': 623, 'n_words': 208}