git: 095f22679fbf - main - graphics/py-pandarm: Add py-pandarm 0.0.2

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Tue, 02 Dec 2025 12:18:43 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=095f22679fbfad5016b31058dc00388a99241fe9

commit 095f22679fbfad5016b31058dc00388a99241fe9
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2025-12-01 20:15:55 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2025-12-02 12:04:15 +0000

    graphics/py-pandarm: Add py-pandarm 0.0.2
    
    A pandas-centric interface to highly performant travel network analysis
    leveraging contraction hierarchies provided by code from the Open Source Routing
    Machine (OSRM). Hence, the pandas routing machine, pandarm. This package is a
    friendly fork of the pandana library, originally written by Fletcher Foti and
    UrbanSim Inc. Despite fantastic work by the original authors, maintaining
    open-source software is a great deal of work and the pandana library is no
    longer compatible with the current pydata stack (specifically as of numpy
    version 2.0). This fork reinstates compatibility and brings along a few new
    modern touches and enhancements. Pull requests are very welcome.
    
    Main features of the package include:
    - multi-threaded calculation of shortest path routes and distances
    - network aggregations (i.e. accessibility metrics)
    - network-based isochrones
---
 graphics/Makefile                              |  1 +
 graphics/py-pandarm/Makefile                   | 30 +++++++++++++++++++++
 graphics/py-pandarm/distinfo                   |  3 +++
 graphics/py-pandarm/files/patch-pyproject.toml | 36 ++++++++++++++++++++++++++
 graphics/py-pandarm/pkg-descr                  | 14 ++++++++++
 5 files changed, 84 insertions(+)

diff --git a/graphics/Makefile b/graphics/Makefile
index 9f97fe7467df..971defdb7879 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -980,6 +980,7 @@
     SUBDIR += py-optimize-images
     SUBDIR += py-osmnet
     SUBDIR += py-pandana
+    SUBDIR += py-pandarm
     SUBDIR += py-pdf2image
     SUBDIR += py-photocollage
     SUBDIR += py-piexif
diff --git a/graphics/py-pandarm/Makefile b/graphics/py-pandarm/Makefile
new file mode 100644
index 000000000000..a67fda6649c9
--- /dev/null
+++ b/graphics/py-pandarm/Makefile
@@ -0,0 +1,30 @@
+PORTNAME=	pandarm
+PORTVERSION=	0.0.2
+CATEGORIES=	graphics python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Pandas routing machine
+WWW=		https://github.com/oturns/pandarm
+
+LICENSE=	AGPLv3
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}numpy>=0,1:math/py-numpy@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}setuptools>=40.8:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}setuptools-scm>=6.2:devel/py-setuptools-scm@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}geopandas>=0:graphics/py-geopandas@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}numpy>=0,1:math/py-numpy@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pandas>=2,1:math/py-pandas@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}scikit-learn>=0.18:science/py-scikit-learn@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}tables>=3.1:devel/py-tables@${PY_FLAVOR}
+
+USES=		compiler:c++11-lang python
+USE_PYTHON=	autoplist concurrent cython3 pep517
+
+post-install:
+	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
+
+.include <bsd.port.mk>
diff --git a/graphics/py-pandarm/distinfo b/graphics/py-pandarm/distinfo
new file mode 100644
index 000000000000..c901b3025ffe
--- /dev/null
+++ b/graphics/py-pandarm/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1764510874
+SHA256 (pandarm-0.0.2.tar.gz) = b879b15ea3a4000d27992b9b40eaa30aaebfb6695602959e13b23e84605bd4a0
+SIZE (pandarm-0.0.2.tar.gz) = 5079122
diff --git a/graphics/py-pandarm/files/patch-pyproject.toml b/graphics/py-pandarm/files/patch-pyproject.toml
new file mode 100644
index 000000000000..5a9669386ce9
--- /dev/null
+++ b/graphics/py-pandarm/files/patch-pyproject.toml
@@ -0,0 +1,36 @@
+--- pyproject.toml.orig	2025-11-28 23:32:04 UTC
++++ pyproject.toml
+@@ -1,7 +1,7 @@ build-backend = "setuptools.build_meta"
+ [build-system]
+ # Requirements for building the compiled package
+ build-backend = "setuptools.build_meta"
+-requires = ["wheel", "setuptools >=40.8", "setuptools_scm[toml]>=6.2", "cython >=3", "numpy >=2.0"]
++requires = ["wheel", "setuptools >=40.8", "setuptools_scm[toml]>=6.2", "cython >=3", "numpy"]
+ 
+ [tool.setuptools_scm]
+ 
+@@ -9,7 +9,7 @@ dependencies = [
+ name = "pandarm"
+ dynamic = ["version"]
+ dependencies = [
+-        "numpy >=2",
++        "numpy",
+         "pandas >=2",
+         "geopandas",
+         "scikit-learn >=0.18",
+@@ -19,7 +19,7 @@ classifiers = [
+         "Programming Language :: Python :: 3",
+         "License :: OSI Approved :: GNU Affero General Public License v3"
+ ]
+-license-files = ["LICENSE"]
++license = {file = "LICENSE"}
+ requires-python = ">=3.10"
+ 
+ [tool.setuptools.packages.find]
+@@ -74,4 +74,4 @@ exclude_lines = [
+     "raise NotImplementedError",
+     "except ModuleNotFoundError:",
+     "except ImportError",
+-]
+\ No newline at end of file
++]
diff --git a/graphics/py-pandarm/pkg-descr b/graphics/py-pandarm/pkg-descr
new file mode 100644
index 000000000000..7280c12d35d3
--- /dev/null
+++ b/graphics/py-pandarm/pkg-descr
@@ -0,0 +1,14 @@
+A pandas-centric interface to highly performant travel network analysis
+leveraging contraction hierarchies provided by code from the Open Source Routing
+Machine (OSRM). Hence, the pandas routing machine, pandarm. This package is a
+friendly fork of the pandana library, originally written by Fletcher Foti and
+UrbanSim Inc. Despite fantastic work by the original authors, maintaining
+open-source software is a great deal of work and the pandana library is no
+longer compatible with the current pydata stack (specifically as of numpy
+version 2.0). This fork reinstates compatibility and brings along a few new
+modern touches and enhancements. Pull requests are very welcome.
+
+Main features of the package include:
+- multi-threaded calculation of shortest path routes and distances
+- network aggregations (i.e. accessibility metrics)
+- network-based isochrones