1{ lib
2, stdenv
3, buildPythonPackage
4, fetchFromGitHub
5, fiona
6, packaging
7, pandas
8, pyproj
9, pytestCheckHook
10, pythonOlder
11, Rtree
12, shapely
13}:
14
15buildPythonPackage rec {
16 pname = "geopandas";
17 version = "0.12.1";
18 format = "setuptools";
19
20 disabled = pythonOlder "3.8";
21
22 src = fetchFromGitHub {
23 owner = "geopandas";
24 repo = "geopandas";
25 rev = "refs/tags/v${version}";
26 hash = "sha256-aLERNVojPgZ3Y7+CnirGvC4RfuQf+K3Oj2/0BqdorwI=";
27 };
28
29 propagatedBuildInputs = [
30 fiona
31 packaging
32 pandas
33 pyproj
34 shapely
35 ];
36
37 checkInputs = [
38 pytestCheckHook
39 Rtree
40 ];
41
42 doCheck = !stdenv.isDarwin;
43
44 preCheck = ''
45 export HOME=$(mktemp -d);
46 '';
47
48 disabledTests = [
49 # Requires network access
50 "test_read_file_remote_geojson_url"
51 "test_read_file_remote_zipfile_url"
52 ];
53
54 pytestFlagsArray = [
55 "geopandas"
56 ];
57
58 pythonImportsCheck = [
59 "geopandas"
60 ];
61
62 meta = with lib; {
63 description = "Python geospatial data analysis framework";
64 homepage = "https://geopandas.org";
65 license = licenses.bsd3;
66 maintainers = with maintainers; [ knedlsepp ];
67 };
68}