File tree 1 file changed +10
-12
lines changed
1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -1154,18 +1154,16 @@ def detect_crypt(self):
1154
1154
1155
1155
def detect_socket (self ):
1156
1156
# socket(2)
1157
- if not VXWORKS :
1158
- kwargs = {'depends' : ['socketmodule.h' ]}
1159
- if MACOS :
1160
- # Issue #35569: Expose RFC 3542 socket options.
1161
- kwargs ['extra_compile_args' ] = ['-D__APPLE_USE_RFC_3542' ]
1162
-
1163
- self .add (Extension ('_socket' , ['socketmodule.c' ], ** kwargs ))
1164
- elif self .compiler .find_library_file (self .lib_dirs , 'net' ):
1165
- libs = ['net' ]
1166
- self .add (Extension ('_socket' , ['socketmodule.c' ],
1167
- depends = ['socketmodule.h' ],
1168
- libraries = libs ))
1157
+ kwargs = {'depends' : ['socketmodule.h' ]}
1158
+ if VXWORKS :
1159
+ if not self .compiler .find_library_file (self .lib_dirs , 'net' ):
1160
+ return
1161
+ kwargs ['libraries' ] = ['net' ]
1162
+ elif MACOS :
1163
+ # Issue #35569: Expose RFC 3542 socket options.
1164
+ kwargs ['extra_compile_args' ] = ['-D__APPLE_USE_RFC_3542' ]
1165
+
1166
+ self .add (Extension ('_socket' , ['socketmodule.c' ], ** kwargs ))
1169
1167
1170
1168
def detect_dbm_gdbm (self ):
1171
1169
# Modules that provide persistent dictionary-like semantics. You will
You can’t perform that action at this time.
0 commit comments