From 111bfbbc86048ab924a757062ef5cce03d3f2ab1 Mon Sep 17 00:00:00 2001 From: Baptiste Lagarde Date: Wed, 5 Feb 2014 01:27:54 +1100 Subject: [PATCH 1/2] ADD: django recipe --- recipes/django/recipe.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 recipes/django/recipe.sh diff --git a/recipes/django/recipe.sh b/recipes/django/recipe.sh new file mode 100644 index 0000000000..99fb45f7ea --- /dev/null +++ b/recipes/django/recipe.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +VERSION_django=${VERSION_django:-1.6.1} +DEPS_django=(sqlite3) +URL_django=https://pypi.python.org/packages/source/D/Django/Django-$VERSION_django.tar.gz +MD5_django=3ea7a00ea9e7a014e8a4067dd6466a1b +BUILD_django=$BUILD_PATH/django/$(get_directory $URL_django) +RECIPE_django=$RECIPES_PATH/django + +function prebuild_django() { + true +} + +function build_django() { + cd $BUILD_django + push_arm + try $HOSTPYTHON setup.py install + pop_arm +} + +function postbuild_django() { + # ensure the blacklist doesn't contain wsgiref or unittest + $SED '/unittest/d' $BUILD_PATH/blacklist.txt + $SED '/wsgiref/d' $BUILD_PATH/blacklist.txt +} From 99c7a3e617643567b178229256e3bebb9b570ac8 Mon Sep 17 00:00:00 2001 From: Baptiste Lagarde Date: Wed, 5 Feb 2014 18:32:28 +1100 Subject: [PATCH 2/2] FIX: Don't rebuild django if it is already there --- recipes/django/recipe.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes/django/recipe.sh b/recipes/django/recipe.sh index 99fb45f7ea..fe8a257363 100644 --- a/recipes/django/recipe.sh +++ b/recipes/django/recipe.sh @@ -11,6 +11,12 @@ function prebuild_django() { true } +function shouldbuild_django() { + if [ -d "$SITEPACKAGES_PATH/django" ]; then + DO_BUILD=0 + fi +} + function build_django() { cd $BUILD_django push_arm