From 15172c86b9225ddd4fd07568c386b8cf8e816f44 Mon Sep 17 00:00:00 2001
From: Kenneth Reitz <me@kennethreitz.com>
Date: Fri, 23 Mar 2012 23:42:38 -0400
Subject: [PATCH] move django pre-exit to steps/django

---
 bin/compile      |  3 ---
 bin/steps/django | 10 ++++++++++
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/bin/compile b/bin/compile
index de6350e7..4288cceb 100755
--- a/bin/compile
+++ b/bin/compile
@@ -96,9 +96,6 @@ if [ ! -f requirements.txt ]; then
   echo "-e ." > requirements.txt
 fi
 
-# Reject a Django app that appears to be packaged incorrectly.
-grep -Fiq "django" requirements.txt) && [ -f settings.py ] && { puts-warn "Django app must be in a package subdirectory"; exit 1; }
-
 # ### The Cache
 mkdir -p $CACHE_DIR
 
diff --git a/bin/steps/django b/bin/steps/django
index b7a54a98..c00ba58e 100755
--- a/bin/steps/django
+++ b/bin/steps/django
@@ -9,8 +9,18 @@
 #
 # This script is invoked by [`bin/compile`](/).
 
+# ## Sanity Checks
+#
+
+# Reject a Django app that appears to be packaged incorrectly.
+if [ -f settings.py ]; then
+  echo " !     Django app must be in a package subdirectory"
+  exit 1
+fi
+
 echo "-----> Injecting Django settings..."
 
+
 SETTINGS_FILE=$(find . -maxdepth 2 -type f -name 'settings.py' | head -1)
 PROJECT=$(dirname $SETTINGS_FILE)
 
-- 
GitLab