Skip to content

Commit

Permalink
Enable pydoc to be built without library installed
Browse files Browse the repository at this point in the history
This fixes some pathing issues with the sphinx doc that previously
required the library to be installed before sphinx doc could be
correctly built. This fixes #547

Signed-off-by: Travis F. Collins <[email protected]>
  • Loading branch information
tfcollins committed Jun 8, 2020
1 parent 5c86f76 commit 192fa42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ if(WITH_DOC)
${CMAKE_CURRENT_SOURCE_DIR}/doc/conf.py.in
${CMAKE_CURRENT_SOURCE_DIR}/doc/conf.py)
add_custom_command(TARGET libiio-py POST_BUILD
COMMAND ${SPHINX_EXECUTABLE}
COMMAND ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_BINARY_DIR}"
${SPHINX_EXECUTABLE}
-b html
-n
-c ${CMAKE_CURRENT_SOURCE_DIR}/doc
Expand Down
4 changes: 2 additions & 2 deletions bindings/python/setup.py.cmakein
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class InstallWrapper(install):
destdir = os.getenv("DESTDIR", "")
if destdir:
destdir = os.path.join("${CMAKE_BINARY_DIR}", destdir)
out = find_recursive(destdir, "libiio.so")
_lib = _cdll(out, use_errno=True, use_last_error=True)
fulllibpath = find_recursive(destdir, "libiio.so")
_lib = _cdll(fulllibpath, use_errno=True, use_last_error=True)
else:
_lib = _cdll(find_library(_iiolib), use_errno=True, use_last_error=True)
if not _lib._name:
Expand Down

0 comments on commit 192fa42

Please sign in to comment.