From 55cd3ff92ff96fafc75066838cfc2af06df3a296 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 15 Nov 2023 10:39:42 +0000 Subject: gentoo auto-resync : 15:11:2023 - 10:39:42 --- dev-python/contourpy/Manifest | 3 +- dev-python/contourpy/contourpy-1.2.0.ebuild | 5 ++ .../contourpy/files/contourpy-1.2.0-unicore.patch | 83 ++++++++++++++++++++++ 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 dev-python/contourpy/files/contourpy-1.2.0-unicore.patch (limited to 'dev-python/contourpy') diff --git a/dev-python/contourpy/Manifest b/dev-python/contourpy/Manifest index 0c9cf777327d..b7e7fa685794 100644 --- a/dev-python/contourpy/Manifest +++ b/dev-python/contourpy/Manifest @@ -1,5 +1,6 @@ +AUX contourpy-1.2.0-unicore.patch 3169 BLAKE2B 436bd8b179be7bb695694de4254be53fc0915a1ce362966ec6c9c718da735155ac045ba8fd5c34b696b3700aa9e7646fa8ac65466172e8a466629151cbf06a27 SHA512 cbfc980b3bc300a36e4c11e7b59b06ec85a36930ae8a95e7f05e69747da4ee0425a5b684c1e22e0e40c534ff1e2dedee1f99d8e60af2e8d71a1daa68115132c2 DIST contourpy-1.1.1.gh.tar.gz 13417093 BLAKE2B 217b99a1000575d362ca60327f39d39fd5f241f1e0f94ac3f049e2bf195388424f10bfd33c2a007da32eb939c1a04e96942ce0092c091533166c54da906b68af SHA512 7d135f18fa28ecd5d6c715650fc5672291c6f46e96cfcf8d2571c401d5bae0d27fa6a2e9f80e4f735af3016c7ced92552f26e8c5519e725e1bf6fe54c7603a03 DIST contourpy-1.2.0.gh.tar.gz 13440145 BLAKE2B c8082f69c3c8ad2b9a2d7a8e68941f1b741b0527161df371b501a32b8f0572a012aa2184b9f3ea943f45143f218f910180e31371683826d2b9b9431537c72cbd SHA512 91084ca659f796fb49f34840fb08a1a8f2a78ce8264668f5729550b1c46f316933c1d76ed87797bf58a059f0cf63e6efc58c92e44c57787fc8ad1ca16a21aa6e EBUILD contourpy-1.1.1.ebuild 1060 BLAKE2B 47d65894caf62c757a248827c707ce4c5542fd650d49c94bbe70bd2f0f0b0befcb67c4673bb0b29f5364a19975bd9e5ab6d2ed7f0630c4fadd4ed82bcc81cb3a SHA512 88032aaa6f108f938fdd4b10aca5caef5a214fd1a041cffc973b46dd37ec5cf3a3e3d6fd7351b4165a48989b2aad5e7b3f4db19b3ec829b39d4a9d3ab60a8419 -EBUILD contourpy-1.2.0.ebuild 1176 BLAKE2B 8ecfc663813c7bb0170243fdf3c8f33fa23ee4f39682341c4d8c4bccf4fd5e319592b51713b151ddc16221089bc60fd1c227d33fd34f11be279eb36cbb4091f1 SHA512 b13bf3bb8bd1f6b76fcb7abbf8ab4f39bdde2ce2cc49f2be15112809142bcc49b3e508d3fa7f0358f60e6de2c1e52e3a718847df99b303d88d02f867c5f66985 +EBUILD contourpy-1.2.0.ebuild 1274 BLAKE2B e1ccdd5c2f605e7cc4c67c499a3b52f5a6f0646f68d0dc074ee939fd4c6442b33878d4ac6a5089efadbff8a5ac7a2e9bd3b1aaa662b338f8f8c89c6da48a127a SHA512 1f3015f9618e114280a891a925a805901f6f4dfcd825914f59c214faf9f71eba167c5552ceb238c4f1ee12d1d462d0ebeb6ee62b0ad19c2663051815d9289fc6 MISC metadata.xml 372 BLAKE2B de3d6cc9d8727bf43be63fdbb8aa2ad375667d189019e189be262e39d028acab98a21e200798c2d5c5c72521aa7d38202e3e235dd44de9b43a7dc9e045d50c47 SHA512 e692f94d805d7f56fc895a4c76dfbacf2f068d687b9191482b946445baa3bd0a685eda7a1b0aec2aaf9a02e6f23d87f0bf22d90f42e3c21d930724c635ff859a diff --git a/dev-python/contourpy/contourpy-1.2.0.ebuild b/dev-python/contourpy/contourpy-1.2.0.ebuild index dd6add3e91a1..22e5a6586da3 100644 --- a/dev-python/contourpy/contourpy-1.2.0.ebuild +++ b/dev-python/contourpy/contourpy-1.2.0.ebuild @@ -42,6 +42,11 @@ DISTUTILS_ARGS=( distutils_enable_tests pytest +PATCHES=( + # https://github.com/contourpy/contourpy/pull/327 + "${FILESDIR}/${P}-unicore.patch" +) + python_test() { local EPYTEST_IGNORE=( # linters diff --git a/dev-python/contourpy/files/contourpy-1.2.0-unicore.patch b/dev-python/contourpy/files/contourpy-1.2.0-unicore.patch new file mode 100644 index 000000000000..c25a1807dcd4 --- /dev/null +++ b/dev-python/contourpy/files/contourpy-1.2.0-unicore.patch @@ -0,0 +1,83 @@ +From f948f821c705329a98bbcdcba5b642fe6c6f0b74 Mon Sep 17 00:00:00 2001 +From: matoro +Date: Wed, 15 Nov 2023 02:18:49 -0500 +Subject: [PATCH] Support running tests on unicore hosts + +All tests pass except those explicitly asserting that they are on a +multicore system. Adds a conditional skip to those which are only +useful on multicore hosts. +--- + tests/test_filled.py | 7 +++++-- + tests/test_lines.py | 7 +++++-- + tests/test_misc.py | 8 +------- + 3 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/tests/test_filled.py b/tests/test_filled.py +index b239f3b..c41e0d1 100644 +--- a/tests/test_filled.py ++++ b/tests/test_filled.py +@@ -8,7 +8,7 @@ + from numpy.testing import assert_allclose, assert_array_equal + import pytest + +-from contourpy import FillType, contour_generator ++from contourpy import FillType, contour_generator, max_threads + from contourpy.util.data import random, simple + + from . import util_test +@@ -734,7 +734,10 @@ def assert_chunk_offsets(offsets_or_none: list[cpy.OffsetArray | None]) -> None: + @pytest.mark.threads + @pytest.mark.parametrize("fill_type", FillType.__members__.values()) + @pytest.mark.parametrize("name, thread_count", +- [("serial", 1), ("threaded", 1), ("threaded", 2)]) ++ [("serial", 1), ("threaded", 1), ++ pytest.param("threaded", 2, ++ marks = pytest.mark.skipif( ++ max_threads() <= 1, reason = "executing on unicore host"))]) + def test_return_by_fill_type_chunk( + xyz_chunk_test: tuple[cpy.CoordinateArray, ...], + name: str, +diff --git a/tests/test_lines.py b/tests/test_lines.py +index 9608591..0b0833b 100644 +--- a/tests/test_lines.py ++++ b/tests/test_lines.py +@@ -6,7 +6,7 @@ + from numpy.testing import assert_allclose, assert_array_equal + import pytest + +-from contourpy import LineType, contour_generator ++from contourpy import LineType, contour_generator, max_threads + from contourpy.util.data import random, simple + + from . import util_test +@@ -707,7 +707,10 @@ def test_return_by_line_type( + @pytest.mark.threads + @pytest.mark.parametrize("line_type", LineType.__members__.values()) + @pytest.mark.parametrize("name, thread_count", +- [("serial", 1), ("threaded", 1), ("threaded", 2)]) ++ [("serial", 1), ("threaded", 1), ++ pytest.param("threaded", 2, ++ marks = pytest.mark.skipif( ++ max_threads() <= 1, reason = "executing on unicore host"))]) + def test_return_by_line_type_chunk( + xyz_chunk_test: tuple[cpy.CoordinateArray, ...], + name: str, +diff --git a/tests/test_misc.py b/tests/test_misc.py +index 5e46e3f..acd558a 100644 +--- a/tests/test_misc.py ++++ b/tests/test_misc.py +@@ -2,13 +2,7 @@ + + import numpy as np + +-from contourpy import _remove_z_mask, contour_generator, max_threads +- +- +-def test_max_threads() -> None: +- n = max_threads() +- # Assume testing on machine with 2 or more cores. +- assert n > 1 ++from contourpy import _remove_z_mask, contour_generator + + + def test_nan() -> None: -- cgit v1.2.3