bh: thuban/test postgissupport.py,1.13,1.14

cvs@intevation.de cvs at intevation.de
Fri Jan 21 17:58:33 CET 2005


Author: bh

Update of /thubanrepository/thuban/test
In directory doto:/tmp/cvs-serv24441/test

Modified Files:
	postgissupport.py 
Log Message:
(PostGISDatabase.__init__): Tweak
doc-string
(find_postgis_sql): Update for postgis-1.0.0-rc1, which uses a
different name for the initialization SQL file.


Index: postgissupport.py
===================================================================
RCS file: /thubanrepository/thuban/test/postgissupport.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- postgissupport.py	16 Dec 2004 15:18:57 -0000	1.13
+++ postgissupport.py	21 Jan 2005 16:58:31 -0000	1.14
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2004 by Intevation GmbH
+# Copyright (C) 2003, 2004, 2005 by Intevation GmbH
 # Authors:
 # Bernhard Herzog <bh at intevation.de>
 #
@@ -396,8 +396,8 @@
             server -- The PostgreSQLServer instance containing the
                 database
 
-            postgis_sql -- Filename of the postgis.sql file with the
-                postgis initialization code
+            postgis_sql -- Filename of the sql file with the postgis
+                initialization code
 
             dbname -- The name of the database
 
@@ -508,10 +508,12 @@
     $bindir/../share/postgresql/.
 
     Furthermore, different versions of postgis place the file in
-    slightly different locations.  For instance:
+    slightly different locations or may even use different names.  For
+    instance:
 
       postgis 0.7.5        $datadir/contrib/postgis.sql
       postgis 0.8.1        $datadir/postgis.sql
+      postgis 1.0.0-rc1    $datadir/lwpostgis.sql
 
     To support both versions, we look in both places and return the
     first one found (looking under contrib first).  If the file is not
@@ -520,7 +522,8 @@
     bindir = run_config_script("pg_config --bindir").strip()
     datadir = os.path.join(bindir, "..", "share", "postgresql")
     for filename in [os.path.join(datadir, "contrib", "postgis.sql"),
-                     os.path.join(datadir, "postgis.sql")]:
+                     os.path.join(datadir, "postgis.sql"),
+                     os.path.join(datadir, "lwpostgis.sql")]:
         if os.path.exists(filename):
             return filename
 





More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)