forked from jplusplus/resonate2014
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (45 loc) · 1.98 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Project : Resonate 2014
# -----------------------------------------------------------------------------
# Author : Edouard Richard <[email protected]>
# -----------------------------------------------------------------------------
# License : GNU General Public License
# -----------------------------------------------------------------------------
# This file is part of Resonate2014.
#
# Resonate2014 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Resonate2014 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Resonate2014. If not, see <http://www.gnu.org/licenses/>.
WEBAPP = $(wildcard webapp.py)
PYC = $(wildcard *.pyc */*.pyc sources/*/*.pyc sources/*/*/*.pyc sources/*/*/*/*.pyc sources/*/*/*/*/*.pyc)
CACHE = $(wildcard static/.webassets-cache static/gen)
RM = rm -fr
run: clean
. `pwd`/.env ; python $(WEBAPP)
install:
virtualenv venv --no-site-packages --distribute --prompt=resonate2014
. `pwd`/.env ; pip install -r requirements.txt
. `pwd`/.env ; npm install
clean:
$(RM) $(PYC)
$(RM) $(CACHE)
freeze:
-rm build -r
. `pwd`/.env ; python -c "from webapp import app; from flask_frozen import Freezer; freezer = Freezer(app); freezer.freeze()"
-rm build/static/.webassets-cache/ -r
sed -i '.bak' 's/href="\//href="/g' build/*.html
sed -i '.bak' 's/src="\//src="/g' build/*.html
update_i18n:
pybabel extract -F babel.cfg -o translations/messages.pot .
pybabel update -i translations/messages.pot -d translations
compile_i18n:
pybabel compile -d translations
# EOF