python312Packages.kornia-rs: use fetchCargoVendor (#391871)
This commit is contained in:
-1598
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,6 @@
|
||||
rustPlatform,
|
||||
cmake,
|
||||
nasm,
|
||||
replaceVars,
|
||||
libiconv,
|
||||
}:
|
||||
|
||||
@@ -32,18 +31,15 @@ buildPythonPackage rec {
|
||||
buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv;
|
||||
|
||||
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 = [
|
||||
(replaceVars ./kornia-rs-from-crates.patch {
|
||||
inherit version;
|
||||
})
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
cp ${./Cargo.lock} py-kornia/Cargo.lock
|
||||
'';
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit
|
||||
pname
|
||||
version
|
||||
src
|
||||
cargoRoot
|
||||
;
|
||||
hash = "sha256-VQtPfTmT9UGM0fIMeZF/1lUqQeyP63naoYZ7UuL6hFg=";
|
||||
};
|
||||
|
||||
maturinBuildFlags = [
|
||||
"-m"
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
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" }
|
||||
Reference in New Issue
Block a user