Skip to content

Commit 192fa42

Browse files
committed
Enable pydoc to be built without library installed
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]>
1 parent 5c86f76 commit 192fa42

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

bindings/python/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ if(WITH_DOC)
4343
${CMAKE_CURRENT_SOURCE_DIR}/doc/conf.py.in
4444
${CMAKE_CURRENT_SOURCE_DIR}/doc/conf.py)
4545
add_custom_command(TARGET libiio-py POST_BUILD
46-
COMMAND ${SPHINX_EXECUTABLE}
46+
COMMAND ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_BINARY_DIR}"
47+
${SPHINX_EXECUTABLE}
4748
-b html
4849
-n
4950
-c ${CMAKE_CURRENT_SOURCE_DIR}/doc

bindings/python/setup.py.cmakein

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ class InstallWrapper(install):
6969
destdir = os.getenv("DESTDIR", "")
7070
if destdir:
7171
destdir = os.path.join("${CMAKE_BINARY_DIR}", destdir)
72-
out = find_recursive(destdir, "libiio.so")
73-
_lib = _cdll(out, use_errno=True, use_last_error=True)
72+
fulllibpath = find_recursive(destdir, "libiio.so")
73+
_lib = _cdll(fulllibpath, use_errno=True, use_last_error=True)
7474
else:
7575
_lib = _cdll(find_library(_iiolib), use_errno=True, use_last_error=True)
7676
if not _lib._name:

0 commit comments

Comments
 (0)