Created
January 7, 2014 20:26
-
-
Save csinchok/8306293 to your computer and use it in GitHub Desktop.
Just a little thing to build a uwsgi binary with an app embedded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [uwsgi] | |
| main_plugin = python | |
| inherit = base | |
| bin_name = betty-cropper | |
| embed_files = examples/bootstrap.py,env/lib/python2.7/site-packages/betty,env/lib/python2.7/site-packages/wand,env/lib/python2.7/site-packages/flask,env/lib/python2.7/site-packages/jinja2,env/lib/python2.7/site-packages/werkzeug,env/lib/python2.7/site-packages/sqlalchemy,env/lib/python2.7/site-packages/itsdangerous,env/lib/python2.7/site-packages/markupsafe,env/lib/python2.7/site-packages/slimit | |
| embed_config = uwsgi.ini |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BUILD_DIR := $(shell mktemp -d -t "betty-build") | |
| UWSGI_VERSION = 1.9.21.1 | |
| UWSGI_DIR = $(BUILD_DIR)/uwsgi-$(UWSGI_VERSION) | |
| VENV_DIR =$(BUILD_DIR)/uwsgi-$(UWSGI_VERSION)/env | |
| all: embed | |
| embed: | |
| virtualenv $(BUILD_DIR) | |
| cd $(BUILD_DIR) && wget -O uwsgi.zip https://github.com/unbit/uwsgi/archive/$(UWSGI_VERSION).zip | |
| cd $(BUILD_DIR) && unzip uwsgi.zip | |
| virtualenv $(VENV_DIR) | |
| . $(VENV_DIR)/bin/activate; pip install https://github.com/theonion/betty-cropper/tarball/master | |
| cp uwsgi.ini $(UWSGI_DIR)/uwsgi.ini | |
| cp buildconfig.ini $(UWSGI_DIR)/buildconf/betty.ini | |
| . $(VENV_DIR)/bin/activate && cd $(UWSGI_DIR) && python uwsgiconfig.py --build betty |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [uwsgi] | |
| import = sym://bootstrap_py | |
| module = betty:app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment