# Fix installing python bindings
# By Ward Poelmans <ward.poelmans@ugent.be>
diff -ur gdal-1.10.1.orig/swig/python/GNUmakefile gdal-1.10.1/swig/python/GNUmakefile
--- gdal-1.10.1.orig/swig/python/GNUmakefile	2013-08-26 22:01:11.000000000 +0200
+++ gdal-1.10.1/swig/python/GNUmakefile	2016-01-07 17:58:10.743255676 +0100
@@ -66,13 +66,8 @@
 	$(PYTHON) setup.py bdist_egg 
 	
 install:
-
-ifeq ($(PY_HAVE_SETUPTOOLS),1)
-	$(PYTHON) setup.py install 
-else
-	$(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix)
-endif
-
+	mkdir -p $(DESTDIR)$(prefix)/lib/python2.7/site-packages
+	PYTHONPATH=$(DESTDIR)$(prefix)/lib/python2.7/site-packages:$(PYTHONPATH) $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix)
 	for f in $(SCRIPTS) ; do $(INSTALL) ./scripts/$$f $(DESTDIR)$(INST_BIN) ; done
 
 docs:
