1{ lib, stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder
2, pandas, shapely, fiona, pyproj
3, pytestCheckHook, Rtree }:
4
5buildPythonPackage rec {
6 pname = "geopandas";
7 version = "0.10.2";
8 disabled = pythonOlder "3.6";
9
10 src = fetchFromGitHub {
11 owner = "geopandas";
12 repo = "geopandas";
13 rev = "v${version}";
14 sha256 = "14azl3gppqn90k8h4hpjilsivj92k6p1jh7mdr6p4grbww1b7sdq";
15 };
16
17 propagatedBuildInputs = [
18 pandas
19 shapely
20 fiona
21 pyproj
22 ];
23
24 doCheck = !stdenv.isDarwin;
25 preCheck = ''
26 # Wants to write test files into $HOME.
27 export HOME="$TMPDIR"
28 '';
29 checkInputs = [ pytestCheckHook Rtree ];
30 disabledTests = [
31 # requires network access
32 "test_read_file_remote_geojson_url"
33 "test_read_file_remote_zipfile_url"
34 ];
35 pytestFlagsArray = [ "geopandas" ];
36
37 meta = with lib; {
38 description = "Python geospatial data analysis framework";
39 homepage = "https://geopandas.org";
40 license = licenses.bsd3;
41 maintainers = with maintainers; [ knedlsepp ];
42 };
43}