1{ lib
2, buildPythonPackage
3, fetchPypi
4, flit-core
5, ghostscript
6, pillow
7, pytestCheckHook
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "pydyf";
13 version = "0.8.0";
14 format = "pyproject";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-sise8BYUG1SUGtZu1OA2p73/OcCzYJk7KDh1w/hU3Zo=";
21 };
22
23 postPatch = ''
24 substituteInPlace pyproject.toml \
25 --replace "--isort --flake8 --cov --no-cov-on-fail" ""
26 '';
27
28 nativeBuildInputs = [
29 flit-core
30 ];
31
32 nativeCheckInputs = [
33 ghostscript
34 pillow
35 pytestCheckHook
36 ];
37
38 pythonImportsCheck = [
39 "pydyf"
40 ];
41
42 meta = with lib; {
43 description = "Low-level PDF generator written in Python and based on PDF specification 1.7";
44 homepage = "https://doc.courtbouillon.org/pydyf/stable/";
45 changelog = "https://github.com/CourtBouillon/pydyf/releases/tag/v${version}";
46 license = licenses.bsd3;
47 maintainers = with maintainers; [ rprecenth ];
48 };
49}