nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 100 lines 1.6 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 scipy, 19 setuptools-scm, 20 shapely, 21}: 22 23buildPythonPackage rec { 24 pname = "cartopy"; 25 version = "0.25.0"; 26 pyproject = true; 27 28 src = fetchPypi { 29 inherit pname version; 30 hash = "sha256-VfGjkOXz8HWyIcfZH7ECWK2XjbeGx5MOugbrRdKHU/4="; 31 }; 32 33 build-system = [ setuptools-scm ]; 34 35 nativeBuildInputs = [ 36 cython 37 geos # for geos-config 38 proj 39 ]; 40 41 buildInputs = [ 42 geos 43 proj 44 ]; 45 46 dependencies = [ 47 matplotlib 48 numpy 49 pyproj 50 pyshp 51 shapely 52 ]; 53 54 optional-dependencies = { 55 ows = [ 56 owslib 57 pillow 58 ]; 59 plotting = [ 60 gdal 61 pillow 62 scipy 63 ]; 64 }; 65 66 nativeCheckInputs = [ 67 pytest-mpl 68 pytestCheckHook 69 ] 70 ++ lib.concatAttrValues optional-dependencies; 71 72 preCheck = '' 73 export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf 74 export HOME=$TMPDIR 75 ''; 76 77 pytestFlags = [ 78 "--pyargs" 79 "cartopy" 80 ]; 81 82 disabledTestMarks = [ 83 "network" 84 "natural_earth" 85 ]; 86 87 disabledTests = [ 88 "test_gridliner_constrained_adjust_datalim" 89 "test_gridliner_labels_bbox_style" 90 ]; 91 92 meta = { 93 description = "Process geospatial data to create maps and perform analyses"; 94 homepage = "https://scitools.org.uk/cartopy/docs/latest/"; 95 changelog = "https://github.com/SciTools/cartopy/releases/tag/v${version}"; 96 license = lib.licenses.lgpl3Plus; 97 maintainers = [ ]; 98 mainProgram = "feature_download"; 99 }; 100}