Patchwork [2,of,3,website] Makefile: update makefile to not mention blatter

login
register
mail settings
Submitter Augie Fackler
Date Dec. 23, 2016, 4:08 p.m.
Message ID <4d7de32b44efc1a38546.1482509291@imladris.local>
Download mbox | patch
Permalink /patch/18016/
State Accepted
Headers show

Comments

Augie Fackler - Dec. 23, 2016, 4:08 p.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1482509145 18000
#      Fri Dec 23 11:05:45 2016 -0500
# Node ID 4d7de32b44efc1a385466e9bbafe4ac5a2177c34
# Parent  94ad26ab1689f6ef011779a10c91cc4c87bfd3bc
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.
David Soria Parra - Dec. 24, 2016, 12:02 a.m.
On Fri, Dec 23, 2016 at 11:08:11AM -0500, Augie Fackler wrote:
> @@ -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'

we proabbly want to get rid of that too

Patch

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -1,5 +1,6 @@ 
 syntax: glob
 *.pyc
 .DS_Store
+.env
 
 out/**
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -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-ssh:
 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