From cb8fb4a82056cc217f76159f8b7dcfae3f608dfb Mon Sep 17 00:00:00 2001 From: avichalp Date: Sat, 23 Jan 2016 22:42:26 +0530 Subject: [PATCH 1/3] adds Vagrantfile and setup script to setup the project --- .gitignore | 3 +++ Vagrantfile | 16 ++++++++++++++++ vagrant/setup.sh | 12 ++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 Vagrantfile create mode 100644 vagrant/setup.sh diff --git a/.gitignore b/.gitignore index 27d3d5518..5fbfdbac6 100644 --- a/.gitignore +++ b/.gitignore @@ -67,5 +67,8 @@ db.sqlite3 # Other stuff that doesn't belong virtualenv + scripts/import-for-development +# Vagrant +.vagrant diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 000000000..424794d62 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,16 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +VAGRANT_API_VERSION = "2" +Vagrant.configure(VAGRANT_API_VERSION) do |config| + config.vm.box = "ubuntu/trusty64" + + # Provision using shell + #config.vm.provision "shell", path: "vagrant/setup.sh" + config.vm.host_name = "dev.paperless" + config.vm.synced_folder ".", "/opt/paperless" + config.vm.provision "shell", path: "vagrant/setup.sh" + + # Networking details + config.vm.network "private_network", ip: "172.28.128.4" +end diff --git a/vagrant/setup.sh b/vagrant/setup.sh new file mode 100644 index 000000000..05de45033 --- /dev/null +++ b/vagrant/setup.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# install packages +sudo apt-get update +sudo apt-get build-dep -y python-imaging +sudo apt-get install -y libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev +sudo apt-get install -y build-essential python-dev python-pip sqlite3 libsqlite3-dev git + +# setup python project +pushd /opt/paperless +sudo pip install -r requirements.txt +popd From 04bcb1cdaddcba741296bdc61194229349163ac4 Mon Sep 17 00:00:00 2001 From: Daniel Quinn Date: Sun, 24 Jan 2016 12:31:02 +0000 Subject: [PATCH 2/3] Forced python3 for setups not using a virtualenv --- src/manage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manage.py b/src/manage.py index fe521ae0b..a4b5f0eb0 100755 --- a/src/manage.py +++ b/src/manage.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import sys From 62353f7d0baff92f6f69223ea7d3309300d851ee Mon Sep 17 00:00:00 2001 From: Daniel Quinn Date: Sun, 24 Jan 2016 12:32:26 +0000 Subject: [PATCH 3/3] Tweaked to force Python3 --- vagrant/setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vagrant/setup.sh b/vagrant/setup.sh index 05de45033..bbb3ca4ce 100644 --- a/vagrant/setup.sh +++ b/vagrant/setup.sh @@ -4,9 +4,9 @@ sudo apt-get update sudo apt-get build-dep -y python-imaging sudo apt-get install -y libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev -sudo apt-get install -y build-essential python-dev python-pip sqlite3 libsqlite3-dev git +sudo apt-get install -y build-essential python3-dev python3-pip sqlite3 libsqlite3-dev git # setup python project pushd /opt/paperless -sudo pip install -r requirements.txt +sudo pip3 install -r requirements.txt popd