Permalink
Browse files

Attempt to find PIL with external python first before building our own.

  • Loading branch information...
1 parent 353b00b commit 3327798fcd7c5e2c500cd57e97014de0cd757b42 Andres Mejia committed Jul 24, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/addons/script.module.pil/Makefile.in
@@ -17,12 +17,15 @@ else
PYTHON=@PYTHON@
endif
+NO_SYSTEM_PIL=$(shell $(PYTHON) -m Image >/dev/null 2>&1 || echo "1")
+
DESTDIR=@abs_top_srcdir@/addons/script.module.pil/lib/PIL
CLEAN_FILES=$(ARCHIVE) $(SOURCE) $(DESTDIR)
all: $(DESTDIR)
+ifeq (1,$(NO_SYSTEM_PIL))
$(ARCHIVE):
$(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
@@ -33,6 +36,10 @@ $(SOURCE): $(ARCHIVE)
$(DESTDIR): $(SOURCE)
-rm -rf $(DESTDIR)
pushd $(SOURCE) && $(PYTHON) setup.py build --build-lib $(DESTDIR); popd
+else
+$(DESTDIR):
+ @true
+endif
include ../../../Makefile.include

0 comments on commit 3327798

Please sign in to comment.