hatshufflepy
============

Cython wrapper for the 
[hat_shuffle_implementation](https://bitbucket.org/JannoSiim/hat_shuffle_implementation/src/lib/)
mixnet. 

Python
======

The module requires **Python 2.7**.

Installing hatshufflepy
==================

### From PyPI

1. Install Dependencies:

```bash
sudo apt-get install libgmp3-dev
pip install cython >= 0.22.1
```

2. Install hatshufflepy

```bash
pip install hatshufflepy
```

### From source


1. Install dependencies:

```bash
sudo apt-get install build-essential git libboost-all-dev cmake libgmp3-dev libssl-dev libprocps4-dev pkg-config python-pip
pip install cython setuptools
```

2. Install hatshufflepy

```bash
sudo python setup.py install
```

### ImportError: libhatshuffle.so

***Set LD_LIBRARY_PATH***

Add to `.bashrc`:

```bash
export LD_LIBRARY_PATH=/path/to/python/site-packages/hatshufflepy
```

or set an environmental variable for the current session

```bash
export LD_LIBRARY_PATH=/path/to/python/site-packages/hatshufflepy
```

You can find your path to site-packages with the command:

```bash
python -m site
```

***So far we have tested these only on Ubuntu 16.04 LTS.***
