bpo-40656: Clean up detect_socket() (GH-20148)
This commit is contained in:
parent
d0d4a45067
commit
ccdcb20cbe
20
setup.py
20
setup.py
|
@ -1154,18 +1154,16 @@ class PyBuildExt(build_ext):
|
||||||
|
|
||||||
def detect_socket(self):
|
def detect_socket(self):
|
||||||
# socket(2)
|
# socket(2)
|
||||||
if not VXWORKS:
|
kwargs = {'depends': ['socketmodule.h']}
|
||||||
kwargs = {'depends': ['socketmodule.h']}
|
if VXWORKS:
|
||||||
if MACOS:
|
if not self.compiler.find_library_file(self.lib_dirs, 'net'):
|
||||||
# Issue #35569: Expose RFC 3542 socket options.
|
return
|
||||||
kwargs['extra_compile_args'] = ['-D__APPLE_USE_RFC_3542']
|
kwargs['libraries'] = ['net']
|
||||||
|
elif MACOS:
|
||||||
|
# Issue #35569: Expose RFC 3542 socket options.
|
||||||
|
kwargs['extra_compile_args'] = ['-D__APPLE_USE_RFC_3542']
|
||||||
|
|
||||||
self.add(Extension('_socket', ['socketmodule.c'], **kwargs))
|
self.add(Extension('_socket', ['socketmodule.c'], **kwargs))
|
||||||
elif self.compiler.find_library_file(self.lib_dirs, 'net'):
|
|
||||||
libs = ['net']
|
|
||||||
self.add(Extension('_socket', ['socketmodule.c'],
|
|
||||||
depends=['socketmodule.h'],
|
|
||||||
libraries=libs))
|
|
||||||
|
|
||||||
def detect_dbm_gdbm(self):
|
def detect_dbm_gdbm(self):
|
||||||
# Modules that provide persistent dictionary-like semantics. You will
|
# Modules that provide persistent dictionary-like semantics. You will
|
||||||
|
|
Loading…
Reference in New Issue