Loading pkgs/development/python-modules/strpdatetime/default.nix 0 → 100644 +39 −0 Original line number Diff line number Diff line { lib, buildPythonPackage, fetchFromGitHub, poetry-core, textx, pytestCheckHook, }: buildPythonPackage rec { pname = "strpdatetime"; version = "0.3.0"; pyproject = true; src = fetchFromGitHub { owner = "RhetTbull"; repo = "strpdatetime"; rev = "v${version}"; hash = "sha256-eb3KJCFRkEt9KEP1gMQYuP50qXqItrexJhKvtJDHl9o="; }; build-system = [ poetry-core ]; dependencies = [ textx ]; pythonRelaxDeps = [ "textx" ]; patches = [ ./fix-locale.patch ]; pythonImportsCheck = [ "strpdatetime" ]; nativeCheckInputs = [ pytestCheckHook ]; meta = { description = "Parse strings into Python datetime objects"; license = lib.licenses.psfl; changelog = "https://github.com/RhetTbull/strpdatetime/blob/${src.rev}/CHANGELOG.md"; homepage = "https://github.com/RhetTbull/strpdatetime"; maintainers = with lib.maintainers; [ sigmanificient ]; }; } pkgs/development/python-modules/strpdatetime/fix-locale.patch 0 → 100644 +10 −0 Original line number Diff line number Diff line diff --git a/tests/test_strpdatetime.py b/tests/test_strpdatetime.py index 6c371d6..a3d0232 100644 --- a/tests/test_strpdatetime.py +++ b/tests/test_strpdatetime.py @@ -44,5 +44,4 @@ TEST_DATA = [ @pytest.mark.parametrize("string, format, expected", TEST_DATA) def test_datetime_strptime(string, format, expected): """Test datetime_strptime""" - locale.setlocale(locale.LC_ALL, "en_US.UTF-8") assert strpdatetime(string, format) == expected pkgs/top-level/python-packages.nix +2 −0 Original line number Diff line number Diff line Loading @@ -14923,6 +14923,8 @@ self: super: with self; { striprtf = callPackage ../development/python-modules/striprtf { }; strpdatetime = callPackage ../development/python-modules/strpdatetime { }; structlog = callPackage ../development/python-modules/structlog { }; stubserver = callPackage ../development/python-modules/stubserver { }; Loading
pkgs/development/python-modules/strpdatetime/default.nix 0 → 100644 +39 −0 Original line number Diff line number Diff line { lib, buildPythonPackage, fetchFromGitHub, poetry-core, textx, pytestCheckHook, }: buildPythonPackage rec { pname = "strpdatetime"; version = "0.3.0"; pyproject = true; src = fetchFromGitHub { owner = "RhetTbull"; repo = "strpdatetime"; rev = "v${version}"; hash = "sha256-eb3KJCFRkEt9KEP1gMQYuP50qXqItrexJhKvtJDHl9o="; }; build-system = [ poetry-core ]; dependencies = [ textx ]; pythonRelaxDeps = [ "textx" ]; patches = [ ./fix-locale.patch ]; pythonImportsCheck = [ "strpdatetime" ]; nativeCheckInputs = [ pytestCheckHook ]; meta = { description = "Parse strings into Python datetime objects"; license = lib.licenses.psfl; changelog = "https://github.com/RhetTbull/strpdatetime/blob/${src.rev}/CHANGELOG.md"; homepage = "https://github.com/RhetTbull/strpdatetime"; maintainers = with lib.maintainers; [ sigmanificient ]; }; }
pkgs/development/python-modules/strpdatetime/fix-locale.patch 0 → 100644 +10 −0 Original line number Diff line number Diff line diff --git a/tests/test_strpdatetime.py b/tests/test_strpdatetime.py index 6c371d6..a3d0232 100644 --- a/tests/test_strpdatetime.py +++ b/tests/test_strpdatetime.py @@ -44,5 +44,4 @@ TEST_DATA = [ @pytest.mark.parametrize("string, format, expected", TEST_DATA) def test_datetime_strptime(string, format, expected): """Test datetime_strptime""" - locale.setlocale(locale.LC_ALL, "en_US.UTF-8") assert strpdatetime(string, format) == expected
pkgs/top-level/python-packages.nix +2 −0 Original line number Diff line number Diff line Loading @@ -14923,6 +14923,8 @@ self: super: with self; { striprtf = callPackage ../development/python-modules/striprtf { }; strpdatetime = callPackage ../development/python-modules/strpdatetime { }; structlog = callPackage ../development/python-modules/structlog { }; stubserver = callPackage ../development/python-modules/stubserver { };