Skip to content

Commit

Permalink
Updated cffi bindings for proper darwin support
Browse files Browse the repository at this point in the history
  • Loading branch information
Koeng101 committed Aug 11, 2024
1 parent f02499a commit 9fd4264
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion py/dnadesign/cffi_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@

# Build the path to definitions.h and libdnadesign relative to the current script
definitions_path = os.path.join(current_dir, 'definitions.h')
lib_path = os.path.join(current_dir, 'libdnadesign.so')

# Determine the correct library name based on the operating system
if sys.platform.startswith('win'):
lib_name = 'libdnadesign.dll'
elif sys.platform.startswith('darwin'):
lib_name = 'libdnadesign.dylib'
else:
lib_name = 'libdnadesign.so'

lib_path = os.path.join(current_dir, lib_name)

# Read the C declarations from an external file
with open(definitions_path, 'r') as f:
Expand Down

0 comments on commit 9fd4264

Please sign in to comment.