at 25.11-pre 1.8 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 cython, 8 gdal, 9 setuptools, 10 11 # dependencies 12 attrs, 13 certifi, 14 click, 15 click-plugins, 16 cligj, 17 18 # optional-dependencies 19 pyparsing, 20 shapely, 21 boto3, 22 23 # tests 24 fsspec, 25 pytestCheckHook, 26 pytz, 27 snuggs, 28}: 29 30buildPythonPackage rec { 31 pname = "fiona"; 32 version = "1.10.1"; 33 pyproject = true; 34 35 src = fetchFromGitHub { 36 owner = "Toblerity"; 37 repo = "Fiona"; 38 tag = version; 39 hash = "sha256-5NN6PBh+6HS9OCc9eC2TcBvkcwtI4DV8qXnz4tlaMXc="; 40 }; 41 42 build-system = [ 43 cython 44 gdal # for gdal-config 45 setuptools 46 ]; 47 48 buildInputs = [ gdal ]; 49 50 dependencies = [ 51 attrs 52 certifi 53 click 54 click-plugins 55 cligj 56 ]; 57 58 optional-dependencies = { 59 calc = [ 60 pyparsing 61 shapely 62 ]; 63 s3 = [ boto3 ]; 64 }; 65 66 nativeCheckInputs = [ 67 fsspec 68 pytestCheckHook 69 pytz 70 shapely 71 snuggs 72 ] ++ optional-dependencies.s3; 73 74 preCheck = '' 75 rm -r fiona # prevent importing local fiona 76 ''; 77 78 pytestFlagsArray = [ 79 # Tests with gdal marker do not test the functionality of Fiona, 80 # but they are used to check GDAL driver capabilities. 81 "-m 'not gdal'" 82 ]; 83 84 disabledTests = [ 85 # Some tests access network, others test packaging 86 "http" 87 "https" 88 "wheel" 89 90 # see: https://github.com/Toblerity/Fiona/issues/1273 91 "test_append_memoryfile_drivers" 92 ]; 93 94 pythonImportsCheck = [ "fiona" ]; 95 96 doInstallCheck = true; 97 98 meta = { 99 changelog = "https://github.com/Toblerity/Fiona/blob/${src.rev}/CHANGES.txt"; 100 description = "OGR's neat, nimble, no-nonsense API for Python"; 101 mainProgram = "fio"; 102 homepage = "https://fiona.readthedocs.io/"; 103 license = lib.licenses.bsd3; 104 teams = [ lib.teams.geospatial ]; 105 }; 106}