Skip to content

Commit

Permalink
Fix packaging error if bin directory doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
dean0x7d committed Nov 17, 2023
1 parent 250377b commit 0b81000
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0b81000

Please sign in to comment.