Skip to main content

Buildout recipe downloading, compiling and configuring uWSGI.

Project description

buildout.recipe.uwsgi

This is a zc.buildout recipe for downloading, installing and configuring uWSGI inside a buildout. It compiles an uWSGI executable in bin/ and a xml configuration file in parts/.

Forked from shaunsephton.recipe.uwsgi .

Changelog

0.0.19

  • Setting the PYTHON_BIN env variable to the current python interpreter (for building uwsgi with the right interpreter)

0.0.18

  • Fixed issue #11

0.0.17

  • Add option “pythonpath-eggs-directory” to tweak base directory of generated pythonpath configuration directives

0.0.16

  • Documentation enhancements

0.0.15

  • Add option download-url to configure non-vanilla download url

0.0.14

  • Extra-paths fixes

0.0.13

  • Minor code/documentation cleanups

0.0.12

  • Fixed a bug when using ‘use-system-binary’ (was working backwards)

  • Fixed build process when the part’s name was something other than ‘uwsgi’

0.0.11

  • New option, use-system-binary, to skip building uwsgi

0.0.10

  • Added the version option to allow downloading a specific version of uwsgi

  • Added the possibility of specifying a certain build profile

  • Options that should go in the generated .xml file should be xml- prefixed

Usage

Add a part to your buildout.cfg like this:

[buildout]
parts=uwsgi

[uwsgi]
recipe=buildout.recipe.uwsgi

Running the buildout will download and compile uWSGI and add an executable with the same name as your part in the bin/ directory (e.g. bin/uwsgi). It will also create a uwsgi.xml configuration file in a parts directory with the same name as your part (e.g. parts/uwsgi/uwsgi.xml).

uwsgi can then be started like:

$ ./bin/uwsgi --xml parts/uwsgi/uwsgi.xml

Configuration options

You can specify a number of options for this recipe, for “fine-tuning” the build process. Below is an example of all possible options that can appear in the buildout file:

[buildout]
parts=uwsgi

[uwsgi]
recipe=buildout.recipe.uwsgi
download-url=http://projects.unbit.it/downloads/uwsgi-{0}.tar.gz
version=1.2.5
profile=default.ini
use-system-binary=1
xml-socket=127.0.0.1:7001
xml-module=my_uwsgi_package.wsgi
xml-master=True
download-url

Specifies the url where uWSGI’s source code should be downloaded from. {0} inside this url will be replaced by the value of the version option. The default value of download-url is http://projects.unbit.it/downloads/uwsgi-{0}.tar.gz

version

Version of uWSGI to download (default is latest).

profile

uWSGI has profiles (build configurations) which can be used to configure which plugins will be built with uWSGI (see https://github.com/unbit/uwsgi/tree/master/buildconf). Default is default.ini.

use-system-binary

It is possible to use an “external” uwsgi binary (installed by the OS’ package manager or compiled manually) and just let the recipe generate the xml configuration file only (no building uWsgi). Default is False.

pythonpath-eggs-directory

By default, the configuration generator will use absolute paths to python eggs, usually inside buildout:eggs-directory by calling zc.recipe.egg.Egg(...).working_set(). To support setups which require using the option relative-paths = true, this option allows to tweak the base directory of generated uwsgi pythonpath configuration directives, e.g.:

pythonpath-eggs-directory = /opt/vendor/product/python/eggs
xml-*

Any option starting with xml- will be stripped of this prefix and written to the xml configuration file; for example, xml-socket=127.0.0.1:7001 will be output as <socket>127.0.0.1:7001</socket>.

For any options that should not take an argument, specify the option with a value of true (case insensitive); for example xml-disable-logging = true will be output as <disable-logging/>.

Authors

Created By

  1. Shaun Sephton

Fork Maintainer

  1. Cosmin Luță lcosmin

Contributors

  1. mooball

  2. thefunny42

  3. rage2000

  4. Andreas Motl

  5. davidjb

  6. apoh

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

buildout.recipe.uwsgi-0.0.19.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

buildout.recipe.uwsgi-0.0.19-py27-none-any.whl (9.6 kB view details)

Uploaded Python 2.7

File details

Details for the file buildout.recipe.uwsgi-0.0.19.tar.gz.

File metadata

File hashes

Hashes for buildout.recipe.uwsgi-0.0.19.tar.gz
Algorithm Hash digest
SHA256 a3ae48736dbb17753a3127abb558e75d638609e38d85be3a2eb917d7a358e570
MD5 416aa50fd27f9688f3ff371089d1403d
BLAKE2b-256 66d695a8da0c56f24514cd437ab672e4fb5c627de784d74c20f7ffa8994c1773

See more details on using hashes here.

File details

Details for the file buildout.recipe.uwsgi-0.0.19-py27-none-any.whl.

File metadata

File hashes

Hashes for buildout.recipe.uwsgi-0.0.19-py27-none-any.whl
Algorithm Hash digest
SHA256 f05e5b6fbbe817423e9b3916f61e2de04a599c4f0bc8d3c762c6f81d0d278bbf
MD5 b19568d633d47e0cfba76ad40f184b9d
BLAKE2b-256 ea2863d30977c3f291f3583092e46cfc380261be936c8f563e31fb30d35c86ae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page