python3Packages.sagamaker: relax protobuf and attrs

This commit is contained in:
oxalica 2022-10-09 03:09:40 +08:00
parent 16b4c7f0ad
commit 53dfc2573b

View file

@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonRelaxDepsHook
, attrs
, boto3
, google-pasta
@ -27,6 +28,13 @@ buildPythonPackage rec {
hash = "sha256-hs71bIoByh5S1ncsku+y4X2i0yU65FknJE05lEmnru4=";
};
nativeBuildInputs = [ pythonRelaxDepsHook ];
pythonRelaxDeps = [
# FIXME: Remove when >= 2.111.0
"attrs"
"protobuf"
];
propagatedBuildInputs = [
attrs
boto3
@ -41,11 +49,6 @@ buildPythonPackage rec {
pandas
];
postPatch = ''
substituteInPlace setup.py \
--replace "attrs==20.3.0" "attrs>=20.3.0"
'';
postFixup = ''
[ "$($out/bin/sagemaker-upgrade-v2 --help 2>&1 | grep -cim1 'pandas failed to import')" -eq "0" ]
'';