aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2026-08-04 19:07:50 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2026-08-04 20:10:27 +0000
commitc48babd71c47296d2eb8c904dd94d6e10c974944 (patch)
tree003d401106897fd79c76333aac900468010f3bd9
parent3cd2f1c9eba9856291b63abd24cd24cf25a2b820 (diff)
math/py-yt: update 4.3.1 → 4.4.2
-rw-r--r--math/py-yt/Makefile50
-rw-r--r--math/py-yt/distinfo6
-rw-r--r--math/py-yt/files/patch-pyproject.toml28
-rw-r--r--math/py-yt/files/patch-yt_data__objects_tests_test__data__containers.py49
-rw-r--r--math/py-yt/files/patch-yt_data__objects_tests_test__dataset__access.py29
-rw-r--r--math/py-yt/files/patch-yt_data__objects_tests_test__particle__filter.py31
-rw-r--r--math/py-yt/files/patch-yt_tests_test__funcs.py48
-rw-r--r--math/py-yt/files/patch-yt_utilities_lib_platform__dep.h14
-rw-r--r--math/py-yt/files/patch-yt_utilities_lib_platform__dep__math.hpp16
-rw-r--r--math/py-yt/files/patch-yt_visualization_tests_test__color__maps.py22
-rw-r--r--math/py-yt/files/patch-yt_visualization_tests_test__image__writer.py22
11 files changed, 257 insertions, 58 deletions
diff --git a/math/py-yt/Makefile b/math/py-yt/Makefile
index e9ed57e30b3b..76cc8ac88331 100644
--- a/math/py-yt/Makefile
+++ b/math/py-yt/Makefile
@@ -1,6 +1,5 @@
PORTNAME= yt
-DISTVERSION= 4.3.1
-PORTREVISION= 5
+DISTVERSION= 4.4.2
CATEGORIES= math astro python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -12,38 +11,39 @@ WWW= https://yt-project.org/
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/COPYING.txt
-# dependencies are in setup.cfg
-BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}ewah-bool-utils>=1.0.2:devel/py-ewah-bool-utils@${PY_FLAVOR}
-RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}cmyt>=0.2.2:math/py-cmyt@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}ewah-bool-utils>=1.0.2:devel/py-ewah-bool-utils@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}ipywidgets>0:devel/py-ipywidgets@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}ipython>=1.0:devel/ipython@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}matplotlib>0:math/py-matplotlib@${PY_FLAVOR} \
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}ewah-bool-utils>=1.2.0:devel/py-ewah-bool-utils@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}numpy>=2.0.0:math/py-numpy@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cmyt>=1.1.2:math/py-cmyt@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}ewah-bool-utils>=1.2.0:devel/py-ewah-bool-utils@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}matplotlib>=3.5:math/py-matplotlib@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}more-itertools>=8.4:devel/py-more-itertools@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}numpy>=1.21.3:math/py-numpy@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}packaging>=20.9:devel/py-packaging@${PY_FLAVOR} \
- ${PY_PILLOW} \
- ${PYTHON_PKGNAMEPREFIX}pyparsing>=2.0.2:devel/py-pyparsing@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}sympy>=1.2:math/py-sympy@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}toml>=0.10.2:textproc/py-toml@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pillow>=8.3.2:graphics/py-pillow@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}tomli>=1.2.3:textproc/py-tomli@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}tomli-w>=0.4.0:textproc/py-tomli-w@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}tqdm>=3.4.0:misc/py-tqdm@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}unyt>=2.8.0:math/py-unyt@${PY_FLAVOR}
+ ${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.4.0:devel/py-typing-extensions@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}unyt>=2.9.2:math/py-unyt@${PY_FLAVOR}
USES= dos2unix localbase python
USE_PYTHON= autoplist concurrent cython distutils
-post-patch:
- @${REINPLACE_CMD} -e "s|check_for_pyembree() is not None|False|" \
- ${WRKSRC}/setup.py
- @${REINPLACE_CMD} -e "s|check_for_openmp() is True|True|" \
- ${WRKSRC}/setup.py
- @${REINPLACE_CMD} -e "s|\['-fopenmp', filename\]|['-I${LOCALBASE}/include', '-L${LOCALBASE}/lib', '-lm', '-fopenmp', filename]|" \
- ${WRKSRC}/setupext.py
-
post-install:
@${STRIP_CMD} $$(${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name "*.so")
+TEST_ENV= ${MAKE_ENV} \
+ PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} \
+ MPLBACKEND=Agg \
+ PYTEST_ADDOPTS="-p no:black -p no:ruff -p no:mypy -p no:flake8 -p no:cov -p no:benchmark -p no:inline-snapshot -p no:xdist -p no:randomly"
+
+do-test:
+ @cd ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} && \
+ ${SETENV} ${TEST_ENV} pytest yt/tests \
+ --deselect=yt/data_objects/tests/test_data_containers.py::TestDataContainers::test_to_astropy_table
+
+# tests as of 4.4.2: 53 passed, 10 skipped, 1 xfailed in 9.87s
+# Additional tests are excluded because they depend on nose (broken on Python 3.12)
+# or on data files/network access.
+
.include <bsd.port.mk>
diff --git a/math/py-yt/distinfo b/math/py-yt/distinfo
index 9a0e34c27856..f7193824e085 100644
--- a/math/py-yt/distinfo
+++ b/math/py-yt/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1725817547
-SHA256 (yt-4.3.1.tar.gz) = 7b6db5c336dc22dd2212bb17c3b18f42cfe144bb1f6c3dda0dcd47eb77195e0e
-SIZE (yt-4.3.1.tar.gz) = 13810591
+TIMESTAMP = 1785732501
+SHA256 (yt-4.4.2.tar.gz) = e0883a89c2543b436c3778f555edf253c71f252f744752dc1688f8524ad03b0b
+SIZE (yt-4.4.2.tar.gz) = 4946809
diff --git a/math/py-yt/files/patch-pyproject.toml b/math/py-yt/files/patch-pyproject.toml
new file mode 100644
index 000000000000..3e6c6e956abc
--- /dev/null
+++ b/math/py-yt/files/patch-pyproject.toml
@@ -0,0 +1,28 @@
+-- Relax the setuptools version requirement to match the version available in the
+-- FreeBSD ports tree (devel/py-setuptools). Also adapt the PEP 621 license
+-- fields to the form supported by that setuptools version.
+
+--- pyproject.toml.orig 2025-11-18 00:00:00 UTC
++++ pyproject.toml
+@@ -1,7 +1,7 @@
+ [build-system]
+ # keep in sync with .github/workflows/wheels.yaml
+ requires = [
+- "setuptools>=77.0.0",
++ "setuptools>=63.1.0",
+ "Cython>=3.0.3",
+ "numpy>=2.0.0",
+ "ewah-bool-utils>=1.2.0",
+@@ -15,11 +15,7 @@
+ authors = [
+ { name = "The yt project", email = "yt-dev@python.org" },
+ ]
+-license = "BSD-3-Clause"
+-license-files = [
+- "COPYING.txt",
+- "yt/frontends/artio/artio_headers/LICENSE",
+-]
++license = {text = "BSD-3-Clause"}
+ classifiers = [
+ "Development Status :: 5 - Production/Stable",
+ "Environment :: Console",
diff --git a/math/py-yt/files/patch-yt_data__objects_tests_test__data__containers.py b/math/py-yt/files/patch-yt_data__objects_tests_test__data__containers.py
new file mode 100644
index 000000000000..c71204f9788e
--- /dev/null
+++ b/math/py-yt/files/patch-yt_data__objects_tests_test__data__containers.py
@@ -0,0 +1,49 @@
+-- Replace nose.tools.assert_raises with unittest.TestCase.assertRaises so yt tests can run under Python 3.12 where nose is broken.
+--- yt/data_objects/tests/test_data_containers.py.orig 2026-08-04 00:34:29 UTC
++++ yt/data_objects/tests/test_data_containers.py
+@@ -4,7 +4,8 @@ import numpy as np
+ import unittest
+
+ import numpy as np
+-from nose.tools import assert_raises
++from unittest import TestCase
++_assert_raises = TestCase().assertRaises
+ from numpy.testing import assert_array_equal, assert_equal
+
+ from yt.data_objects.data_containers import YTDataContainer
+@@ -32,7 +33,7 @@ class TestDataContainers(unittest.TestCase):
+
+ def test_yt_data_container(self):
+ # Test if ds could be None
+- with assert_raises(RuntimeError) as err:
++ with _assert_raises(RuntimeError) as err:
+ YTDataContainer(None, None)
+ desired = (
+ "Error: ds must be set either through class"
+@@ -53,7 +54,7 @@ class TestDataContainers(unittest.TestCase):
+ assert_equal("density" in proj.keys(), False)
+
+ # Delete a non-existent field
+- with assert_raises(YTFieldNotFound) as ex:
++ with _assert_raises(YTFieldNotFound) as ex:
+ del proj["p_mass"]
+ desired = "Could not find field 'p_mass' in UniformGridData."
+ assert_equal(str(ex.exception), desired)
+@@ -82,7 +83,7 @@ class TestDataContainers(unittest.TestCase):
+ ds = fake_random_ds(16, particles=10)
+ sp = ds.sphere(ds.domain_center, 0.25)
+
+- with assert_raises(YTException):
++ with _assert_raises(YTException):
+ sp.write_out(filename, fields=[("all", "particle_ones")])
+
+ @requires_module("pandas")
+@@ -152,7 +153,7 @@ class TestDataContainers(unittest.TestCase):
+ dd = ds.all_data()
+ q = dd.quantities["WeightedAverageQuantity"]
+ rho = q(("all", "particle_velocity_x"), weight=("all", "particle_mass"))
+- with assert_raises(NotImplementedError):
++ with _assert_raises(NotImplementedError):
+ dd.extract_isocontours("density", rho, sample_values="x")
+
+ def test_derived_field(self):
diff --git a/math/py-yt/files/patch-yt_data__objects_tests_test__dataset__access.py b/math/py-yt/files/patch-yt_data__objects_tests_test__dataset__access.py
new file mode 100644
index 000000000000..98394a102c2a
--- /dev/null
+++ b/math/py-yt/files/patch-yt_data__objects_tests_test__dataset__access.py
@@ -0,0 +1,29 @@
+-- Replace nose.tools.assert_raises with unittest.TestCase.assertRaises so yt tests can run under Python 3.12 where nose is broken.
+--- yt/data_objects/tests/test_dataset_access.py.orig 2026-08-04 00:34:29 UTC
++++ yt/data_objects/tests/test_dataset_access.py
+@@ -1,5 +1,6 @@ import numpy as np
+ import numpy as np
+-from nose.tools import assert_raises
++from unittest import TestCase
++_assert_raises = TestCase().assertRaises
+ from numpy.testing import assert_almost_equal, assert_equal
+
+ from yt.testing import (
+@@ -66,7 +67,7 @@ def test_region_from_d():
+ assert_equal(reg1["gas", "density"], reg2["gas", "density"])
+
+ # Test with bad boundary initialization
+- with assert_raises(RuntimeError):
++ with _assert_raises(RuntimeError):
+ ds.r[0.3:0.1, 0.4:0.6, :]
+
+ # Test region by creating an arbitrary grid
+@@ -133,7 +134,7 @@ def test_point_from_r():
+ assert_equal(pt1["gas", "density"], pt2["gas", "density"])
+
+ # Test YTDimensionalityError
+- with assert_raises(YTDimensionalityError) as ex:
++ with _assert_raises(YTDimensionalityError) as ex:
+ ds.r[0.5, 0.1]
+ assert_equal(str(ex.exception), "Dimensionality specified was 2 but we need 3")
+
diff --git a/math/py-yt/files/patch-yt_data__objects_tests_test__particle__filter.py b/math/py-yt/files/patch-yt_data__objects_tests_test__particle__filter.py
new file mode 100644
index 000000000000..2d1260caa8dc
--- /dev/null
+++ b/math/py-yt/files/patch-yt_data__objects_tests_test__particle__filter.py
@@ -0,0 +1,31 @@
+-- Replace nose.tools.assert_raises with unittest.TestCase.assertRaises so yt tests can run under Python 3.12 where nose is broken.
+--- yt/data_objects/tests/test_particle_filter.py.orig 2026-08-04 00:34:29 UTC
++++ yt/data_objects/tests/test_particle_filter.py
+@@ -3,7 +3,8 @@ import numpy as np
+ import tempfile
+
+ import numpy as np
+-from nose.tools import assert_raises
++from unittest import TestCase
++_assert_raises = TestCase().assertRaises
+ from numpy.testing import assert_equal
+
+ from yt.data_objects.particle_filters import add_particle_filter, particle_filter
+@@ -39,7 +40,7 @@ def test_add_particle_filter():
+ assert ("deposit", "stars2_cic") in ds.derived_field_list
+
+ # Test adding filter with fields not defined on the ds
+- with assert_raises(YTIllDefinedParticleFilter) as ex:
++ with _assert_raises(YTIllDefinedParticleFilter) as ex:
+ add_particle_filter(
+ "bad_stars", function=stars, filtered_type="all", requires=["wrong_field"]
+ )
+@@ -131,7 +132,7 @@ def test_particle_filter_exceptions():
+ ds.add_particle_filter("filter1")
+
+ ad = ds.all_data()
+- with assert_raises(YTIllDefinedFilter):
++ with _assert_raises(YTIllDefinedFilter):
+ ad["filter1", "particle_mass"].shape[0]
+
+ @particle_filter(filtered_type="all", requires=["particle_mass"])
diff --git a/math/py-yt/files/patch-yt_tests_test__funcs.py b/math/py-yt/files/patch-yt_tests_test__funcs.py
new file mode 100644
index 000000000000..02c5307f5663
--- /dev/null
+++ b/math/py-yt/files/patch-yt_tests_test__funcs.py
@@ -0,0 +1,48 @@
+-- Replace nose.tools.assert_raises with unittest.TestCase.assertRaises so yt tests can run under Python 3.12 where nose is broken.
+--- yt/tests/test_funcs.py.orig 2026-08-04 00:34:29 UTC
++++ yt/tests/test_funcs.py
+@@ -1,6 +1,7 @@ import os
+ import os
+
+-from nose.tools import assert_raises
++from unittest import TestCase
++_assert_raises = TestCase().assertRaises
+ from numpy.testing import assert_equal
+
+ from yt.funcs import (
+@@ -21,7 +22,7 @@ def test_validate_axis():
+ ds = fake_amr_ds(geometry="cylindrical")
+ ds.slice("Theta", 0.25)
+
+- with assert_raises(TypeError) as ex:
++ with _assert_raises(TypeError) as ex:
+ # default geometry is cartesian
+ ds = fake_amr_ds()
+ ds.slice("r", 0.25)
+@@ -35,7 +36,7 @@ def test_validate_center():
+ validate_center("max")
+ validate_center("MIN_")
+
+- with assert_raises(TypeError) as ex:
++ with _assert_raises(TypeError) as ex:
+ validate_center("avg")
+ desired = (
+ "Expected 'center' to be in ['c', 'center', 'm', 'max', 'min'] "
+@@ -50,7 +51,7 @@ def test_validate_center():
+ def __init__(self, center):
+ self.center = center
+
+- with assert_raises(TypeError) as ex:
++ with _assert_raises(TypeError) as ex:
+ validate_center(CustomCenter(10))
+ desired = (
+ "Expected 'center' to be a numeric object of type "
+@@ -118,7 +119,7 @@ def test_simple_download_file():
+ except FileNotFoundError:
+ pass
+
+- with assert_raises(RuntimeError) as ex:
++ with _assert_raises(RuntimeError) as ex:
+ simple_download_file("http://yt-project.org/404", "simple-download-file")
+
+ desired = "Attempt to download file from http://yt-project.org/404 failed with error 404: Not Found."
diff --git a/math/py-yt/files/patch-yt_utilities_lib_platform__dep.h b/math/py-yt/files/patch-yt_utilities_lib_platform__dep.h
deleted file mode 100644
index 286fb4d5ffc7..000000000000
--- a/math/py-yt/files/patch-yt_utilities_lib_platform__dep.h
+++ /dev/null
@@ -1,14 +0,0 @@
---- yt/utilities/lib/platform_dep.h.orig 2021-08-02 20:27:17 UTC
-+++ yt/utilities/lib/platform_dep.h
-@@ -59,6 +59,10 @@ double erf(double x)
-
- #else
- #include <stdint.h>
--#include "alloca.h"
-+#if !defined(__FreeBSD__)
-+# include "alloca.h"
-+#else
-+# include <stdlib.h>
-+#endif
- #include <math.h>
- #endif
diff --git a/math/py-yt/files/patch-yt_utilities_lib_platform__dep__math.hpp b/math/py-yt/files/patch-yt_utilities_lib_platform__dep__math.hpp
deleted file mode 100644
index ddc45bddb8ec..000000000000
--- a/math/py-yt/files/patch-yt_utilities_lib_platform__dep__math.hpp
+++ /dev/null
@@ -1,16 +0,0 @@
---- yt/utilities/lib/platform_dep_math.hpp.orig 2021-08-02 20:38:53 UTC
-+++ yt/utilities/lib/platform_dep_math.hpp
-@@ -5,6 +5,7 @@ MSVC does not define isnormal in the std:: namespace,
- However with GCC-5, there is a clash between the definition of isnormal in <math.h> and using C++14, so we need to import from cmath instead.
- */
-
-+#if !defined(__FreeBSD__) // see https://github.com/yt-project/yt/issues/3459
- #if _MSC_VER
- #include <math.h>
- inline bool __isnormal(double x) {
-@@ -15,4 +16,5 @@ inline bool __isnormal(double x) {
- inline bool __isnormal(double x) {
- return std::isnormal(x);
- }
-+#endif
- #endif
diff --git a/math/py-yt/files/patch-yt_visualization_tests_test__color__maps.py b/math/py-yt/files/patch-yt_visualization_tests_test__color__maps.py
new file mode 100644
index 000000000000..89c34520d699
--- /dev/null
+++ b/math/py-yt/files/patch-yt_visualization_tests_test__color__maps.py
@@ -0,0 +1,22 @@
+-- Replace nose.tools.assert_raises with unittest.TestCase.assertRaises so yt tests can run under Python 3.12 where nose is broken.
+--- yt/visualization/tests/test_color_maps.py.orig 2026-08-04 00:34:29 UTC
++++ yt/visualization/tests/test_color_maps.py
+@@ -5,7 +5,8 @@ import numpy as np
+
+ import matplotlib.pyplot as plt
+ import numpy as np
+-from nose.tools import assert_raises
++from unittest import TestCase
++_assert_raises = TestCase().assertRaises
+ from numpy.testing import assert_almost_equal, assert_equal
+
+ from yt import make_colormap, show_colormaps
+@@ -29,7 +30,7 @@ class TestColorMaps(unittest.TestCase):
+ show_colormaps(subset="yt_native", filename="yt_color_maps.png")
+
+ # Test for non-existent color map
+- with assert_raises(AttributeError) as ex:
++ with _assert_raises(AttributeError) as ex:
+ show_colormaps(subset="unknown", filename="yt_color_maps.png")
+ desired = (
+ "show_colormaps requires subset attribute to be 'all', "
diff --git a/math/py-yt/files/patch-yt_visualization_tests_test__image__writer.py b/math/py-yt/files/patch-yt_visualization_tests_test__image__writer.py
new file mode 100644
index 000000000000..425114066339
--- /dev/null
+++ b/math/py-yt/files/patch-yt_visualization_tests_test__image__writer.py
@@ -0,0 +1,22 @@
+-- Replace nose.tools.assert_raises with unittest.TestCase.assertRaises so yt tests can run under Python 3.12 where nose is broken.
+--- yt/visualization/tests/test_image_writer.py.orig 2026-08-04 00:34:29 UTC
++++ yt/visualization/tests/test_image_writer.py
+@@ -4,7 +4,8 @@ import numpy as np
+ import unittest
+
+ import numpy as np
+-from nose.tools import assert_raises
++from unittest import TestCase
++_assert_raises = TestCase().assertRaises
+ from numpy.testing import assert_equal
+
+ from yt.testing import fake_random_ds
+@@ -65,7 +66,7 @@ class TestImageWriter(unittest.TestCase):
+ png_str_trans = write_bitmap(image_trans, None, transpose=True)
+ assert_equal(png_str, png_str_trans)
+
+- with assert_raises(RuntimeError) as ex:
++ with _assert_raises(RuntimeError) as ex:
+ write_bitmap(np.ones([16, 16]), None)
+ desired = "Expecting image array of shape (N,M,3) or (N,M,4), received (16, 16)"
+ assert_equal(str(ex.exception)[:50], desired[:50])