diff --git a/CHANGES.md b/CHANGES.md index edb1efe0..5bd821f0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -24,6 +24,7 @@ - The GDAL library included in the wheels is upgraded from 3.10.3 to 3.11.4 (#578). - Add libkml driver to the wheels for more recent Linux platforms supported by manylinux_2_28, MacOS, and Windows (#561). +- Add libspatialite to the wheels (#546). - Minimum required Python version is now 3.10 (#557). - Wheels are now available for Python 3.14 (#579). diff --git a/ci/vcpkg-manylinux2014.json b/ci/vcpkg-manylinux2014.json index c8b96c2e..a19b1381 100644 --- a/ci/vcpkg-manylinux2014.json +++ b/ci/vcpkg-manylinux2014.json @@ -2,10 +2,17 @@ "name": "pyogrio", "version": "0.12.0", "dependencies": [ + { + "name": "libspatialite", + "default-features": false, + "features": [ + "rttopo" + ] + }, { "name": "gdal", "default-features": false, - "features": ["recommended-features", "curl", "geos", "iconv", "openssl"] + "features": ["recommended-features", "curl", "geos", "iconv", "libspatialite", "openssl"] } ], "builtin-baseline": "da096fdc67db437bee863ae73c4c12e289f82789" diff --git a/ci/vcpkg.json b/ci/vcpkg.json index 41f5259d..7796dbb0 100644 --- a/ci/vcpkg.json +++ b/ci/vcpkg.json @@ -2,11 +2,18 @@ "name": "pyogrio", "version": "0.12.0", "dependencies": [ + { + "name": "libspatialite", + "default-features": false, + "features": [ + "rttopo" + ] + }, { "name": "gdal", "default-features": false, "features": [ - "recommended-features", "curl", "geos", "iconv", "libkml", "openssl" + "recommended-features", "curl", "geos", "iconv", "libkml", "libspatialite", "openssl" ] } ], diff --git a/pyogrio/tests/test_geopandas_io.py b/pyogrio/tests/test_geopandas_io.py index e4cad146..d2d4f31d 100644 --- a/pyogrio/tests/test_geopandas_io.py +++ b/pyogrio/tests/test_geopandas_io.py @@ -104,14 +104,11 @@ def use_arrow_context(): del os.environ["PYOGRIO_USE_ARROW"] -def spatialite_available(path): - try: - _ = read_dataframe( - path, sql="select spatialite_version();", sql_dialect="SQLITE" - ) - return True - except Exception: - return False +def test_spatialite_available(test_gpkg_nulls): + """Check if SpatiaLite is available by running a simple SQL query.""" + _ = read_dataframe( + test_gpkg_nulls, sql="select spatialite_version();", sql_dialect="SQLITE" + ) @pytest.mark.parametrize(