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