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