1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 pytestCheckHook,
7 geoarrow-c,
8 pyarrow,
9 pyarrow-hotfix,
10 numpy,
11 pandas,
12 geopandas,
13 pyogrio,
14 pyproj,
15 setuptools-scm,
16}:
17buildPythonPackage rec {
18 pname = "geoarrow-pyarrow";
19 version = "0.1.2";
20 pyproject = true;
21
22 disabled = pythonOlder "3.8";
23
24 src = fetchFromGitHub {
25 repo = "geoarrow-python";
26 owner = "geoarrow";
27 tag = "geoarrow-pyarrow-${version}";
28 hash = "sha256-Ni+GKTRhRDRHip1us3OZPuUhHQCNU7Nap865T/+CU8Y=";
29 };
30
31 sourceRoot = "${src.name}/geoarrow-pyarrow";
32
33 build-system = [ setuptools-scm ];
34
35 disabledTests = [
36 # these tests are incompatible with arrow 17
37 "test_make_point"
38 "test_point_with_offset"
39 "test_linestring_with_offset"
40 "test_polygon_with_offset"
41 "test_multipoint_with_offset"
42 "test_multilinestring_with_offset"
43 "test_multipolygon_with_offset"
44 "test_multipolygon_with_offset_nonempty_inner_lists"
45 "test_interleaved_multipolygon_with_offset"
46 "test_readpyogrio_table_gpkg"
47 "test_geometry_type_basic"
48 ];
49
50 dependencies = [
51 geoarrow-c
52 pyarrow
53 pyarrow-hotfix
54 ];
55
56 env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
57
58 nativeCheckInputs = [
59 pytestCheckHook
60 numpy
61 pandas
62 geopandas
63 pyogrio
64 pyproj
65 ];
66
67 pythonImportsCheck = [ "geoarrow.pyarrow" ];
68
69 meta = with lib; {
70 description = "PyArrow implementation of geospatial data types";
71 homepage = "https://github.com/geoarrow/geoarrow-python";
72 license = licenses.asl20;
73 maintainers = with maintainers; [
74 cpcloud
75 ];
76 teams = [ lib.teams.geospatial ];
77 };
78}