python3Packages.onnxconverter-common: assert on 0.x versions

This commit is contained in:
Martin Weinelt
2026-07-18 11:58:30 +02:00
parent a9c8c18af0
commit e07c0a3e4f
@@ -11,16 +11,23 @@
onnxruntime,
}:
buildPythonPackage rec {
pname = "onnxconverter-common";
let
version = "1.16.0";
in
buildPythonPackage (finalAttrs: {
pname = "onnxconverter-common";
version =
# prevent downgrade to 0.x tags, only 1.x are releases
# https://pypi.org/project/onnxconverter-common/#history
assert (lib.versionAtLeast version "1.0");
version;
pyproject = true;
src = fetchFromGitHub {
owner = "microsoft";
repo = "onnxconverter-common";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-M62mbIqFwnPdRlf6J8DrNRhLH0uHns51K/pWnWLxI5Q=";
};
@@ -56,7 +63,7 @@ buildPythonPackage rec {
meta = {
description = "ONNX Converter and Optimization Tools";
homepage = "https://github.com/microsoft/onnxconverter-common";
changelog = "https://github.com/microsoft/onnxconverter-common/releases/tag/${src.tag}";
changelog = "https://github.com/microsoft/onnxconverter-common/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
};
}
})