File: 0006-Default-to-supporting-Spatialite-4.2.patch

package info (click to toggle)
python-django 1%3A1.11.29-1~deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 47,428 kB
  • sloc: python: 220,776; javascript: 13,523; makefile: 209; xml: 201; sh: 64
file content (28 lines) | stat: -rw-r--r-- 1,317 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: Chris Lamb <lamby@debian.org>
Date: Thu, 4 Oct 2018 09:58:58 +0100
Subject: Default to supporting Spatialite 4.2

See, for example:

  https://www.gaia-gis.it/fossil/libspatialite/wiki?name=mod_spatialite

... and:

  https://docs.djangoproject.com/en/2.1/ref/contrib/gis/install/spatialite/#installing-spatialite
---
 django/contrib/gis/db/backends/spatialite/base.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/django/contrib/gis/db/backends/spatialite/base.py b/django/contrib/gis/db/backends/spatialite/base.py
index 1f03868..6d0d631 100644
--- a/django/contrib/gis/db/backends/spatialite/base.py
+++ b/django/contrib/gis/db/backends/spatialite/base.py
@@ -35,7 +35,7 @@ class DatabaseWrapper(SQLiteDatabaseWrapper):
         # cannot be found by `ctypes.util.find_library`), then it may be set
         # manually in the settings via the `SPATIALITE_LIBRARY_PATH` setting.
         self.spatialite_lib = getattr(settings, 'SPATIALITE_LIBRARY_PATH',
-                                      find_library('spatialite'))
+                                      'mod_spatialite')
         if not self.spatialite_lib:
             raise ImproperlyConfigured('Unable to locate the SpatiaLite library. '
                                        'Make sure it is in your library path, or set '