Skip to content

Commit

Permalink
python.pkgs.django: fix gdal support on darwin
Browse files Browse the repository at this point in the history
(cherry picked from commit 549188c)
  • Loading branch information
FRidh committed Oct 9, 2017
1 parent afb83c9 commit 8c00f93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -6,7 +6,7 @@ diff --git a/django/contrib/gis/gdal/libgdal.py b/django/contrib/gis/gdal/libgda
except (AttributeError, EnvironmentError,
ImportError, ImproperlyConfigured):
- lib_path = None
+ lib_path = "@gdal@/lib/libgdal.so"
+ lib_path = "@gdal@/lib/libgdal@extension@"

if lib_path:
lib_names = None
Expand All @@ -18,7 +18,7 @@ diff --git a/django/contrib/gis/geos/libgeos.py b/django/contrib/gis/geos/libgeo
except (AttributeError, EnvironmentError,
ImportError, ImproperlyConfigured):
- 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.
if lib_path:
2 changes: 2 additions & 0 deletions pkgs/development/python-modules/django/1_11.nix
Expand Up @@ -2,6 +2,7 @@
pythonOlder,
geos, gdal, pytz
}:

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

Expand Down

0 comments on commit 8c00f93

Please sign in to comment.