at 24.11-pre 2.6 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 python, 6 proj, 7 pythonOlder, 8 substituteAll, 9 cython, 10 pytestCheckHook, 11 mock, 12 certifi, 13 numpy, 14 shapely, 15 pandas, 16 xarray, 17}: 18 19buildPythonPackage rec { 20 pname = "pyproj"; 21 version = "3.6.1"; 22 format = "setuptools"; 23 disabled = pythonOlder "3.9"; 24 25 src = fetchFromGitHub { 26 owner = "pyproj4"; 27 repo = "pyproj"; 28 rev = "refs/tags/${version}"; 29 hash = "sha256-ynAhu89VpvtQJRkIeVyffQHhd+OvWSiZzaI/7nd6fXA="; 30 }; 31 32 # force pyproj to use ${proj} 33 patches = [ 34 (substituteAll { 35 src = ./001.proj.patch; 36 proj = proj; 37 projdev = proj.dev; 38 }) 39 ]; 40 41 nativeBuildInputs = [ cython ]; 42 buildInputs = [ proj ]; 43 44 propagatedBuildInputs = [ certifi ]; 45 46 nativeCheckInputs = [ 47 pytestCheckHook 48 mock 49 numpy 50 shapely 51 pandas 52 xarray 53 ]; 54 55 preCheck = '' 56 # import from $out 57 rm -r pyproj 58 ''; 59 60 disabledTestPaths = [ 61 "test/test_doctest_wrapper.py" 62 "test/test_datadir.py" 63 ]; 64 65 disabledTests = [ 66 # The following tests try to access network and end up with a URLError 67 "test__load_grid_geojson_old_file" 68 "test_get_transform_grid_list" 69 "test_get_transform_grid_list__area_of_use" 70 "test_get_transform_grid_list__bbox__antimeridian" 71 "test_get_transform_grid_list__bbox__out_of_bounds" 72 "test_get_transform_grid_list__contains" 73 "test_get_transform_grid_list__file" 74 "test_get_transform_grid_list__source_id" 75 "test_sync__area_of_use__list" 76 "test_sync__bbox__list" 77 "test_sync__bbox__list__exclude_world_coverage" 78 "test_sync__download_grids" 79 "test_sync__file__list" 80 "test_sync__source_id__list" 81 "test_sync_download" 82 "test_sync_download__directory" 83 "test_sync_download__system_directory" 84 "test_transformer_group__download_grids" 85 86 # proj-data grid required 87 "test_azimuthal_equidistant" 88 ]; 89 90 pythonImportsCheck = [ 91 "pyproj" 92 "pyproj.crs" 93 "pyproj.transformer" 94 "pyproj.geod" 95 "pyproj.proj" 96 "pyproj.database" 97 "pyproj.list" 98 "pyproj.datadir" 99 "pyproj.network" 100 "pyproj.sync" 101 "pyproj.enums" 102 "pyproj.aoi" 103 "pyproj.exceptions" 104 ]; 105 106 meta = with lib; { 107 description = "Python interface to PROJ library"; 108 mainProgram = "pyproj"; 109 homepage = "https://github.com/pyproj4/pyproj"; 110 changelog = "https://github.com/pyproj4/pyproj/blob/${src.rev}/docs/history.rst"; 111 license = licenses.mit; 112 maintainers = 113 with maintainers; 114 teams.geospatial.members 115 ++ [ 116 lsix 117 dotlambda 118 ]; 119 }; 120}