summaryrefslogtreecommitdiff
path: root/dev-vcs/mercurial/files/mercurial-6.3.2-setup-rust-makedirs.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-28 20:52:36 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-28 20:52:36 +0000
commitbdf6e70da7a28f45617c02a251bb6b3844202bc5 (patch)
treecf66e5dcf53b2ee6842fd3ff4d24d52aa30cfebc /dev-vcs/mercurial/files/mercurial-6.3.2-setup-rust-makedirs.patch
parentd414c993cafd9e31a370c4a5aae042c710df2419 (diff)
gentoo auto-resync : 28:01:2023 - 20:52:36
Diffstat (limited to 'dev-vcs/mercurial/files/mercurial-6.3.2-setup-rust-makedirs.patch')
-rw-r--r--dev-vcs/mercurial/files/mercurial-6.3.2-setup-rust-makedirs.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/dev-vcs/mercurial/files/mercurial-6.3.2-setup-rust-makedirs.patch b/dev-vcs/mercurial/files/mercurial-6.3.2-setup-rust-makedirs.patch
new file mode 100644
index 000000000000..d2082ec6cd24
--- /dev/null
+++ b/dev-vcs/mercurial/files/mercurial-6.3.2-setup-rust-makedirs.patch
@@ -0,0 +1,30 @@
+# HG changeset patch
+# User Cédric Krier <ced@b2ck.com>
+# Date 1674932937 -3600
+# Sat Jan 28 20:08:57 2023 +0100
+# Node ID 65a97b8b1268169fecc21749b7472fd155bfb399
+# Parent a1123772333204cbeb766b17de8089a1d13d4a68
+# EXP-Topic setup-rust-build-makedirs-target
+Ensure target directory exists with building rust extension
+
+When the rust extension is the first to be build, the target directory may not
+exist so the copy fails.
+
+diff --git a/setup.py b/setup.py
+--- a/setup.py
++++ b/setup.py
+@@ -1454,11 +1454,13 @@ class RustStandaloneExtension(RustExtens
+ target = [target_dir]
+ target.extend(self.name.split('.'))
+ target[-1] += DYLIB_SUFFIX
++ target = os.path.join(*target)
++ os.makedirs(os.path.dirname(target), exist_ok=True)
+ shutil.copy2(
+ os.path.join(
+ self.rusttargetdir, self.dylibname + self.rustdylibsuffix()
+ ),
+- os.path.join(*target),
++ target,
+ )
+
+