python.pkgs.django: fix gdal support on darwin

This commit is contained in:
Frederik Rietdijk 2017-10-09 18:14:15 +02:00
parent df41edfe1c
commit 549188c293
2 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,7 @@ diff --git a/django/contrib/gis/gdal/libgdal.py b/django/contrib/gis/gdal/libgda
except (AttributeError, EnvironmentError, except (AttributeError, EnvironmentError,
ImportError, ImproperlyConfigured): ImportError, ImproperlyConfigured):
- lib_path = None - lib_path = None
+ lib_path = "@gdal@/lib/libgdal.so" + lib_path = "@gdal@/lib/libgdal@extension@"
if lib_path: if lib_path:
lib_names = None lib_names = None
@ -18,7 +18,7 @@ diff --git a/django/contrib/gis/geos/libgeos.py b/django/contrib/gis/geos/libgeo
except (AttributeError, EnvironmentError, except (AttributeError, EnvironmentError,
ImportError, ImproperlyConfigured): ImportError, ImproperlyConfigured):
- lib_path = None - lib_path = None
+ lib_path = "@geos@/lib/libgeos_c.so" + lib_path = "@geos@/lib/libgeos_c@extension@"
# Setting the appropriate names for the GEOS-C library. # Setting the appropriate names for the GEOS-C library.
if lib_path: if lib_path:

View File

@ -2,6 +2,7 @@
pythonOlder, pythonOlder,
geos, gdal, pytz geos, gdal, pytz
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "Django"; pname = "Django";
name = "${pname}-${version}"; name = "${pname}-${version}";
@ -19,6 +20,7 @@ buildPythonPackage rec {
src = ./1.10-gis-libs.template.patch; src = ./1.10-gis-libs.template.patch;
geos = geos; geos = geos;
gdal = gdal; gdal = gdal;
extension = stdenv.hostPlatform.extensions.sharedLibrary;
}) })
]; ];