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