1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 nh3,
6 pillow,
7 pytest-cov-stub,
8 pytestCheckHook,
9 pythonOlder,
10 regex,
11 setuptools-scm,
12 setuptools,
13}:
14
15buildPythonPackage rec {
16 pname = "textile";
17 version = "4.0.3";
18 pyproject = true;
19
20 disabled = pythonOlder "3.8";
21
22 src = fetchFromGitHub {
23 owner = "textile";
24 repo = "python-textile";
25 tag = version;
26 hash = "sha256-KVDppsvX48loV9OJ70yqmQ5ZSypzcxrjH1j31DcyfM8=";
27 };
28
29 build-system = [
30 setuptools
31 setuptools-scm
32 ];
33
34 dependencies = [
35 nh3
36 regex
37 ];
38
39 optional-dependencies = {
40 imagesize = [ pillow ];
41 };
42
43 nativeCheckInputs = [
44 pytest-cov-stub
45 pytestCheckHook
46 ];
47
48 pythonImportsCheck = [ "textile" ];
49
50 meta = with lib; {
51 description = "MOdule for generating web text";
52 homepage = "https://github.com/textile/python-textile";
53 changelog = "https://github.com/textile/python-textile/blob/${version}/CHANGELOG.textile";
54 license = licenses.bsd3;
55 maintainers = with maintainers; [ fab ];
56 mainProgram = "pytextile";
57 };
58}