at master 1.7 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytestCheckHook, 6 setuptools, 7 8 packaging, 9 pandas, 10 pyogrio, 11 pyproj, 12 rtree, 13 shapely, 14 15 # optional-dependencies 16 folium, 17 geoalchemy2, 18 geopy, 19 mapclassify, 20 matplotlib, 21 psycopg, 22 pyarrow, 23 sqlalchemy, 24 xyzservices, 25}: 26 27buildPythonPackage rec { 28 pname = "geopandas"; 29 version = "1.1.1"; 30 pyproject = true; 31 32 src = fetchFromGitHub { 33 owner = "geopandas"; 34 repo = "geopandas"; 35 tag = "v${version}"; 36 hash = "sha256-7ZsO4jresikA17M8cyHskdcVnTscGHxTCLJv5p1SvfI="; 37 }; 38 39 build-system = [ setuptools ]; 40 41 dependencies = [ 42 packaging 43 pandas 44 pyogrio 45 pyproj 46 shapely 47 ]; 48 49 optional-dependencies = { 50 all = [ 51 # prevent infinite recursion 52 (folium.overridePythonAttrs (prevAttrs: { 53 doCheck = false; 54 })) 55 geoalchemy2 56 geopy 57 # prevent infinite recursion 58 (mapclassify.overridePythonAttrs (prevAttrs: { 59 doCheck = false; 60 })) 61 matplotlib 62 psycopg 63 pyarrow 64 sqlalchemy 65 xyzservices 66 ]; 67 }; 68 69 nativeCheckInputs = [ 70 pytestCheckHook 71 rtree 72 ] 73 ++ optional-dependencies.all; 74 75 preCheck = '' 76 export HOME=$(mktemp -d); 77 ''; 78 79 disabledTests = [ 80 # Requires network access 81 "test_read_file_url" 82 ]; 83 84 enabledTestPaths = [ "geopandas" ]; 85 86 pythonImportsCheck = [ "geopandas" ]; 87 88 meta = with lib; { 89 description = "Python geospatial data analysis framework"; 90 homepage = "https://geopandas.org"; 91 changelog = "https://github.com/geopandas/geopandas/blob/${src.tag}/CHANGELOG.md"; 92 license = licenses.bsd3; 93 teams = [ teams.geospatial ]; 94 }; 95}