summaryrefslogtreecommitdiff
path: root/graphics/py-pyogrio
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/py-pyogrio')
-rw-r--r--graphics/py-pyogrio/Makefile36
-rw-r--r--graphics/py-pyogrio/distinfo3
-rw-r--r--graphics/py-pyogrio/files/patch-pyproject.toml11
-rw-r--r--graphics/py-pyogrio/pkg-descr18
4 files changed, 68 insertions, 0 deletions
diff --git a/graphics/py-pyogrio/Makefile b/graphics/py-pyogrio/Makefile
new file mode 100644
index 000000000000..47cb754a836f
--- /dev/null
+++ b/graphics/py-pyogrio/Makefile
@@ -0,0 +1,36 @@
+PORTNAME= pyogrio
+PORTVERSION= 0.12.1
+CATEGORIES= graphics python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Vectorized spatial vector file format I/O using GDAL/OGR
+WWW= https://pyogrio.readthedocs.io/en/latest/ \
+ https://github.com/geopandas/pyogrio
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
+ ${PY_TOMLI} \
+ ${PYTHON_PKGNAMEPREFIX}versioneer>=0.28:devel/py-versioneer@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+LIB_DEPENDS= libgdal.so:graphics/gdal
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}certifi>=0:security/py-certifi@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}numpy>=0,1:math/py-numpy@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}packaging>=0:devel/py-packaging@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist concurrent cython3 pep517
+
+OPTIONS_DEFINE= GEOPANDAS
+OPTIONS_DEFAULT=GEOPANDAS
+GEOPANDAS_DESC= GeoPandas support
+
+GEOPANDAS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}geopandas>=0:graphics/py-geopandas@${PY_FLAVOR}
+
+post-install:
+ ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
+
+.include <bsd.port.mk>
diff --git a/graphics/py-pyogrio/distinfo b/graphics/py-pyogrio/distinfo
new file mode 100644
index 000000000000..338e5c2ee295
--- /dev/null
+++ b/graphics/py-pyogrio/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1765032630
+SHA256 (pyogrio-0.12.1.tar.gz) = e548ab705bb3e5383693717de1e6c76da97f3762ab92522cb310f93128a75ff1
+SIZE (pyogrio-0.12.1.tar.gz) = 303289
diff --git a/graphics/py-pyogrio/files/patch-pyproject.toml b/graphics/py-pyogrio/files/patch-pyproject.toml
new file mode 100644
index 000000000000..520da6d2e1b9
--- /dev/null
+++ b/graphics/py-pyogrio/files/patch-pyproject.toml
@@ -0,0 +1,11 @@
+--- pyproject.toml.orig 2025-11-28 18:23:16 UTC
++++ pyproject.toml
+@@ -2,7 +2,7 @@ requires = [
+ requires = [
+ "setuptools",
+ "Cython>=3.1",
+- "versioneer[toml]==0.28",
++ "versioneer[toml]>=0.28",
+ # tomli is used by versioneer
+ "tomli; python_version < '3.11'",
+ ]
diff --git a/graphics/py-pyogrio/pkg-descr b/graphics/py-pyogrio/pkg-descr
new file mode 100644
index 000000000000..18433683b332
--- /dev/null
+++ b/graphics/py-pyogrio/pkg-descr
@@ -0,0 +1,18 @@
+Pyogrio provides fast, bulk-oriented read and write access to GDAL/OGR vector
+data sources, such as ESRI Shapefile, GeoPackage, GeoJSON, and several others.
+Vector data sources typically have geometries, such as points, lines, or
+polygons, and associated records with potentially many columns worth of data.
+
+The typical use is to read or write these data sources to/from GeoPandas
+GeoDataFrames. Because the geometry column is optional, reading or writing only
+non-spatial data is also possible. Hence, GeoPackage attribute tables, DBF
+files, or CSV files are also supported.
+
+Pyogrio is fast because it uses pre-compiled bindings for GDAL/OGR to read and
+write the data records in bulk. This approach avoids multiple steps of
+converting to and from Python data types within Python, so performance becomes
+primarily limited by the underlying I/O speed of data source drivers in
+GDAL/OGR.
+
+We have seen >5-10x speedups reading files and >5-20x speedups writing files
+compared to using row-per-row approaches (e.g. Fiona).