about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/textile/default.nix
blob: adae00ef3ec50b6867771861cb3446f735ce4992 (plain) (blame)
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
48
{ lib
, buildPythonPackage
, fetchFromGitHub
, html5lib
, pytestCheckHook
, pythonOlder
, regex
}:

buildPythonPackage rec {
  pname = "textile";
  version = "4.0.2";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = pname;
    repo = "python-textile";
    rev = version;
    hash = "sha256-WwX7h07Bq8sNsViHwmfhrrqleXacmrIY4ZBBaP2kKnI=";
  };

  propagatedBuildInputs = [
    html5lib
    regex
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  postPatch = ''
    substituteInPlace pytest.ini \
      --replace " --cov=textile --cov-report=html --cov-append --cov-report=term-missing" ""
  '';

  pythonImportsCheck = [
    "textile"
  ];

  meta = with lib; {
    description = "MOdule for generating web text";
    homepage = "https://github.com/textile/python-textile";
    license = licenses.bsd3;
    maintainers = with maintainers; [ fab ];
  };
}