From de04daf00021d30d14392153ace5dafd28d0842a Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Mon, 16 Dec 2024 21:08:05 +0100 Subject: [PATCH] python312Packages.mammoth: init at 1.8.0 --- .../python-modules/mammoth/default.nix | 60 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 62 insertions(+) create mode 100644 pkgs/development/python-modules/mammoth/default.nix diff --git a/pkgs/development/python-modules/mammoth/default.nix b/pkgs/development/python-modules/mammoth/default.nix new file mode 100644 index 00000000000000..22c28e274e8ef7 --- /dev/null +++ b/pkgs/development/python-modules/mammoth/default.nix @@ -0,0 +1,60 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + cobble, + funk, + pytestCheckHook, + spur, + tempman, +}: + +buildPythonPackage rec { + pname = "mammoth"; + version = "1.8.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "mwilliamson"; + repo = "python-mammoth"; + rev = version; + hash = "sha256-mIvzEyKpy1j7tZti+QTXgsbqqZAhYs7N+p5sQFsLhBg="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace-fail 'read("README")' '""' + ''; + + build-system = [ + setuptools + ]; + + dependencies = [ + cobble + ]; + + pythonImportsCheck = [ + "mammoth" + ]; + + nativeCheckInputs = [ + funk + pytestCheckHook + spur + tempman + ]; + + disabledTestPaths = [ + "tests/cli_tests.py" + ]; + + meta = { + description = "Convert Word documents (.docx files) to HTML"; + homepage = "https://github.com/mwilliamson/python-mammoth"; + changelog = "https://github.com/mwilliamson/python-mammoth/blob/${src.rev}/NEWS"; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ drupol ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 466108f688528e..2cde190b84c89e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7793,6 +7793,8 @@ self: super: with self; { malduck = callPackage ../development/python-modules/malduck { }; + mammoth = callPackage ../development/python-modules/mammoth { }; + mamba-ssm = callPackage ../development/python-modules/mamba-ssm { }; managesieve = callPackage ../development/python-modules/managesieve { };