diff --git a/pkgs/development/python-modules/pyicu/default.nix b/pkgs/development/python-modules/pyicu/default.nix index 7702f8c027b3..6bd136fb197a 100644 --- a/pkgs/development/python-modules/pyicu/default.nix +++ b/pkgs/development/python-modules/pyicu/default.nix @@ -1,7 +1,9 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitLab, + pkg-config, + setuptools, pytestCheckHook, six, icu, @@ -9,22 +11,35 @@ buildPythonPackage rec { pname = "pyicu"; - version = "2.14"; - format = "setuptools"; + version = "2.15"; + pyproject = true; - src = fetchPypi { - pname = "PyICU"; - inherit version; - hash = "sha256-rMfrkr1cVU7VdyScaXhFCk/toKpvAUcBUrOns4KgITI="; + src = fetchFromGitLab { + domain = "gitlab.pyicu.org"; + owner = "main"; + repo = "pyicu"; + tag = "v${version}"; + hash = "sha256-F3qW0yZBjJ8pmLEW4dWKBFvnyiw5F732DKAI+eLcL+g="; }; - nativeBuildInputs = [ icu ]; # for icu-config, but should be replaced with pkg-config + build-system = [ setuptools ]; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ icu ]; + nativeCheckInputs = [ pytestCheckHook six ]; + pytestFlagsArray = [ + # AssertionError: '$' != 'US Dollar' + "--deselect=test/test_NumberFormatter.py::TestCurrencyUnit::testGetName" + # AssertionError: Lists differ: ['a', 'b', 'c', 'd'] != ['a', 'b', 'c', 'd', ... + "--deselect=test/test_UnicodeSet.py::TestUnicodeSet::testIterators" + ]; + pythonImportsCheck = [ "icu" ]; meta = with lib; {