python3Packages.rasterio: don't propagate setuptools

This commit is contained in:
Ivan Mincik 2024-04-06 20:01:33 +02:00
parent 273c2dee78
commit 5e7b94d64b
1 changed files with 11 additions and 1 deletions

View File

@ -54,6 +54,12 @@ buildPythonPackage rec {
})
];
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" ""
'';
nativeBuildInputs = [
cython_3
gdal
@ -71,7 +77,6 @@ buildPythonPackage rec {
click-plugins
cligj
numpy
setuptools
snuggs
];
@ -96,6 +101,11 @@ buildPythonPackage rec {
shapely
];
# rio has runtime dependency on setuptools
setuptoolsPythonPath = [ setuptools ];
postInstall = ''
wrapPythonProgramsIn "$out/bin" "$out $setuptoolsPythonPath"
'';
doCheck = true;
preCheck = ''