1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 lark,
6 lxml,
7 oletools,
8 pytestCheckHook,
9 pythonOlder,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "rtfde";
15 version = "0.1.2.1";
16 pyproject = true;
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "seamustuohy";
22 repo = "RTFDE";
23 tag = version;
24 hash = "sha256-dtPWgtOYpGaNRmIE7WNGJd/GWB2hQXsFJDDSHIcIjY4=";
25 };
26
27 build-system = [ setuptools ];
28
29 pythonRelaxDeps = [ "lark" ];
30
31 dependencies = [
32 lark
33 oletools
34 ];
35
36 nativeCheckInputs = [
37 lxml
38 pytestCheckHook
39 ];
40
41 pythonImportsCheck = [ "RTFDE" ];
42
43 disabledTests = [
44 # Malformed encapsulated RTF discovered
45 "test_encoded_bytes_stay_encoded_character"
46 ];
47
48 meta = {
49 changelog = "https://github.com/seamustuohy/RTFDE/releases/tag/${src.tag}";
50 description = "Library for extracting encapsulated HTML and plain text content from the RTF bodies";
51 homepage = "https://github.com/seamustuohy/RTFDE";
52 license = lib.licenses.lgpl3Only;
53 maintainers = with lib.maintainers; [ fab ];
54 };
55}