Skip to content

Commit

Permalink
python.pkgs.django: fix gdal support on darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
FRidh committed Oct 9, 2017
1 parent df41edf commit 549188c
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

3 comments on commit 549188c

@copumpkin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@knedlsepp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious: This wasn't necessary: #27649 ?

@FRidh
Copy link
Member Author

@FRidh FRidh commented on 549188c Oct 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@knedlsepp no idea, I didn't test it. See #27685.

Please sign in to comment.