This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Overview

buildout_script is a zc.buildout recipe for generating scripts from a template. Unlike scripts specified by the console_scripts entry point, those generated by buildout_script are not restricted to Python code.

Scripts are generated from templates and can include settings from the buildout substituted at runtime.

One example usage is the generation of a wrapper script for Paste Script to check the status of a daemonized server process (see paster-check below).

Usage

To use the buildout_script recipe, specify it as the recipe for a zc.buildout part along with the template part. For example:

[sample_part]
recipe = buildout_script
template = paster-check.sh.in

The script will be created in the bin-directory. You may also specify the following parameters:

target
The filename for the generated script; if omitted, the script will have the template filename without the extension.
template_dir
An optional directory to look for templates in. Default: templates Templates included with the recipe may also be used without specifying a template_dir.

Templates

Template variables should be formatted using the buildout convention of ${part-name:variable-name}.

NB. Until version 0.2a1 of buildout_script the python string formatting syntax was used where the dictionary for the formatting operation was a flattened dictionary of the buildout settings and part settings.

For example, a trivial script template to list the files in the buildout installation directory would look like this:

#!/bin/bash

# Sample buildout_script script template
ls ${buildout:directory}

buildout_script ships with one script template, paster-check.sh.in, described below. Additional template contributions are welcome.

paster-check.sh.in

At Creative Commons we used Paste Script as the server for simple web applications. We run them using the --daemon flag, but occassionally something goes awry and the process dies. This template generates a script which can be called periodically from cron to ensure the process is still running. Note that this script can also be used to start the server if it is not already running.

Configuration Parameters

Configuration parameters used by this script, which should be specified as settings in the zc.buildout part:

server_cfg
The Paste Deploy configuration file to serve.
pid_file
The PID file to use when starting the server (and to subsequently check).
log_file
The log file to use.

Change History

0.3 (2015-10-12)

  • PyPI release of changes contributed by jjmurre

0.2a3 (2015-10-08)

  • Templating syntax now cf. buildout, e.g. ${buildout:directory} NB. backwards incompatible!

0.2a2 (2015-10-07)

  • Fixes to make recipe work with modern pythons (>=2.7)

0.2a1 (2007-03-14)

  • Implemented template recipe for creating a non-executable file.

0.1 (2006-12-12)

  • Initial public release

Download

Release History

Release History

0.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2a1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
buildout_script-0.3.tar.gz (5.2 kB) Copy SHA256 Checksum SHA256 Source Oct 13, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting