From 0b810008ab6bd993a7d5ff362fbbb6606ded996c Mon Sep 17 00:00:00 2001 From: Dean Moldovan Date: Fri, 17 Nov 2023 10:03:27 +0100 Subject: [PATCH] Fix packaging error if `bin` directory doesn't exist --- core/conanfile.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/conanfile.py b/core/conanfile.py index 8b4c86a..64018fb 100644 --- a/core/conanfile.py +++ b/core/conanfile.py @@ -279,9 +279,11 @@ def _isolate(self, prefix): with open(prefix / f"python{self.short_pyversion}._pth", "w") as f: f.write("\n".join(paths)) + bin_dir = prefix / "bin" + bin_dir.mkdir(parents=True, exist_ok=True) py_exe = f"python{self.short_pyversion}" - os.symlink(f"../{py_exe}", prefix / f"bin/{py_exe}") - os.symlink(f"../{py_exe}", prefix / f"bin/python3") + os.symlink(f"../{py_exe}", bin_dir / py_exe) + os.symlink(f"../{py_exe}", bin_dir / "python3") def package(self): src = self.build_folder