Skip to content

Commit 70f17a8

Browse files
authored
Fix native_libs.txt (#16)
When building additional, auxiliary libraries they should receive proper handling in "native_libs.txt". Surprisingly, this only happens when a trailing `/` is added. Also, the primary module will then go into the package directory. Additional `RPATH`/`RUNPATH` handling for auxiliary, "native" libs is likely needed. E.g. on Linux/OSX: ``` '-DCMAKE_INSTALL_RPATH=$ORIGIN', '-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON', '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF', ``` while on Windows one can just keep a flat structure in the package, which will be in `%PATH%`.
1 parent 8818f49 commit 70f17a8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: setup.py

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ def run(self):
3333

3434
def build_extension(self, ext):
3535
extdir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name)))
36+
# required for auto-detection of auxiliary "native" libs
37+
if not extdir.endswith(os.path.sep):
38+
extdir += os.path.sep
39+
3640
cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir,
3741
'-DPYTHON_EXECUTABLE=' + sys.executable]
3842

0 commit comments

Comments
 (0)