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.14.1";
18 format = "setuptools";
19
20 disabled = pythonOlder "3.9";
21
22 src = fetchFromGitHub {
23 owner = "geopandas";
24 repo = "geopandas";
25 rev = "refs/tags/v${version}";
26 hash = "sha256-mQ13fjhtFXvUnBok5bDz+zkbgfXEUmwiv77rBpYS5oo=";
27 };
28
29 propagatedBuildInputs = [
30 fiona
31 packaging
32 pandas
33 pyproj
34 shapely
35 ];
36
37 nativeCheckInputs = [
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_url"
51 ];
52
53 pytestFlagsArray = [
54 "geopandas"
55 ];
56
57 pythonImportsCheck = [
58 "geopandas"
59 ];
60
61 meta = with lib; {
62 description = "Python geospatial data analysis framework";
63 homepage = "https://geopandas.org";
64 changelog = "https://github.com/geopandas/geopandas/blob/v${version}/CHANGELOG.md";
65 license = licenses.bsd3;
66 maintainers = teams.geospatial.members;
67 };
68}