Skip to content

Commit

Permalink
Merge branch 'master' into lk-control-base
Browse files Browse the repository at this point in the history
  • Loading branch information
josephleekl authored Oct 18, 2024
2 parents d1068f1 + c719ac7 commit d5ae740
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@

### Bug fixes

* Fix build failure for Lightning-Kokkos editable installation on MacOS due to `liblightning_kokkos_catalyst.so` copy.
[(#947)](https://github.com/PennyLaneAI/pennylane-lightning/pull/947)

* Fix missing `liblightning_kokkos_catalyst.so` in Lightning-Kokkos editable installation.
[(#945)](https://github.com/PennyLaneAI/pennylane-lightning/pull/945)

Expand Down
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,11 @@ def build_extension(self, ext: CMakeExtension):

# Ensure that catalyst shared object is copied to the build directory for pip editable install
if backend in ("lightning_kokkos"):
source = os.path.join(f"{extdir}", f"lib{backend}_catalyst.so")
destination = os.path.join(os.getcwd(), "build")
shutil.copy(source, destination)
if platform.system() in ["Linux", "Darwin"]:
shared_lib_ext = {"Linux": ".so", "Darwin": ".dylib"}[platform.system()]
source = os.path.join(f"{extdir}", f"lib{backend}_catalyst{shared_lib_ext}")
destination = os.path.join(os.getcwd(), "build")
shutil.copy(source, destination)

with open(os.path.join("pennylane_lightning", "core", "_version.py"), encoding="utf-8") as f:
version = f.readlines()[-1].split()[-1].strip("\"'")
Expand Down

0 comments on commit d5ae740

Please sign in to comment.