Ejemplo n.º 1
0
 def postgis_version_tuple(self):
     """
     Return the PostGIS version as a tuple (version string, major,
     minor, subminor).
     """
     version = self.postgis_lib_version()
     return (version,) + get_version_tuple(version)
Ejemplo n.º 2
0
 def spatialite_version_tuple(self):
     """
     Return the SpatiaLite version as a tuple (version string, major,
     minor, subminor).
     """
     version = self.spatialite_version()
     return (version, ) + get_version_tuple(version)
Ejemplo n.º 3
0
def geos_version_tuple():
    """Return the GEOS version as a tuple (major, minor, subminor)."""
    return get_version_tuple(geos_version().decode())
Ejemplo n.º 4
0
 def test_get_version_tuple(self):
     self.assertEqual(get_version_tuple('1.2.3'), (1, 2, 3))
     self.assertEqual(get_version_tuple('1.2.3b2'), (1, 2, 3))
     self.assertEqual(get_version_tuple('1.2.3b2.dev0'), (1, 2, 3))
Ejemplo n.º 5
0
def psycopg2_version():
    version = psycopg2.__version__.split(' ', 1)[0]
    return get_version_tuple(version)