Merge pull request #179985 from wildsebastian/fix/django_3_gdal

django: fix build with gdal and use correct geos version
This commit is contained in:
Sandro 2022-07-14 12:08:22 +02:00 committed by GitHub
commit 3d74eddea4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -3,7 +3,7 @@
, buildPythonPackage
, fetchPypi
, substituteAll
, geos
, geos39
, gdal
, asgiref
, pytz
@ -27,7 +27,7 @@ buildPythonPackage rec {
patches = lib.optional withGdal
(substituteAll {
src = ./django_3_set_geos_gdal_lib.patch;
inherit geos;
inherit geos39;
inherit gdal;
extension = stdenv.hostPlatform.extensions.sharedLibrary;
});

View file

@ -18,7 +18,7 @@ diff -Nur a/django/contrib/gis/geos/libgeos.py b/django/contrib/gis/geos/libgeos
lib_path = settings.GEOS_LIBRARY_PATH
except (AttributeError, ImportError, ImproperlyConfigured, OSError):
- lib_path = None
+ lib_path = "@geos@/lib/libgeos_c@extension@"
+ lib_path = "@geos39@/lib/libgeos_c@extension@"
# Setting the appropriate names for the GEOS-C library.
if lib_path: