Commit 72a0348a authored by Sigmanificient's avatar Sigmanificient
Browse files

python312Packages.strpdatetime: init at 0.3.0

fix description

strpdatetime fix

strpdatetime
parent 21bf36dd
Loading
Loading
Loading
Loading
+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 ];
  };
}
+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
+2 −0
Original line number Diff line number Diff line
@@ -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 { };