Skip to content

Commit

Permalink
add linux config
Browse files Browse the repository at this point in the history
  • Loading branch information
jraymakers committed Jun 30, 2024
1 parent c92c1b5 commit e2190dc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions alt/bindings/binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@
'sources': ['src/duckdb_node_bindings.cpp'],
'include_dirs': ['<(module_root_dir)/libduckdb'],
'conditions': [
['OS=="linux"', {
'link_settings': {
'libraries': [
'-lduckdb',
'-L<(module_root_dir)/libduckdb',
'-Wl,-rpath,\'$$ORIGIN\'',
],
},
'copies': [
{
'files': ['<(module_root_dir)/libduckdb/libduckdb.so'],
'destination': 'package/lib',
},
],
}],
['OS=="mac"', {
'cflags+': ['-fvisibility=hidden'],
'xcode_settings': {
Expand Down
2 changes: 2 additions & 0 deletions alt/bindings/scripts/fetch_libduckdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
libduckdb_file_names = libduckdb_file_names_for_os[os_name]

libduckdb_zip_path = os.path.join(output_dir, "libduckdb.zip")
print("fetching: " + libduckdb_zip_url)
urllib.request.urlretrieve(libduckdb_zip_url, libduckdb_zip_path)

zip = zipfile.ZipFile(libduckdb_zip_path)

for file_name in libduckdb_file_names:
print("extracting: " + file_name)
zip.extract(file_name, output_dir)

0 comments on commit e2190dc

Please sign in to comment.