Skip to content

Commit

Permalink
_scproxy: Fix link error when building extension as builtin on macOS
Browse files Browse the repository at this point in the history
This commit adds "CoreFoundation" dependency originally introduced in
python/cpython@8415120af (for issue 7154: Port the code that uses the
SystemConfiguration framework to detect the proxy settings on OSX from
the trunk to python 3.2)
  • Loading branch information
shakfu authored and jcfr committed Jul 3, 2023
1 parent 1061200 commit 3b745d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmake/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ if(LIBUTIL_EXPECTED)
endif()

if(APPLE)
find_library(HAVE_LIBCOREFOUNDATION CoreFoundation)
find_library(HAVE_LIBSYSTEMCONFIGURATION SystemConfiguration)
endif()

Expand Down
4 changes: 2 additions & 2 deletions cmake/extensions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ add_python_extension(_posixsubprocess REQUIRES IS_PY3 UNIX SOURCES _posixsubproc
set(_scproxy2_SOURCES ${SRC_DIR}/Mac/Modules/_scproxy.c)
set(_scproxy3_SOURCES ${SRC_DIR}/Modules/_scproxy.c)
add_python_extension(_scproxy
REQUIRES APPLE HAVE_LIBSYSTEMCONFIGURATION
REQUIRES APPLE HAVE_LIBCOREFOUNDATION HAVE_LIBSYSTEMCONFIGURATION
SOURCES ${_scproxy${PY_VERSION_MAJOR}_SOURCES}
LIBRARIES ${HAVE_LIBSYSTEMCONFIGURATION}
LIBRARIES ${HAVE_LIBSYSTEMCONFIGURATION} ${HAVE_LIBCOREFOUNDATION}
)

# Linux-only extensions
Expand Down

0 comments on commit 3b745d5

Please sign in to comment.