--- Django-2.0.orig/django/contrib/gis/gdal/libgdal.py	2017-12-02 12:36:16.000000000 -0200
+++ Django-2.0/django/contrib/gis/gdal/libgdal.py	2017-12-06 08:14:42.730016198 -0200
@@ -1,5 +1,6 @@
 import logging
 import os
+import sys
 import re
 from ctypes import CDLL, CFUNCTYPE, c_char_p, c_int
 from ctypes.util import find_library
@@ -10,12 +11,12 @@
 logger = logging.getLogger('django.contrib.gis')
 
 # Custom library path set?
-try:
-    from django.conf import settings
-    lib_path = settings.GDAL_LIBRARY_PATH
-except (AttributeError, EnvironmentError,
-        ImportError, ImproperlyConfigured):
-    lib_path = None
+if 'linux' in sys.platform:
+    lib_path = os.path.join(sys.prefix, 'lib', 'libgdal.so')
+elif 'darwin' in sys.platform:
+    lib_path = os.path.join(sys.prefix, 'lib', 'libgdal.dylib')
+elif os.name == 'nt':
+    lib_path = os.path.join(sys.prefix, 'Library', 'bin', 'gdal201.dll')
 
 if lib_path:
     lib_names = None
