nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 56 lines 1.6 kB view raw
1{ lib, stdenv, buildPythonPackage, fetchFromGitHub, fetchpatch, 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 patches = [ 18 # Fixes a test, will be included in the next release after 0.10.2 19 (fetchpatch { 20 url = "https://github.com/geopandas/geopandas/pull/2219/commits/ac67515c9df745b672cca1669adf05eaf5cb0f3b.patch"; 21 sha256 = "sha256-XcaoFhD6Rq0nfEpMbOJiAWPbaPDrMwFwoyppayq8NHc="; 22 }) 23 # 5 commits from post 0.10.2 that fix the test suite compatibility with pandas >=1.4 24 (fetchpatch { 25 url = "https://github.com/geopandas/geopandas/pull/2289.patch"; 26 sha256 = "sha256-BcZVdaO/DdpZoVGUWaw9etFvvgwizAgrkaBISEOhV4A="; 27 }) 28 ]; 29 30 propagatedBuildInputs = [ 31 pandas 32 shapely 33 fiona 34 pyproj 35 ]; 36 37 doCheck = !stdenv.isDarwin; 38 preCheck = '' 39 # Wants to write test files into $HOME. 40 export HOME="$TMPDIR" 41 ''; 42 checkInputs = [ pytestCheckHook Rtree ]; 43 disabledTests = [ 44 # requires network access 45 "test_read_file_remote_geojson_url" 46 "test_read_file_remote_zipfile_url" 47 ]; 48 pytestFlagsArray = [ "geopandas" ]; 49 50 meta = with lib; { 51 description = "Python geospatial data analysis framework"; 52 homepage = "https://geopandas.org"; 53 license = licenses.bsd3; 54 maintainers = with maintainers; [ knedlsepp ]; 55 }; 56}