changeset 471:d910d5ce9b0b

Makefile: update makefile to not mention blatter Now instead of trying to use blatter, it offers a 'serve' target which bootstraps a virtualenv (if needed) and runs the flask app in debug mode.
author Augie Fackler <raf@durin42.com>
date Fri, 23 Dec 2016 11:05:45 -0500
parents 94ad26ab1689
children ef6da0fd2a0c
files .hgignore Makefile
diffstat 2 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Fri Dec 23 10:53:32 2016 -0500
+++ b/.hgignore	Fri Dec 23 11:05:45 2016 -0500
@@ -1,5 +1,6 @@
 syntax: glob
 *.pyc
 .DS_Store
+.env
 
 out/**
--- a/Makefile	Fri Dec 23 10:53:32 2016 -0500
+++ b/Makefile	Fri Dec 23 11:05:45 2016 -0500
@@ -1,7 +1,4 @@
-all:: build
-
-build:
-	python ../blatter/blatter/__init__.py blat
+all:: serve
 
 deploy-ssh:
 	ssh selenic 'cd /home/hg/www && hg pull -u'
@@ -9,7 +6,11 @@
 deploy:
 	cd /home/hg/www && hg pull -u
 
-serve:
-	python ../blatter/blatter/__init__.py serve
+serve: .env
+	HGWEBSITE_DEBUG=1 .env/bin/python hgwebsite.py
+
+.env:
+	python -m virtualenv .env
+	.env/bin/pip install flask
 
 .PHONY: build deploy-ssh deploy serve