From b2c157ec1dafe4d5d5f35545b18161ee707d3767 Mon Sep 17 00:00:00 2001 From: Tom Galloway Date: Thu, 3 Jan 2013 15:08:06 +0000 Subject: [PATCH] Added predepend packages and updated python path for build folders. --- .gitignore | 3 ++- Makefile | 18 +++++++++++++++++- plinth.py | 2 +- start.sh | 7 +++++-- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 570bf0b09..3b943e1bb 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,5 @@ TODO cfg.py cherrypy.config data/users.sqlite3 - +predepend +build/ diff --git a/Makefile b/Makefile index 3afdbcfb0..cf10e973c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ #SHELL := /bin/bash MAKE=make +BUILD_DIR = build #TODO: add install target @@ -9,9 +10,22 @@ COMPRESSED_CSS := $(patsubst %.css,%.tiny.css,$(CSS)) PWD=`pwd` ## Catch-all tagets -default: cfg cherrypy.config dirs template css docs dbs +default: predepend cfg cherrypy.config dirs template css docs dbs $(BUILD_DIR)/exmachina $(BUILD_DIR)/bjsonrpc all: default +build: + mkdir -p $(BUILD_DIR) + +predepend: + sudo sh -c "apt-get install augeas-tools python-bjsonrpc python-augeas python-simplejson" + touch predepend + +$(BUILD_DIR)/exmachina: build + git clone git://github.com/bnewbold/exmachina $(BUILD_DIR)/exmachina + +$(BUILD_DIR)/bjsonrpc: build + git clone git://github.com/deavid/bjsonrpc.git $(BUILD_DIR)/bjsonrpc + dbs: data/users.sqlite3 data/users.sqlite3: data/users.sqlite3.distrib @@ -69,3 +83,5 @@ clean: @find . -name "*.bak" -exec rm {} \; @$(MAKE) -s -C doc clean @$(MAKE) -s -C templates clean + rm -rf build + rm -f predepend diff --git a/plinth.py b/plinth.py index 6c197463c..eb39a4251 100755 --- a/plinth.py +++ b/plinth.py @@ -17,7 +17,7 @@ from util import * from logger import Logger #from modules.auth import AuthController, require, member_of, name_is -from exmachina.exmachina import ExMachinaClient +from exmachina import ExMachinaClient import socket __version__ = "0.2.14" diff --git a/start.sh b/start.sh index 01bc36e57..1a16d1a5f 100755 --- a/start.sh +++ b/start.sh @@ -1,8 +1,11 @@ #! /bin/sh -PYTHONPATH=../exmachina:$PYTHONPATH +PYTHONPATH=build/exmachina:$PYTHONPATH +PYTHONPATH=build/bjsonrpc:$PYTHONPATH + +export PYTHONPATH sudo killall exmachina.py -sudo ../exmachina/exmachina.py -v & +sudo build/exmachina/exmachina.py -v & python plinth.py sudo killall exmachina.py