1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5
6# build
7, meson
8, meson-python
9, ninja
10, pybind11
11
12# propagates
13, numpy
14
15# optionals
16, bokeh
17, chromedriver
18, selenium
19
20# tests
21, matplotlib
22, pillow
23, pytestCheckHook
24}:
25
26let countourpy = buildPythonPackage rec {
27 pname = "contourpy";
28 version = "1.1.0";
29 format = "pyproject";
30
31 disabled = pythonOlder "3.8";
32
33 src = fetchFromGitHub {
34 owner = "contourpy";
35 repo = "contourpy";
36 rev = "refs/tags/v${version}";
37 hash = "sha256-7M+5HMDqQI4UgVfW/MXsVyz/yM6wjTcJEdw7vPvzuNY=";
38 };
39
40 nativeBuildInputs = [
41 meson
42 meson-python
43 ninja
44 pybind11
45 ];
46
47 propagatedBuildInputs = [
48 numpy
49 ];
50
51 passthru.optional-depdendencies = {
52 bokeh = [ bokeh chromedriver selenium ];
53 };
54
55 doCheck = false; # infinite recursion with matplotlib, tests in passthru
56
57 nativeCheckInputs = [
58 matplotlib
59 pillow
60 pytestCheckHook
61 ];
62
63 passthru.tests = {
64 check = countourpy.overridePythonAttrs (_: { doCheck = true; });
65 };
66
67 pythonImportsCheck = [
68 "contourpy"
69 ];
70
71 meta = with lib; {
72 changelog = "https://github.com/contourpy/contourpy/releases/tag/v${version}";
73 description = "Python library for calculating contours in 2D quadrilateral grids";
74 homepage = "https://github.com/contourpy/contourpy";
75 license = licenses.bsd3;
76 maintainers = with maintainers; [ ];
77 };
78};
79in countourpy