git: 8a8942be51f0 - main - science/py-pymatgen: update 2022.7.19 → 2024.11.13

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Fri, 15 Nov 2024 09:20:32 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8a8942be51f0bae0f8923377b06da9cfc9dc9860

commit 8a8942be51f0bae0f8923377b06da9cfc9dc9860
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-11-14 14:58:13 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-11-15 09:20:24 +0000

    science/py-pymatgen: update 2022.7.19 → 2024.11.13
---
 science/py-pymatgen/Makefile                   | 69 +++++++++++++++-----------
 science/py-pymatgen/distinfo                   |  6 +--
 science/py-pymatgen/files/patch-pyproject.toml | 13 +++++
 3 files changed, 55 insertions(+), 33 deletions(-)

diff --git a/science/py-pymatgen/Makefile b/science/py-pymatgen/Makefile
index cd4f348020dc..6060a6f4b40d 100644
--- a/science/py-pymatgen/Makefile
+++ b/science/py-pymatgen/Makefile
@@ -1,49 +1,58 @@
 PORTNAME=	pymatgen
-DISTVERSION=	2022.7.19
-PORTREVISION=	1
+DISTVERSIONPREFIX=	v
+DISTVERSION=	2024.11.13
 CATEGORIES=	science python
-MASTER_SITES=	PYPI
+#MASTER_SITES=	PYPI # no tests
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	yuri@FreeBSD.org
 COMMENT=	Python Materials Genomics is a robust materials analysis code
-WWW=		https://pymatgen.org/
+WWW=		https://pymatgen.org/ \
+		https://github.com/materialsproject/pymatgen
 
 LICENSE=	MIT
-LICENSE_FILE=	${WRKSRC}/LICENSE.rst
-
-BUILD_DEPENDS=	${PYNUMPY}
-RUN_DEPENDS=	${PYNUMPY} \
-		${PYTHON_PKGNAMEPREFIX}beautifulsoup>0:www/py-beautifulsoup@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}matplotlib>0:math/py-matplotlib@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}monty>0:devel/py-monty@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}networkx>0:math/py-networkx@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}palettable>=3.3.0:misc/py-palettable@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}pandas>0:math/py-pandas@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}plotly>0:graphics/py-plotly@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}ruamel.yaml>0:devel/py-ruamel.yaml@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}scipy>=1.7.3:science/py-scipy@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}spglib>0:science/py-spglib@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}sympy>0:math/py-sympy@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}tabulate>0:devel/py-tabulate@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}tqdm>0:misc/py-tqdm@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}typing-extensions>0:devel/py-typing-extensions@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}uncertainties>=3.1.6:math/py-uncertainties@${PY_FLAVOR}
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYNUMPY} \
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}beautifulsoup>0:www/py-beautifulsoup@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}joblib>=1:devel/py-joblib@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}matplotlib>=3.8:math/py-matplotlib@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}monty>=2024.10.21:devel/py-monty@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}networkx>=2.7:math/py-networkx@${PY_FLAVOR} \
+		${PYNUMPY} \
+		${PYTHON_PKGNAMEPREFIX}palettable>=3.3.3:misc/py-palettable@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pandas>=2:math/py-pandas@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}plotly>=4.5.0:graphics/py-plotly@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pybtex>=0.24.0:textproc/py-pybtex@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}requests>=2.32:www/py-requests@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}ruamel.yaml>=0.17.0:devel/py-ruamel.yaml@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}scipy>=1.13.0:science/py-scipy@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}scipy>=1.14.1:science/py-scipy@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}spglib>=2.5.0:science/py-spglib@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}sympy>=1.3:math/py-sympy@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}tabulate>=0.9:devel/py-tabulate@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}tqdm>=4.60:misc/py-tqdm@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}uncertainties>=3.1.4:math/py-uncertainties@${PY_FLAVOR}
 TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pybtex>0:textproc/py-pybtex@${PY_FLAVOR}
 
 USES=		compiler:c++11-lang python
-USE_PYTHON=	distutils cython concurrent autoplist pytest
+USE_PYTHON=	pep517 cython concurrent autoplist pytest
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	materialsproject
+
+TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+TEST_WRKSRC=	${WRKSRC}/tests
 
-post-install:
+post-install: # strip binaries
 	@cd ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME} && ${STRIP_CMD} \
 		optimization/linear_assignment*.so \
 		optimization/neighbors*.so \
 		util/coord_cython*.so
 
-# tests fail: https://github.com/materialsproject/pymatgen/issues/2275, https://github.com/materialsproject/pymatgen/issues/2592
-pre-test:
-	@cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} build_ext --inplace
+# tests fail to find some files: https://github.com/materialsproject/pymatgen/issues/4172
+xpre-test:
+	@cd ${TEST_WRKSRC} && ${PYTHON_CMD} ${PYSETUP} build_ext --inplace
 
 .include <bsd.port.mk>
diff --git a/science/py-pymatgen/distinfo b/science/py-pymatgen/distinfo
index 36bf2e7b4e7e..ae9b145d0114 100644
--- a/science/py-pymatgen/distinfo
+++ b/science/py-pymatgen/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1659081267
-SHA256 (pymatgen-2022.7.19.tar.gz) = 4557fb7ee0f25753d97fa0cd8bcfb9d36ea7d422ee12b416cae05c7fb50531d7
-SIZE (pymatgen-2022.7.19.tar.gz) = 2610811
+TIMESTAMP = 1731622067
+SHA256 (materialsproject-pymatgen-v2024.11.13_GH0.tar.gz) = b780cc395007f5793d1823d4b0b83ed99cfec10d4834bb8e640e92c65627dbe5
+SIZE (materialsproject-pymatgen-v2024.11.13_GH0.tar.gz) = 262224927
diff --git a/science/py-pymatgen/files/patch-pyproject.toml b/science/py-pymatgen/files/patch-pyproject.toml
new file mode 100644
index 000000000000..dc9a546031bc
--- /dev/null
+++ b/science/py-pymatgen/files/patch-pyproject.toml
@@ -0,0 +1,13 @@
+--- pyproject.toml.orig	2024-11-14 18:47:14 UTC
++++ pyproject.toml
+@@ -3,8 +3,8 @@ requires = [
+     "Cython>=0.29.23",
+     # Building against NPY2 will support both NPY1 and NPY2
+     # https://numpy.org/devdocs/dev/depending_on_numpy.html#build-time-dependency
+-    "numpy>=2.1.0",
+-    "setuptools>=65.0.0",
++    "numpy",
++    "setuptools",
+ ]
+ build-backend = "setuptools.build_meta"
+