python3.pkgs.tensorboardx: fix build

This commit is contained in:
Jörg Thalheim 2022-10-02 16:52:06 +02:00
parent 8cefc55ae4
commit 16b9b0e181

View file

@ -33,6 +33,10 @@ buildPythonPackage rec {
substituteInPlace tensorboardX/pytorch_graph.py --replace \
"torch.onnx.set_training(model, False)" \
"torch.onnx.select_model_mode_for_export(model, torch.onnx.TrainingMode.EVAL)"
# Version detection seems broken here, the version reported by python is
# newer than the protobuf package itself.
sed -i -e "s/'protobuf[^']*'/'protobuf'/" setup.py
'';
# Wanted protobuf version is mentioned here: