From c015fc274fb877c991d02d740863a61f5a5b6f93 Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Sun, 12 Jan 2025 04:16:39 -0800 Subject: [PATCH] python312Packages.pyicu: skip test for sjd locale --- pkgs/development/python-modules/pyicu/default.nix | 7 +++++++ .../python-modules/pyicu/skip-sjd-local.diff | 13 +++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 pkgs/development/python-modules/pyicu/skip-sjd-local.diff diff --git a/pkgs/development/python-modules/pyicu/default.nix b/pkgs/development/python-modules/pyicu/default.nix index 8dd0fb09c740..a258462bf77a 100644 --- a/pkgs/development/python-modules/pyicu/default.nix +++ b/pkgs/development/python-modules/pyicu/default.nix @@ -1,4 +1,5 @@ { + stdenv, lib, buildPythonPackage, fetchPypi, @@ -18,6 +19,12 @@ buildPythonPackage rec { hash = "sha256-1JGQheqgfaErrejuch57v3reAVHKD4KUaibI9LmM3Os="; }; + patches = lib.optionals stdenv.hostPlatform.isDarwin [ + # fails testExemplarSet2 test due to sjd locale not having an auxiliary + # esType. icuReal doesn't have an sjd locale + ./skip-sjd-local.diff + ]; + nativeBuildInputs = [ icu ]; # for icu-config, but should be replaced with pkg-config buildInputs = [ icu ]; nativeCheckInputs = [ diff --git a/pkgs/development/python-modules/pyicu/skip-sjd-local.diff b/pkgs/development/python-modules/pyicu/skip-sjd-local.diff new file mode 100644 index 000000000000..995b0d5f57dc --- /dev/null +++ b/pkgs/development/python-modules/pyicu/skip-sjd-local.diff @@ -0,0 +1,13 @@ +diff --git a/test/test_LocaleData.py b/test/test_LocaleData.py +index 76410e7..7db6f13 100644 +--- a/test/test_LocaleData.py ++++ b/test/test_LocaleData.py +@@ -126,6 +126,7 @@ class TestLocaleData(TestCase): + ld = LocaleData(locale) + scriptCodes = Script.getCode(locale) + exemplarSets = [] ++ if locale == 'sjd': continue + for k in range(2): # for casing option in (normal, uncased) + # it seems USET_CASE_INSENSITIVE = 2 + option = 0 if k == 0 else 2 +