Date: Mon, 20 Apr 2026 08:00:33 +0000 From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: cd57a609f25d - main - science/py-pymatgen-core: New port: Python Materials Genomics core data structures and algorithms Message-ID: <69e5dd21.19aee.5c5fd7fe@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=cd57a609f25da93cc030457a2f8623aeba46bee8 commit cd57a609f25da93cc030457a2f8623aeba46bee8 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2026-04-20 07:59:41 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2026-04-20 07:59:41 +0000 science/py-pymatgen-core: New port: Python Materials Genomics core data structures and algorithms --- science/Makefile | 1 + science/py-pymatgen-core/Makefile | 61 ++++++++++++++++++++++ science/py-pymatgen-core/distinfo | 3 ++ .../py-pymatgen-core/files/patch-pyproject.toml | 32 ++++++++++++ .../files/patch-src_pymatgen_core_structure.py | 11 ++++ science/py-pymatgen-core/pkg-descr | 12 +++++ 6 files changed, 120 insertions(+) diff --git a/science/Makefile b/science/Makefile index 9f9003d9c5a9..98911db6b1b1 100644 --- a/science/Makefile +++ b/science/Makefile @@ -409,6 +409,7 @@ SUBDIR += py-pygmo2 SUBDIR += py-pyked SUBDIR += py-pymatgen + SUBDIR += py-pymatgen-core SUBDIR += py-pymatgen-analysis-alloys SUBDIR += py-pymbd SUBDIR += py-pymol diff --git a/science/py-pymatgen-core/Makefile b/science/py-pymatgen-core/Makefile new file mode 100644 index 000000000000..f8c6cc4d6a55 --- /dev/null +++ b/science/py-pymatgen-core/Makefile @@ -0,0 +1,61 @@ +PORTNAME= pymatgen-core +DISTVERSIONPREFIX= v +DISTVERSION= 2026.4.16 +CATEGORIES= science python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Python Materials Genomics core data structures and algorithms +WWW= https://pymatgen.org/ \ + https://github.com/materialsproject/pymatgen-core + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PY_SETUPTOOLS} \ + ${PYTHON_PKGNAMEPREFIX}numpy1>0:math/py-numpy1@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bibtexparser>=1.4.3:textproc/py-bibtexparser@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}contourpy>=1.3.1:math/py-contourpy@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}cycler>=0.12.1:devel/py-cycler@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}fonttools>=4.61.0:print/py-fonttools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}joblib>=1.3.2:devel/py-joblib@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}kiwisolver>=1.4.7:math/py-kiwisolver@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}lxml>=4.9:devel/py-lxml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}matplotlib>=3.8:math/py-matplotlib@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}monty>=2026.2.18:devel/py-monty@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}mpmath>=1.3.0:math/py-mpmath@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}networkx>=2.7:math/py-networkx@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}numpy1>0:math/py-numpy1@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}orjson>=3.10.18:devel/py-orjson@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}packaging>=24.2:devel/py-packaging@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}palettable>=3.3.3:misc/py-palettable@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pandas>=2.2.3:math/py-pandas@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pillow>=9.0.0:graphics/py-pillow@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}plotly>=5:graphics/py-plotly@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyparsing>=3.2.0:devel/py-pyparsing@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}python-dateutil>=2.9.0:devel/py-python-dateutil@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytz>=2024.2:devel/py-pytz@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}requests>=2.32.5:www/py-requests@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}scipy>=1.14.1:science/py-scipy@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}six>=1.16.0:devel/py-six@${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.0:devel/py-tabulate@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}tqdm>=4.67.1:misc/py-tqdm@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}uncertainties>=3.1:math/py-uncertainties@${PY_FLAVOR} + +USES= compiler:c++11-lang python +USE_PYTHON= pep517 cython concurrent autoplist pytest + +USE_GITHUB= yes +GH_ACCOUNT= materialsproject +GH_PROJECT= pymatgen-core + +TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} \ + PMG_TEST_FILES_DIR=${WRKSRC}/test-files \ + MPLBACKEND=Agg + +# tests as of 2026.4.16: 2557 passed, 116 skipped, 5 xfailed, 1 xpassed, 53 warnings in 330.65s (0:05:30) + +.include <bsd.port.mk> diff --git a/science/py-pymatgen-core/distinfo b/science/py-pymatgen-core/distinfo new file mode 100644 index 000000000000..d60548e4cdf2 --- /dev/null +++ b/science/py-pymatgen-core/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1776629591 +SHA256 (materialsproject-pymatgen-core-v2026.4.16_GH0.tar.gz) = 25cf7dc091c68207c052365bd4218da6bd77ffb6b9b2c5e2539ceceb2b68fb21 +SIZE (materialsproject-pymatgen-core-v2026.4.16_GH0.tar.gz) = 232470453 diff --git a/science/py-pymatgen-core/files/patch-pyproject.toml b/science/py-pymatgen-core/files/patch-pyproject.toml new file mode 100644 index 000000000000..a9b320cf89f1 --- /dev/null +++ b/science/py-pymatgen-core/files/patch-pyproject.toml @@ -0,0 +1,32 @@ +--- pyproject.toml.orig 2026-04-16 01:03:44 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" + +@@ -72,7 +72,7 @@ dependencies = [ + "spglib>=2.5", + "sympy>=1.3", # PR #4116 + "uncertainties>=3.1", +- "plotly>=6.0", ++ "plotly", + "joblib>=1.3.2", + "lxml>=4.9", + "bibtexparser", +@@ -118,9 +118,6 @@ zeopp = ["pyzeo; platform_system != 'Windows'"] # Not + # https://github.com/tblite/tblite/issues/175 + tblite = ["tblite[ase]>=0.3.0; platform_system=='Linux' and python_version<'3.12'"] + zeopp = ["pyzeo; platform_system != 'Windows'"] # Note: requires Voro++ and Zeo++ to be installed +- +-[project.scripts] +-pmg = "pymatgen.cli.pmg:main" + + [tool.setuptools] + include-package-data = false diff --git a/science/py-pymatgen-core/files/patch-src_pymatgen_core_structure.py b/science/py-pymatgen-core/files/patch-src_pymatgen_core_structure.py new file mode 100644 index 000000000000..949ef97a271e --- /dev/null +++ b/science/py-pymatgen-core/files/patch-src_pymatgen_core_structure.py @@ -0,0 +1,11 @@ +--- src/pymatgen/core/structure.py.orig 2026-04-20 04:32:30 UTC ++++ src/pymatgen/core/structure.py +@@ -1172,7 +1172,7 @@ class IStructure(SiteCollection, MSONable): + ) + new_sites.append(periodic_site) + +- new_charge = self._charge * np.linalg.det(scale_matrix) if self._charge else None ++ new_charge = self._charge * round(float(np.linalg.det(scale_matrix))) if self._charge else None + return Structure.from_sites(new_sites, charge=new_charge, to_unit_cell=True).relabel_sites(ignore_uniq=True) + + def __rmul__(self, scaling_matrix): diff --git a/science/py-pymatgen-core/pkg-descr b/science/py-pymatgen-core/pkg-descr new file mode 100644 index 000000000000..7f814a666199 --- /dev/null +++ b/science/py-pymatgen-core/pkg-descr @@ -0,0 +1,12 @@ +Python Materials Genomics is a robust materials analysis code that defines +core object representations for structures and molecules with support for +many electronic structure codes. + +This is the pymatgen-core package, which implements the core data structures +and algorithms of pymatgen, including: +- Core data structures (Structure, Molecule, Element, etc.) +- Electronic structure modules +- IO modules for VASP, FEFF, CP2K, LAMMPS and more +- Symmetry analysis +- Transformation modules +- Optimization utilitieshome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69e5dd21.19aee.5c5fd7fe>
