From 149a0aa13b6447e4c1ddd235fd37a5d470b34719 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 8 Jul 2026 20:06:25 +0000 Subject: [PATCH] python3Packages.pyogrio: 0.12.1 -> 0.13.0 Diff: https://github.com/geopandas/pyogrio/compare/v0.12.1...v0.13.0 Changelog: https://github.com/geopandas/pyogrio/blob/v0.13.0/CHANGES.md --- .../python-modules/pyogrio/default.nix | 74 +++++++++++++------ 1 file changed, 53 insertions(+), 21 deletions(-) diff --git a/pkgs/development/python-modules/pyogrio/default.nix b/pkgs/development/python-modules/pyogrio/default.nix index fe5268a592a6..b96626ec76e7 100644 --- a/pkgs/development/python-modules/pyogrio/default.nix +++ b/pkgs/development/python-modules/pyogrio/default.nix @@ -2,55 +2,74 @@ lib, buildPythonPackage, fetchFromGitHub, - pytestCheckHook, - - certifi, - cython, gdal, - numpy, - packaging, + + # build-system + cython, setuptools, versioneer, - wheel, + + # dependencies + certifi, + numpy, + packaging, + + # tests + fiona, + pandas, + pytest-benchmark, + pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "pyogrio"; - version = "0.12.1"; + version = "0.13.0"; pyproject = true; + __structuredAttrs = true; src = fetchFromGitHub { owner = "geopandas"; repo = "pyogrio"; - tag = "v${version}"; - hash = "sha256-c3bd8gxsHCzLKmy8baiIUbTXzZWms/NlDg7Az6TWrfM="; + tag = "v${finalAttrs.version}"; + hash = "sha256-9WaJMrh3FN4hWpdGNq2TynoLqT91tLQ7iTTl/NWYQTI="; }; postPatch = '' substituteInPlace pyproject.toml \ - --replace-fail "versioneer[toml]==0.28" "versioneer[toml]" + --replace-fail \ + "versioneer[toml]==0.28" \ + "versioneer[toml]" ''; - nativeBuildInputs = [ + build-system = [ cython - gdal # for gdal-config setuptools versioneer - wheel + ]; + + nativeBuildInputs = [ + gdal # for gdal-config ]; buildInputs = [ gdal ]; - propagatedBuildInputs = [ + dependencies = [ certifi numpy packaging ]; - nativeCheckInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "pyogrio" ]; + + nativeCheckInputs = [ + fiona + pandas + pytestCheckHook + pytest-benchmark + ]; preCheck = '' - python setup.py build_ext --inplace + rm pyogrio/__init__.py ''; disabledTestMarks = [ @@ -58,13 +77,26 @@ buildPythonPackage rec { "network" ]; - pythonImportsCheck = [ "pyogrio" ]; + disabledTests = [ + # Circular dependencies with geopandas + "test_detect_zip_path" + "test_path_absolute" + "test_path_relative_dataframe" + "test_uri_local_file_dataframe" + "test_vsi_handling_read_dataframe" + "test_zip_path_dataframe" + ]; + + disabledTestPaths = [ + # NameError: name 'shapely' is not defined + "pyogrio/tests/test_geopandas_io.py" + ]; meta = { description = "Vectorized spatial vector file format I/O using GDAL/OGR"; homepage = "https://pyogrio.readthedocs.io/"; - changelog = "https://github.com/geopandas/pyogrio/blob/${src.tag}/CHANGES.md"; + changelog = "https://github.com/geopandas/pyogrio/blob/${finalAttrs.src.tag}/CHANGES.md"; license = lib.licenses.mit; teams = [ lib.teams.geospatial ]; }; -} +})