1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, html5lib
5, pytestCheckHook
6, pythonOlder
7, regex
8}:
9
10buildPythonPackage rec {
11 pname = "textile";
12 version = "4.0.2";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = pname;
19 repo = "python-textile";
20 rev = version;
21 hash = "sha256-WwX7h07Bq8sNsViHwmfhrrqleXacmrIY4ZBBaP2kKnI=";
22 };
23
24 propagatedBuildInputs = [
25 html5lib
26 regex
27 ];
28
29 nativeCheckInputs = [
30 pytestCheckHook
31 ];
32
33 postPatch = ''
34 substituteInPlace pytest.ini \
35 --replace " --cov=textile --cov-report=html --cov-append --cov-report=term-missing" ""
36 '';
37
38 pythonImportsCheck = [
39 "textile"
40 ];
41
42 meta = with lib; {
43 description = "MOdule for generating web text";
44 homepage = "https://github.com/textile/python-textile";
45 license = licenses.bsd3;
46 maintainers = with maintainers; [ fab ];
47 };
48}