--- /dev/null
+#!/usr/bin/bash
+
+#
+# This script ensures that a Python virtualenv is installed and available for
+# a specific part of the build, including dependencies.
+#
+
+# Create the virtualenv
+virtualenv venv
+. venv/bin/activate
+
+# Define and ensure the PIP cache
+PIP_SDIST_INDEX="$HOME/.cache/pip"
+mkdir -p $PIP_SDIST_INDEX
+
+# Install the package by trying with the cache first, otherwise doing a download only, and then
+# trying to install from the cache again.
+if ! venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index amauta; then
+ venv/bin/pip install --download-directory="$PIP_SDIST_INDEX" amauta
+ venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index amauta
+fi
+
--- /dev/null
+- job:
+ name: python-bindings
+ node: gitbuilder-cdep-deb-cloud-precise-amd64-basic
+ project-type: freestyle
+ defaults: global
+ disabled: false
+ display-name: 'Ceph Python Bindings'
+ concurrent: true
+ quiet-period: 5
+ block-downstream: false
+ block-upstream: false
+ retry-count: 3
+
+ triggers:
+ - pollscm: "H * * * *"
+
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph.git
+ branches:
+ - master
+ - firefly
+ - giant
+ - next
+ browser: githubweb
+ browser-url: http://github.com/ceph/ceph.git
+ timeout: 20
+
+ builders:
+ - shell:
+ !include-raw ensure_python_dependencies.sh
+ - shell: "venv/bin/amauta python-bindings"