1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 pyparsing,
7 typing-extensions,
8 pytestCheckHook,
9 setuptools,
10 cython,
11 numpy,
12 fonttools,
13 pillow,
14 pyside6,
15 matplotlib,
16 pymupdf,
17 pyqt5,
18}:
19
20buildPythonPackage rec {
21 version = "1.3.2";
22 pname = "ezdxf";
23
24 pyproject = true;
25
26 disabled = pythonOlder "3.5";
27
28 src = fetchFromGitHub {
29 owner = "mozman";
30 repo = "ezdxf";
31 tag = "v${version}";
32 hash = "sha256-BzdLl2GjLh2ABJzJ6bhdbic9jlSABIVR3XGrYiLJHa0=";
33 };
34
35 dependencies = [
36 pyparsing
37 typing-extensions
38 numpy
39 fonttools
40 ];
41
42 optional-dependencies = {
43 draw = [
44 pyside6
45 matplotlib
46 pymupdf
47 pillow
48 ];
49 draw5 = [
50 pyqt5
51 matplotlib
52 pymupdf
53 pillow
54 ];
55 };
56
57 build-system = [
58 setuptools
59 cython
60 ];
61
62 checkInputs = [ pillow ];
63
64 nativeCheckInputs = [ pytestCheckHook ];
65
66 pythonImportsCheck = [
67 "ezdxf"
68 "ezdxf.addons"
69 ];
70
71 meta = with lib; {
72 description = "Python package to read and write DXF drawings (interface to the DXF file format)";
73 mainProgram = "ezdxf";
74 homepage = "https://github.com/mozman/ezdxf/";
75 license = licenses.mit;
76 maintainers = with maintainers; [ hodapp ];
77 platforms = platforms.unix;
78 };
79}