2022-04-27 09:35:20 +00:00
|
|
|
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, fetchpatch, pythonOlder
|
2021-06-28 23:13:55 +00:00
|
|
|
, pandas, shapely, fiona, pyproj
|
|
|
|
, pytestCheckHook, Rtree }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "geopandas";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "0.10.2";
|
2021-06-28 23:13:55 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "geopandas";
|
|
|
|
repo = "geopandas";
|
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "14azl3gppqn90k8h4hpjilsivj92k6p1jh7mdr6p4grbww1b7sdq";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
patches = [
|
|
|
|
# Fixes a test, will be included in the next release after 0.10.2
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/geopandas/geopandas/pull/2219/commits/ac67515c9df745b672cca1669adf05eaf5cb0f3b.patch";
|
|
|
|
sha256 = "sha256-XcaoFhD6Rq0nfEpMbOJiAWPbaPDrMwFwoyppayq8NHc=";
|
|
|
|
})
|
|
|
|
# 5 commits from post 0.10.2 that fix the test suite compatibility with pandas >=1.4
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/geopandas/geopandas/pull/2289.patch";
|
|
|
|
sha256 = "sha256-BcZVdaO/DdpZoVGUWaw9etFvvgwizAgrkaBISEOhV4A=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pandas
|
|
|
|
shapely
|
|
|
|
fiona
|
|
|
|
pyproj
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
doCheck = !stdenv.isDarwin;
|
2021-12-06 16:07:01 +00:00
|
|
|
preCheck = ''
|
|
|
|
# Wants to write test files into $HOME.
|
|
|
|
export HOME="$TMPDIR"
|
|
|
|
'';
|
2021-01-15 22:18:51 +00:00
|
|
|
checkInputs = [ pytestCheckHook Rtree ];
|
2021-06-28 23:13:55 +00:00
|
|
|
disabledTests = [
|
|
|
|
# requires network access
|
|
|
|
"test_read_file_remote_geojson_url"
|
|
|
|
"test_read_file_remote_zipfile_url"
|
|
|
|
];
|
2021-01-15 22:18:51 +00:00
|
|
|
pytestFlagsArray = [ "geopandas" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python geospatial data analysis framework";
|
2020-05-03 17:38:23 +00:00
|
|
|
homepage = "https://geopandas.org";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ knedlsepp ];
|
|
|
|
};
|
|
|
|
}
|