Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython

bowerrecipe is unavailable in PyPM, because there aren't any builds for it in the package repositories. Click the linked icons to find out why.

 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
Linux (64-bit)
 
Links
License
MIT
Dependencies

Introduction

This recipe allows downloading and installing assets such as images, CSS and JavaScript using Twitter Bower.

Supported options

The recipe supports the following options:

packages

Packages that should be installed with bower. Packages specified here are passed to bower verbatim. They can be specified in any form that is supported by bower:

packages =
    underscore
    git://github.com/components/jquery.git
    bootstrap#2.2.2
base-directory
Absolute path to the bower "project" directory. bower install is run from this directory and the bower configuration file, .bowerrc is placed in this directory. Optional; defaults to ${buildout:parts-directory}/bower. Requires an absolute path.
executable
Absolute path to the bower executable. Packages are installed using this executable. Optional; defaults to bower on PATH.
downloads
Relative path, from the base-directory, to the directory where bower will download packages to. This path is written to the .bowerrc file prior to running the executable. Optional; defaults to downloads. Thus, the downloaded packages are placed in ${base-directory}/downloads by default.

Example usage

A sample buildout that uses this recipe could look like:

[buildout]
parts = node web

[node]
recipe = gp.recipe.node
url = http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz
npms = bower@0.6.8
scripts = bower

[web]
recipe = bowerrecipe
packages = jquery#1.8.3 normalize-css
executable = ${buildout:bin-directory}/bower

This would place the downloaded packages in parts/bower/downloads. Modifying the web section to be:

[web]
recipe = bowerrecipe
packages = jquery#1.8.3 normalize-css
executable = ${buildout:bin-directory}/bower
base-directory = ${buildout:parts-directory}
downloads = components

would result in bower placing the downloaded packages in parts/components.

Notes

  1. Bower still looks at the ~/.bowerrc file. Hence, if this file exists, it may affect the buildout bower configuration
  2. Bower still uses the cache located in the user's home directory. For me, this happens to be ~/.bower/cache/

Contributors

Anshuman Bhaduri

Changelog

0.1.1
  • Fixed documentation so it displays correctly on PyPI [Anshuman Bhaduri]
0.1
  • Created initial recipe [Anshuman Bhaduri]

Subscribe to package updates

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.