Skip to content

Commit

Permalink
Update setup.py
Browse files Browse the repository at this point in the history
Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com>
  • Loading branch information
josephleekl and AmintorDusko authored Oct 18, 2024
1 parent ebb7ac8 commit 83c948e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,9 @@ 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"):
if platform.system() == "Linux":
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() == "Darwin":
source = os.path.join(f"{extdir}", f"lib{backend}_catalyst.dylib")
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)

Expand Down

0 comments on commit 83c948e

Please sign in to comment.