FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

cmake: Support building nis module on system having libtirpc by jcfr · Pull Request #263 · python-cmake-buildsystem/python-cmake-buildsystem · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cmake  (1) .txt  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
4 changes: 4 additions & 0 deletions cmake/ConfigureChecks.cmake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ endif()
find_path(SQLITE3_INCLUDE_PATH sqlite3.h)
find_library(SQLITE3_LIBRARY sqlite3)

find_path(TIRPC_RPC_INCLUDE_PATH rpc.h PATHS "/usr/include/tirpc/rpc")
find_library(TIRPC_LIBRARY tirpc)

if(WIN32)
set(M_LIBRARIES )
set(HAVE_LIBM 1)
Expand Down Expand Up @@ -2495,3 +2498,4 @@ endif()
if(CMAKE_SYSTEM MATCHES Windows)
set(PY_PLATFORM win32)
endif()

18 changes: 17 additions & 1 deletion cmake/extensions/CMakeLists.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,23 @@ endif()
# UNIX-only extensions
add_python_extension(fcntl REQUIRES UNIX SOURCES fcntlmodule.c)
add_python_extension(grp REQUIRES UNIX SOURCES grpmodule.c)
add_python_extension(nis REQUIRES UNIX HAVE_LIBNSL SOURCES nismodule.c LIBRARIES ${HAVE_LIBNSL})

set(nis_REQUIRES UNIX HAVE_LIBNSL)
set(nis_LIBRARIES ${HAVE_LIBNSL})
set(nis_INCLUDEDIRS )
if(TIRPC_LIBRARY AND TIRPC_RPC_INCLUDE_PATH)
# if rpc.h is provided by libtirpc (instead of being provided by glibc). See python/cpython#5137
list(APPEND nis_REQUIRES )
list(APPEND nis_LIBRARIES ${TIRPC_LIBRARY})
list(APPEND nis_INCLUDEDIRS ${TIRPC_RPC_INCLUDE_PATH}/../)
endif()
add_python_extension(nis
REQUIRES ${nis_REQUIRES}
SOURCES nismodule.c
LIBRARIES ${nis_LIBRARIES}
INCLUDEDIRS ${nis_INCLUDEDIRS}
)

add_python_extension(posix REQUIRES UNIX BUILTIN SOURCES posixmodule.c)
add_python_extension(pwd REQUIRES UNIX BUILTIN SOURCES pwdmodule.c) # this is needed to find out the user's home dir if $HOME is not set
add_python_extension(resource REQUIRES UNIX SOURCES resource.c)
Expand Down

Back | FazBrowse Home | New Git URL