jan: thuban/test postgissupport.py,1.7.2.3,1.7.2.4
cvs@intevation.de
cvs at intevation.de
Tue Jan 25 10:31:20 CET 2005
Author: jan
Update of /thubanrepository/thuban/test
In directory doto:/tmp/cvs-serv1437
Modified Files:
Tag: thuban-1-0-branch
postgissupport.py
Log Message:
Backport from HEAD:
(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.7.2.3
retrieving revision 1.7.2.4
diff -u -d -r1.7.2.3 -r1.7.2.4
--- postgissupport.py 16 Dec 2004 20:34:03 -0000 1.7.2.3
+++ postgissupport.py 25 Jan 2005 09:31:18 -0000 1.7.2.4
@@ -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>
#
@@ -384,8 +384,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
@@ -478,10 +478,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
@@ -490,7 +492,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)