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