summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/docx2python/default.nix
blob: 5a47b3ee57a3448d03034f3192b2f3d50daf92fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  lxml,
  paragraphs,
  setuptools,
  setuptools-scm,
  pytestCheckHook,
  typing-extensions,
}:

buildPythonPackage rec {
  pname = "docx2python";
  version = "3.3.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "ShayHill";
    repo = "docx2python";
    tag = version;
    hash = "sha256-u1zOMfYMhmBsvUcfG7UEMvKT9U5XEkBalGtMOgN8RCU=";
  };

  build-system = [
    setuptools
    setuptools-scm
  ];

  dependencies = [
    lxml
    paragraphs
    typing-extensions
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "docx2python" ];

  meta = {
    description = "Extract docx headers, footers, (formatted) text, footnotes, endnotes, properties, and images";
    homepage = "https://github.com/ShayHill/docx2python";
    changelog = "https://github.com/ShayHill/docx2python/blob/${src.rev}/CHANGELOG.md";
    license = lib.licenses.mit;
    maintainers = [ ];
  };
}