diff --git a/math/py-ml-dtypes/Makefile b/math/py-ml-dtypes/Makefile index 63b27391cb34..a31198cd13d2 100644 --- a/math/py-ml-dtypes/Makefile +++ b/math/py-ml-dtypes/Makefile @@ -1,6 +1,5 @@ PORTNAME= ml-dtypes -PORTVERSION= 0.5.1 -PORTREVISION= 2 +PORTVERSION= 0.5.4 CATEGORIES= math python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -18,9 +17,14 @@ BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=2.0,1<3,1:math/py-numpy@${PY_FLAVOR ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=2.1.0,1:math/py-numpy@${PY_FLAVOR} -USES= python +USES= eigen:5 python USE_PYTHON= autoplist concurrent pep517 +post-patch: + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/setup.py +# Clean up bundled libraries + @${RM} -r ${WRKSRC}/third_party/ + post-install: ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} + diff --git a/math/py-ml-dtypes/distinfo b/math/py-ml-dtypes/distinfo index fc3946fc55a5..884509f5cd20 100644 --- a/math/py-ml-dtypes/distinfo +++ b/math/py-ml-dtypes/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1738089116 -SHA256 (ml_dtypes-0.5.1.tar.gz) = ac5b58559bb84a95848ed6984eb8013249f90b6bab62aa5acbad876e256002c9 -SIZE (ml_dtypes-0.5.1.tar.gz) = 698772 +TIMESTAMP = 1775414472 +SHA256 (ml_dtypes-0.5.4.tar.gz) = 8ab06a50fb9bf9666dd0fe5dfb4676fa2b0ac0f31ecff72a6c3af8e22c063453 +SIZE (ml_dtypes-0.5.4.tar.gz) = 692314 diff --git a/math/py-ml-dtypes/files/patch-pyproject.toml b/math/py-ml-dtypes/files/patch-pyproject.toml index 23cd5429a7c2..f6011ea389d5 100644 --- a/math/py-ml-dtypes/files/patch-pyproject.toml +++ b/math/py-ml-dtypes/files/patch-pyproject.toml @@ -1,10 +1,20 @@ ---- pyproject.toml.orig 2025-01-07 02:25:37 UTC +--- pyproject.toml.orig 2025-11-17 22:18:59 UTC +++ pyproject.toml -@@ -52,7 +52,7 @@ requires = [ +@@ -4,8 +4,7 @@ requires-python = ">=3.9" + description = "ml_dtypes is a stand-alone implementation of several NumPy dtype extensions used in machine learning." + readme = "README.md" + requires-python = ">=3.9" +-license = "Apache-2.0" +-license-files = ["LICENSE", "LICENSE.eigen"] ++license = {file = "LICENSE"} + authors = [{name = "ml_dtypes authors", email="ml_dtypes@google.com"}] + classifiers = [ + "Programming Language :: Python :: 3", +@@ -52,7 +51,7 @@ requires = [ # We build against the most recent supported NumPy 2.0 release; # see https://github.com/numpy/numpy/issues/27265 "numpy~=2.0", -- "setuptools~=75.7.0", +- "setuptools~=80.9.0", + "setuptools", ] build-backend = "setuptools.build_meta" diff --git a/math/py-ml-dtypes/files/patch-setup.py b/math/py-ml-dtypes/files/patch-setup.py new file mode 100644 index 000000000000..18d0c7f70609 --- /dev/null +++ b/math/py-ml-dtypes/files/patch-setup.py @@ -0,0 +1,11 @@ +--- setup.py.orig 2025-11-17 22:18:59 UTC ++++ setup.py +@@ -66,7 +66,7 @@ setup( + "ml_dtypes/_src/numpy.cc", + ], + include_dirs=[ +- "third_party/eigen", ++ "%%LOCALBASE%%/include/eigen3", + ".", + np.get_include(), + ],