Merge pull request #297876 from chpatrick/kornia-0.7.2

python311Packages.kornia: 0.7.1 -> 0.7.2
This commit is contained in:
Niklas Hambüchen
2024-04-29 00:44:25 +02:00
committed by GitHub
5 changed files with 1672 additions and 3 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,56 @@
{ lib
, fetchFromGitHub
, buildPythonPackage
, rustPlatform
, cmake
, nasm
, substituteAll
}:
buildPythonPackage rec {
pname = "kornia-rs";
version = "0.1.2";
pyproject = true;
src = fetchFromGitHub {
owner = "kornia";
repo = "kornia-rs";
rev = "refs/tags/v${version}";
hash = "sha256-7toCMaHzFAzm6gThVLBxKLgQVgFJatdJseDlfdeS8RE=";
};
nativeBuildInputs = [
rustPlatform.maturinBuildHook
rustPlatform.cargoSetupHook
cmake # Only for dependencies.
nasm # Only for dependencies.
];
cargoRoot = "py-kornia";
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
};
# The path dependency doesn't vendor the dependencies correctly, so get kornia-rs from crates instead.
patches = [
(substituteAll {
src = ./kornia-rs-from-crates.patch;
inherit version;
})
];
prePatch = ''
cp ${./Cargo.lock} py-kornia/Cargo.lock
'';
maturinBuildFlags = [ "-m" "py-kornia/Cargo.toml" ];
dontUseCmakeConfigure = true; # We only want to use CMake to build some Rust dependencies.
meta = with lib; {
homepage = "https://github.com/kornia/kornia-rs";
description = "Python bindings to Low-level Computer Vision library in Rust";
license = licenses.asl20;
maintainers = with maintainers; [ chpatrick ];
};
}
@@ -0,0 +1,12 @@
diff --git a/py-kornia/Cargo.toml b/py-kornia/Cargo.toml
index e0563f3..e192654 100644
--- a/py-kornia/Cargo.toml
+++ b/py-kornia/Cargo.toml
@@ -9,6 +9,6 @@ crate-type = ["cdylib"]
[dependencies]
anyhow = "1.0.80"
-kornia-rs = { path = ".." }
+kornia-rs = { version = "@version@" }
pyo3 = { version = "0.20", features = ["extension-module"] }
numpy = { version = "0.20.0" }
@@ -4,11 +4,12 @@
, pythonOlder
, packaging
, torch
, kornia-rs
}:
buildPythonPackage rec {
pname = "kornia";
version = "0.7.1";
version = "0.7.2";
format = "pyproject";
disabled = pythonOlder "3.8";
@@ -17,10 +18,11 @@ buildPythonPackage rec {
owner = pname;
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-gHMrA4Uzazpw4TdswrXdoZG4+ek5g+wtLXNmhH3SlOM=";
hash = "sha256-DmXttvKoLqny0mt3SUonidNxDkNX7N0LdTxy/H32R/4=";
};
propagatedBuildInputs = [
kornia-rs
packaging
torch
];
@@ -39,7 +41,6 @@ buildPythonPackage rec {
"kornia.metrics"
"kornia.morphology"
"kornia.tracking"
"kornia.testing"
"kornia.utils"
];
+2
View File
@@ -6415,6 +6415,8 @@ self: super: with self; {
kornia = callPackage ../development/python-modules/kornia { };
kornia-rs = callPackage ../development/python-modules/kornia-rs { };
krakenex = callPackage ../development/python-modules/krakenex { };
krfzf-py = callPackage ../development/python-modules/krfzf-py { };