mirror of https://github.com/python/cpython
bpo-45847: Port _scproxy to PY_STDLIB_MOD (GH-29644)
This commit is contained in:
parent
be36e06340
commit
5596909eac
|
@ -267,8 +267,8 @@ PYTHONPATH=$(COREPYTHONPATH)
|
||||||
#_curses -lncurses -lncursesw -ltermcap _cursesmodule.c
|
#_curses -lncurses -lncursesw -ltermcap _cursesmodule.c
|
||||||
#_curses_panel -lpanel -lncurses _curses_panel.c
|
#_curses_panel -lpanel -lncurses _curses_panel.c
|
||||||
|
|
||||||
# macOS specific modules
|
# macOS specific module, needs SystemConfiguration and CoreFoundation framework
|
||||||
# _scproxy _scproxy.c -framework SystemConfiguration -framework CoreFoundation
|
# _scproxy _scproxy.c
|
||||||
|
|
||||||
# Examples
|
# Examples
|
||||||
|
|
||||||
|
|
|
@ -69,3 +69,10 @@
|
||||||
# Modules with third party dependencies
|
# Modules with third party dependencies
|
||||||
#
|
#
|
||||||
@MODULE__SQLITE3_TRUE@_sqlite3 _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c
|
@MODULE__SQLITE3_TRUE@_sqlite3 _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c
|
||||||
|
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
# macOS specific modules
|
||||||
|
|
||||||
|
# _scproxy needs SystemConfiguration and CoreFoundation framework
|
||||||
|
@MODULE__SCPROXY_TRUE@_scproxy _scproxy.c
|
||||||
|
|
|
@ -644,6 +644,8 @@ MODULE__ELEMENTTREE_FALSE
|
||||||
MODULE__ELEMENTTREE_TRUE
|
MODULE__ELEMENTTREE_TRUE
|
||||||
MODULE_PYEXPAT_FALSE
|
MODULE_PYEXPAT_FALSE
|
||||||
MODULE_PYEXPAT_TRUE
|
MODULE_PYEXPAT_TRUE
|
||||||
|
MODULE__SCPROXY_FALSE
|
||||||
|
MODULE__SCPROXY_TRUE
|
||||||
MODULE_OSSAUDIODEV_FALSE
|
MODULE_OSSAUDIODEV_FALSE
|
||||||
MODULE_OSSAUDIODEV_TRUE
|
MODULE_OSSAUDIODEV_TRUE
|
||||||
MODULE__DATETIME_FALSE
|
MODULE__DATETIME_FALSE
|
||||||
|
@ -19588,6 +19590,56 @@ fi
|
||||||
$as_echo "$py_cv_module_ossaudiodev" >&6; }
|
$as_echo "$py_cv_module_ossaudiodev" >&6; }
|
||||||
|
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _scproxy" >&5
|
||||||
|
$as_echo_n "checking for stdlib extension module _scproxy... " >&6; }
|
||||||
|
case $py_stdlib_not_available in #(
|
||||||
|
*_scproxy*) :
|
||||||
|
py_cv_module__scproxy=n/a ;; #(
|
||||||
|
*) :
|
||||||
|
|
||||||
|
if test "$ac_sys_system" = "Darwin"; then :
|
||||||
|
if true; then :
|
||||||
|
py_cv_module__scproxy=yes
|
||||||
|
else
|
||||||
|
py_cv_module__scproxy=missing
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
py_cv_module__scproxy=disabled
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
as_fn_append MODULE_BLOCK "MODULE__SCPROXY=$py_cv_module__scproxy$as_nl"
|
||||||
|
if test "x$py_cv_module__scproxy" = xyes; then :
|
||||||
|
|
||||||
|
as_fn_append MODULE_BLOCK "MODULE__SCPROXY_CFLAGS=$as_nl"
|
||||||
|
as_fn_append MODULE_BLOCK "MODULE__SCPROXY_LDFLAGS=-framework SystemConfiguration -framework CoreFoundation$as_nl"
|
||||||
|
if true; then
|
||||||
|
MODULE__SCPROXY_TRUE=
|
||||||
|
MODULE__SCPROXY_FALSE='#'
|
||||||
|
else
|
||||||
|
MODULE__SCPROXY_TRUE='#'
|
||||||
|
MODULE__SCPROXY_FALSE=
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
if false; then
|
||||||
|
MODULE__SCPROXY_TRUE=
|
||||||
|
MODULE__SCPROXY_FALSE='#'
|
||||||
|
else
|
||||||
|
MODULE__SCPROXY_TRUE='#'
|
||||||
|
MODULE__SCPROXY_FALSE=
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $py_cv_module__scproxy" >&5
|
||||||
|
$as_echo "$py_cv_module__scproxy" >&6; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module pyexpat" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module pyexpat" >&5
|
||||||
$as_echo_n "checking for stdlib extension module pyexpat... " >&6; }
|
$as_echo_n "checking for stdlib extension module pyexpat... " >&6; }
|
||||||
|
@ -20231,6 +20283,14 @@ if test -z "${MODULE_OSSAUDIODEV_TRUE}" && test -z "${MODULE_OSSAUDIODEV_FALSE}"
|
||||||
as_fn_error $? "conditional \"MODULE_OSSAUDIODEV\" was never defined.
|
as_fn_error $? "conditional \"MODULE_OSSAUDIODEV\" was never defined.
|
||||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
fi
|
fi
|
||||||
|
if test -z "${MODULE__SCPROXY_TRUE}" && test -z "${MODULE__SCPROXY_FALSE}"; then
|
||||||
|
as_fn_error $? "conditional \"MODULE__SCPROXY\" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
|
fi
|
||||||
|
if test -z "${MODULE__SCPROXY_TRUE}" && test -z "${MODULE__SCPROXY_FALSE}"; then
|
||||||
|
as_fn_error $? "conditional \"MODULE__SCPROXY\" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
|
fi
|
||||||
if test -z "${MODULE_PYEXPAT_TRUE}" && test -z "${MODULE_PYEXPAT_FALSE}"; then
|
if test -z "${MODULE_PYEXPAT_TRUE}" && test -z "${MODULE_PYEXPAT_FALSE}"; then
|
||||||
as_fn_error $? "conditional \"MODULE_PYEXPAT\" was never defined.
|
as_fn_error $? "conditional \"MODULE_PYEXPAT\" was never defined.
|
||||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
|
|
|
@ -6062,6 +6062,9 @@ PY_STDLIB_MOD_SIMPLE([_datetime], [], [$TIMEMODULE_LIB $LIBM])
|
||||||
dnl platform specific extensions
|
dnl platform specific extensions
|
||||||
PY_STDLIB_MOD([ossaudiodev],
|
PY_STDLIB_MOD([ossaudiodev],
|
||||||
[], [test "$ac_cv_header_linux_soundcard_h" = yes -o "$ac_cv_header_sys_soundcard_h" = yes])
|
[], [test "$ac_cv_header_linux_soundcard_h" = yes -o "$ac_cv_header_sys_soundcard_h" = yes])
|
||||||
|
PY_STDLIB_MOD([_scproxy],
|
||||||
|
[test "$ac_sys_system" = "Darwin"], [],
|
||||||
|
[], [-framework SystemConfiguration -framework CoreFoundation])
|
||||||
|
|
||||||
dnl _elementtree loads libexpat via CAPI hook in pyexpat
|
dnl _elementtree loads libexpat via CAPI hook in pyexpat
|
||||||
PY_STDLIB_MOD([pyexpat], [], [], [$LIBEXPAT_CFLAGS], [$LIBEXPAT_LDFLAGS])
|
PY_STDLIB_MOD([pyexpat], [], [], [$LIBEXPAT_CFLAGS], [$LIBEXPAT_LDFLAGS])
|
||||||
|
|
7
setup.py
7
setup.py
|
@ -1389,11 +1389,8 @@ class PyBuildExt(build_ext):
|
||||||
# linux/soundcard.h or sys/soundcard.h
|
# linux/soundcard.h or sys/soundcard.h
|
||||||
self.addext(Extension('ossaudiodev', ['ossaudiodev.c']))
|
self.addext(Extension('ossaudiodev', ['ossaudiodev.c']))
|
||||||
|
|
||||||
if MACOS:
|
# macOS-only, needs SystemConfiguration and CoreFoundation framework
|
||||||
self.add(Extension('_scproxy', ['_scproxy.c'],
|
self.addext(Extension('_scproxy', ['_scproxy.c']))
|
||||||
extra_link_args=[
|
|
||||||
'-framework', 'SystemConfiguration',
|
|
||||||
'-framework', 'CoreFoundation']))
|
|
||||||
|
|
||||||
def detect_compress_exts(self):
|
def detect_compress_exts(self):
|
||||||
# Andrew Kuchling's zlib module.
|
# Andrew Kuchling's zlib module.
|
||||||
|
|
Loading…
Reference in New Issue