From 7c99edaecf68f8d290f780dba41fbb8f4b9b671b Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Fri, 7 Apr 2017 07:22:32 +0200 Subject: Vagrant installations now uses Python 3.6.1. --- install.sh | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) mode change 100755 => 100644 install.sh diff --git a/install.sh b/install.sh old mode 100755 new mode 100644 index 05ceacb8..e84cfc76 --- 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" -- cgit