mirror of
https://github.com/nqrduck/LimeDriverBindings.git
synced 2024-09-29 09:00:35 +00:00
Enhance extension building in setup
Updated the `BuildExtCommand` class in `setup.py` to append `rpath` flags and link against `hdf5` libraries when building extensions. This ensures that the shared libraries are correctly located at runtime and resolves potential linkage issues with HDF5-related extensions for a smoother installation and deployment process.
This commit is contained in:
parent
75b7340354
commit
c0d1fbbf66
1 changed files with 7 additions and 0 deletions
7
setup.py
7
setup.py
|
@ -12,6 +12,13 @@ class BuildExtCommand(build_ext):
|
||||||
"""Custom build_ext command to ensure that the submodule is retrieved and built."""
|
"""Custom build_ext command to ensure that the submodule is retrieved and built."""
|
||||||
|
|
||||||
def build_extensions(self):
|
def build_extensions(self):
|
||||||
|
rpath_flags = ['-Wl,-rpath,/usr/lib/']
|
||||||
|
for ext in self.extensions:
|
||||||
|
ext.extra_compile_args = rpath_flags
|
||||||
|
ext.extra_link_args = rpath_flags
|
||||||
|
ext.libraries.extend(['hdf5', 'hdf5_cpp'])
|
||||||
|
build_ext.build_extensions(self)
|
||||||
|
|
||||||
super().build_extensions()
|
super().build_extensions()
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
Loading…
Reference in a new issue