Commit fed76e47 authored by Ivan Mincik's avatar Ivan Mincik
Browse files

python3Packages.rasterio: 1.3.9 -> 1.3.10

parent c9610778
Loading
Loading
Loading
Loading
+6 −24
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, pytestCheckHook
, pythonOlder
, stdenv
@@ -33,7 +32,7 @@

buildPythonPackage rec {
  pname = "rasterio";
  version = "1.3.9";
  version = "1.3.10";
  format = "pyproject";

  disabled = pythonOlder "3.8";
@@ -42,25 +41,17 @@ buildPythonPackage rec {
    owner = "rasterio";
    repo = "rasterio";
    rev = "refs/tags/${version}";
    hash = "sha256-Tp6BSU33FaszrIXQgU0Asb7IMue0C939o/atAKz+3Q4=";
    hash = "sha256-FidUaSpbTR8X1/Cqy/IwApkOOl2RRtPqYJaSISRPThI=";
  };

  patches = [
    # fix tests failing with GDAL 3.8.0
    (fetchpatch {
      url = "https://github.com/rasterio/rasterio/commit/54ec554a6d9ee52207ad17dee42cbc51c613f709.diff";
      hash = "sha256-Vjt9HRYNAWyj0myMdtSUENbcLjACfzegEClzZb4BxY8=";
    })
    (fetchpatch {
      url = "https://github.com/rasterio/rasterio/commit/5a72613c58d1482bf297d08cbacf27992f52b2c4.diff";
      hash = "sha256-bV6rh3GBmeqq9+Jff2b8/1wOuyF3Iqducu2eN4CT3lM=";
    })
  ];

  postPatch = ''
    # remove useless import statement requiring distutils to be present at the runtime
    substituteInPlace rasterio/rio/calc.py \
      --replace-fail "from distutils.version import LooseVersion" ""

    # relax dependency on yet non-packaged, RC version of numpy
    substituteInPlace pyproject.toml \
      --replace-fail "numpy==2.0.0rc1" "numpy"
    '';

  nativeBuildInputs = [
@@ -104,12 +95,6 @@ buildPythonPackage rec {
    shapely
  ];

  # rio has runtime dependency on setuptools
  setuptoolsPythonPath = [ setuptools ];
  postInstall = ''
    wrapPythonProgramsIn "$out/bin" "$out $setuptoolsPythonPath"
  '';

  doCheck = true;

  preCheck = ''
@@ -118,9 +103,6 @@ buildPythonPackage rec {

  pytestFlagsArray = [
    "-m 'not network'"

    # pytest.PytestRemovedIn8Warning: Passing None has been deprecated.
    "-W ignore::pytest.PytestRemovedIn8Warning"
  ];

  disabledTests = [