python3Packages.rasterio: 1.3.9 -> 1.3.10

This commit is contained in:
Ivan Mincik 2024-04-15 22:22:07 +02:00
parent c9610778d4
commit fed76e47c7

View File

@ -1,7 +1,6 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, fetchpatch
, pytestCheckHook , pytestCheckHook
, pythonOlder , pythonOlder
, stdenv , stdenv
@ -33,7 +32,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "rasterio"; pname = "rasterio";
version = "1.3.9"; version = "1.3.10";
format = "pyproject"; format = "pyproject";
disabled = pythonOlder "3.8"; disabled = pythonOlder "3.8";
@ -42,25 +41,17 @@ buildPythonPackage rec {
owner = "rasterio"; owner = "rasterio";
repo = "rasterio"; repo = "rasterio";
rev = "refs/tags/${version}"; 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 = '' postPatch = ''
# remove useless import statement requiring distutils to be present at the runtime # remove useless import statement requiring distutils to be present at the runtime
substituteInPlace rasterio/rio/calc.py \ substituteInPlace rasterio/rio/calc.py \
--replace-fail "from distutils.version import LooseVersion" "" --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 = [ nativeBuildInputs = [
@ -104,12 +95,6 @@ buildPythonPackage rec {
shapely shapely
]; ];
# rio has runtime dependency on setuptools
setuptoolsPythonPath = [ setuptools ];
postInstall = ''
wrapPythonProgramsIn "$out/bin" "$out $setuptoolsPythonPath"
'';
doCheck = true; doCheck = true;
preCheck = '' preCheck = ''
@ -118,9 +103,6 @@ buildPythonPackage rec {
pytestFlagsArray = [ pytestFlagsArray = [
"-m 'not network'" "-m 'not network'"
# pytest.PytestRemovedIn8Warning: Passing None has been deprecated.
"-W ignore::pytest.PytestRemovedIn8Warning"
]; ];
disabledTests = [ disabledTests = [