Moved preparation of .travis.yml to a separate script

Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
diff --git a/.travis.yml b/.travis.yml
index eec58ba..5c492fa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,15 +6,7 @@
       env: TOXENV=py37
 
 install:
-  - pip install tox
-  - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
-  - bash miniconda.sh -b -p $HOME/miniconda
-  - source "$HOME/miniconda/etc/profile.d/conda.sh"
-  - hash -r
-  - conda config --set always_yes yes --set changeps1 no
-  - conda install -q setuptools
-  - conda update -q conda
-  - conda env create --file conf/environment.yml
+  - . prepareenv.sh
   - conda activate yosys-env
 
 script: tox
diff --git a/MANIFEST.in b/MANIFEST.in
index e0c39ae..d6ba619 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -14,6 +14,8 @@
 
 recursive-include v2x *.py
 
+# Include the preparation script
+include prepareenv.sh
 
 # Docs
 recursive-include docs *.py
diff --git a/prepareenv.sh b/prepareenv.sh
new file mode 100755
index 0000000..5169d5a
--- /dev/null
+++ b/prepareenv.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+pip install tox
+wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
+bash miniconda.sh -b -p $HOME/miniconda
+source "$HOME/miniconda/etc/profile.d/conda.sh"
+hash -r
+conda config --set always_yes yes --set changeps1 no
+conda install -q setuptools
+conda update -q conda
+conda env create --file conf/environment.yml