summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/geoarrow-pyarrow/default.nix
blob: d87f07cfb5a9cf96d9e0f9e93fc29ffa842f2624 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pytestCheckHook,
  geoarrow-c,
  pyarrow,
  pyarrow-hotfix,
  numpy,
  pandas,
  geoarrow-types,
  geopandas,
  pyogrio,
  pyproj,
  setuptools-scm,
}:
buildPythonPackage rec {
  pname = "geoarrow-pyarrow";
  version = "0.2.0";
  pyproject = true;

  src = fetchFromGitHub {
    repo = "geoarrow-python";
    owner = "geoarrow";
    tag = "geoarrow-pyarrow-${version}";
    hash = "sha256-tgeWrVpGIyRqRGk1y9OdS/eYMJjt80sXHt6VCx8RWys=";
  };

  sourceRoot = "${src.name}/geoarrow-pyarrow";

  build-system = [ setuptools-scm ];

  disabledTests = [
    # these tests are incompatible with arrow 17
    "test_make_point"
    "test_point_with_offset"
    "test_linestring_with_offset"
    "test_polygon_with_offset"
    "test_multipoint_with_offset"
    "test_multilinestring_with_offset"
    "test_multipolygon_with_offset"
    "test_multipolygon_with_offset_nonempty_inner_lists"
    "test_interleaved_multipolygon_with_offset"
    "test_readpyogrio_table_gpkg"
    "test_geometry_type_basic"
  ];

  dependencies = [
    geoarrow-c
    pyarrow
    pyarrow-hotfix
  ];

  env.SETUPTOOLS_SCM_PRETEND_VERSION = version;

  nativeCheckInputs = [
    pytestCheckHook
  ];

  checkInputs = [
    geoarrow-types
    numpy
    pandas
    geopandas
    pyogrio
    pyproj
  ];

  pythonImportsCheck = [ "geoarrow.pyarrow" ];

  meta = {
    description = "PyArrow implementation of geospatial data types";
    homepage = "https://github.com/geoarrow/geoarrow-python";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [
      cpcloud
    ];
    teams = [ lib.teams.geospatial ];
  };
}