at 25.11-pre 1.7 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 cython, 5 fetchPypi, 6 fontconfig, 7 gdal, 8 geos, 9 matplotlib, 10 numpy, 11 owslib, 12 pillow, 13 proj, 14 pyproj, 15 pyshp, 16 pytest-mpl, 17 pytestCheckHook, 18 pythonOlder, 19 scipy, 20 setuptools-scm, 21 shapely, 22}: 23 24buildPythonPackage rec { 25 pname = "cartopy"; 26 version = "0.24.1"; 27 pyproject = true; 28 29 disabled = pythonOlder "3.10"; 30 31 src = fetchPypi { 32 inherit pname version; 33 hash = "sha256-AckQ1WNMaafv3sRuChfUc9Iyh2fwAdTcC1xLSOWFyL0="; 34 }; 35 36 build-system = [ setuptools-scm ]; 37 38 nativeBuildInputs = [ 39 cython 40 geos # for geos-config 41 proj 42 ]; 43 44 buildInputs = [ 45 geos 46 proj 47 ]; 48 49 dependencies = [ 50 matplotlib 51 numpy 52 pyproj 53 pyshp 54 shapely 55 ]; 56 57 optional-dependencies = { 58 ows = [ 59 owslib 60 pillow 61 ]; 62 plotting = [ 63 gdal 64 pillow 65 scipy 66 ]; 67 }; 68 69 nativeCheckInputs = [ 70 pytest-mpl 71 pytestCheckHook 72 ] ++ lib.flatten (lib.attrValues optional-dependencies); 73 74 preCheck = '' 75 export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf 76 export HOME=$TMPDIR 77 ''; 78 79 pytestFlagsArray = [ 80 "--pyargs" 81 "cartopy" 82 "-m" 83 "'not network and not natural_earth'" 84 ]; 85 86 disabledTests = [ 87 "test_gridliner_constrained_adjust_datalim" 88 "test_gridliner_labels_bbox_style" 89 ]; 90 91 meta = with lib; { 92 description = "Process geospatial data to create maps and perform analyses"; 93 homepage = "https://scitools.org.uk/cartopy/docs/latest/"; 94 changelog = "https://github.com/SciTools/cartopy/releases/tag/v${version}"; 95 license = licenses.lgpl3Plus; 96 maintainers = with maintainers; [ ]; 97 mainProgram = "feature_download"; 98 }; 99}