aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2017-04-07 07:19:12 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2017-04-07 07:19:12 +0200
commitfb343176476f6a5f5ee33bb3a55b077bf27004c6 (patch)
tree5659be0adfa0ba8f3faff1dc8944916933c21c62
parentMerge branch 'bookmark' of github.com:newspipe/newspipe into bookmark (diff)
downloadnewspipe-fb343176476f6a5f5ee33bb3a55b077bf27004c6.tar.gz
newspipe-fb343176476f6a5f5ee33bb3a55b077bf27004c6.tar.bz2
newspipe-fb343176476f6a5f5ee33bb3a55b077bf27004c6.zip
Vagrant installations now uses Python 3.6.1.
-rwxr-xr-xinstall.sh32
1 files changed, 22 insertions, 10 deletions
diff --git a/install.sh b/install.sh
index 05ceacb8..e84cfc76 100755
--- a/install.sh
+++ b/install.sh
@@ -6,39 +6,43 @@
# ./install.sh (sqlite|postgres)
#
-PYTHON_VERSION="3.5"
-
sudo apt-get install -y build-essential git wget > /dev/null
sudo apt-get install -y libxml2-dev libxslt1-dev > /dev/null # for lxml
sudo apt-get install -y libssl-dev openssl > /dev/null # for pip
+PYTHON_VERSION=3.6.1
echo "Installation of Python..."
if [ "$1" == postgres ]; then
sudo apt-get install -y libpq-dev > /dev/null
elif [ "$1" == sqlite ]; then
sudo apt-get install -y libsqlite3-dev > /dev/null
fi
-wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz -o /dev/null > /dev/null
-tar -xf Python-3.5.2.tar.xz > /dev/null
-rm Python-3.5.2.tar.xz > /dev/null
-cd Python-3.5.2/
+wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz
+tar -xf Python-$PYTHON_VERSION.tar.xz
+rm Python-$PYTHON_VERSION.tar.xz
+cd Python-$PYTHON_VERSION/
export PYTHONHOME=/usr/local/
export LD_RUN_PATH=/usr/local/lib/
-./configure --enable-loadable-sqlite-extensions --enable-shared > /dev/null
-make > /dev/null
-sudo make install > /dev/null
+./configure --enable-loadable-sqlite-extensions --enable-shared --enable-optimizations
+make
+sudo make install
cd ..
-sudo rm -Rf Python-3.5.2/
+sudo rm -Rf Python-$PYTHON_VERSION/
+
+
+PYTHON_VERSION=3.6
echo "Installing required Python libraries..."
sed -i '/psycopg2/d' requirements.txt > /dev/null
sudo pip$PYTHON_VERSION install --upgrade pip > /dev/null
sudo pip$PYTHON_VERSION install --upgrade -r requirements.txt > /dev/null
+
+
# Initializes the configuration file
cp src/conf/conf.cfg-sample src/conf/conf.cfg
# Delete default database configuration
@@ -46,6 +50,8 @@ sed -i '/database/d' src/conf/conf.cfg
sed -i '/database_url/d' src/conf/conf.cfg
+
+
# Configuration of the database
if [ "$1" == postgres ]; then
echo "Installing requirements for PostgreSQL..."
@@ -71,17 +77,23 @@ elif [ "$1" == sqlite ]; then
fi
+
+
echo "Initialization of the database..."
python$PYTHON_VERSION src/manager.py db_empty
python$PYTHON_VERSION src/manager.py db_create
+
+
# Bootstrap
echo "Retrieving bootstrap..."
git submodule init > /dev/null
git submodule update > /dev/null
+
+
echo "Installation terminated."
echo "Launch Newspipe with the command:"
echo -e "\tpython$PYTHON_VERSION src/runserver.py"
bgstack15