changeset 1792:9240f52259b8 gae

automate creation of support directory/archive, document it
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 23 Sep 2012 17:19:02 +0200
parents 45bdb3bba89d
children 3b6e02260d0b
files Makefile docs/admin/install_gae.rst
diffstat 2 files changed, 52 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sun Sep 23 16:18:07 2012 +0200
+++ b/Makefile	Sun Sep 23 17:19:02 2012 +0200
@@ -29,6 +29,32 @@
 pylint:
 	@pylint --disable-msg=W0142,W0511,W0612,W0613,C0103,C0111,C0302,C0321,C0322 --disable-msg-cat=R MoinMoin
 
+# Automate creation of the GAE support archive from a virtualenv site-packages directory
+gaesupport:
+	@# do NOT name it "site-packages", but "support":
+	@cp -a env/lib/python2.7/site-packages support
+	@# remove compiled code files:
+	@find support -name "*.pyc" -exec rm {} \;
+	@find support -name "*.pyo" -exec rm {} \;
+	@# GAE offers jinja2, see app.yaml:
+	@rm -rf support/jinja2
+	@# documentation generation support not needed on GAE:
+	@rm -rf support/sphinx
+	@# package installers not needed/supported on GAE:
+	@rm -rf support/distribute support/pip
+	@# test support and suites not needed in production:
+	@rm -rf support/_pytest support/pytest*.py support/py.test*
+	@rm -rf support/py support/execnet support/pep8.py support/selenium
+	@rm -rf support/flask/testsuite support/werkzeug/testsuite
+	@# misc. egg and path stuff, not needed:
+	@rm -rf support/*.egg support/*.egg-info support/*.egg-link support/*.pth
+	@# we need to add a __init__.py to the namespace packages:
+	@touch support/flaskext/__init__.py support/xstatic/__init__.py support/xstatic/pkg/__init__.py
+
+gaetgz:
+	@# create the support archive:
+	@tar czf moin2-gae-support.tgz support
+
 clean: clean-devwiki clean-pyc clean-orig clean-rej
 	-rm -rf build
 
--- a/docs/admin/install_gae.rst	Sun Sep 23 16:18:07 2012 +0200
+++ b/docs/admin/install_gae.rst	Sun Sep 23 17:19:02 2012 +0200
@@ -32,3 +32,29 @@
 
 Usage of dev_appserver and appcfg is documented in the GAE SDK documentation.
 
+
+Notes for creating the support directory / archive
+==================================================
+Usually you can just use the ready-to-use moin2-gae-support.tgz as described
+above.
+
+But just for the case you have to recreate it (e.g. to update it), here are
+some hints:
+
+* make sure you run some POSIX OS (like Linux), Windows is currently not
+  supported. You also need "make", "find", "tar" and "gzip" (but usually you
+  should have them).
+* make sure that you have a virtualenv "env" in the moin workdir (this is
+  the default place and name used by the quickinstall script)
+* make sure you use Python 2.7.x
+* from the repo workdir, run::
+
+    make gaesupport
+
+This will create a "support" directory with all the dependencies needed for
+running moin on GAE. For more infos about how this is done, see the Makefile.
+
+If you want to create the moin2-gae-support.tgz, just run additionally::
+
+    make gaetgz
+