@@ -773,11 +773,20 @@ def detect_modules(self):
773
773
if (config_h_vars .get ('FLOCK_NEEDS_LIBBSD' , False )):
774
774
# May be necessary on AIX for flock function
775
775
libs = ['bsd' ]
776
- exts .append ( Extension ('fcntl' , ['fcntlmodule.c' ], libraries = libs ) )
776
+ if not host_platform .startswith (('mingw' , 'win' )):
777
+ exts .append ( Extension ('fcntl' , ['fcntlmodule.c' ], libraries = libs ) )
778
+ else :
779
+ missing .append ('fcntl' )
777
780
# pwd(3)
778
- exts .append ( Extension ('pwd' , ['pwdmodule.c' ]) )
781
+ if not host_platform .startswith (('mingw' , 'win' )):
782
+ exts .append ( Extension ('pwd' , ['pwdmodule.c' ]) )
783
+ else :
784
+ missing .append ('pwd' )
779
785
# grp(3)
780
- exts .append ( Extension ('grp' , ['grpmodule.c' ]) )
786
+ if not host_platform .startswith (('mingw' , 'win' )):
787
+ exts .append ( Extension ('grp' , ['grpmodule.c' ]) )
788
+ else :
789
+ missing .append ('grp' )
781
790
# spwd, shadow passwords
782
791
if (config_h_vars .get ('HAVE_GETSPNAM' , False ) or
783
792
config_h_vars .get ('HAVE_GETSPENT' , False )):
@@ -800,7 +809,10 @@ def detect_modules(self):
800
809
801
810
# Lance Ellinghaus's syslog module
802
811
# syslog daemon interface
803
- exts .append ( Extension ('syslog' , ['syslogmodule.c' ]) )
812
+ if not host_platform .startswith (('mingw' , 'win' )):
813
+ exts .append ( Extension ('syslog' , ['syslogmodule.c' ]) )
814
+ else :
815
+ missing .append ('syslog' )
804
816
805
817
# Fuzz tests.
806
818
exts .append ( Extension (
@@ -910,17 +922,23 @@ def detect_modules(self):
910
922
911
923
# crypt module.
912
924
913
- if self .compiler .find_library_file (lib_dirs , 'crypt' ):
914
- libs = ['crypt' ]
925
+ if not host_platform .startswith (('mingw' , 'win' )):
926
+ if self .compiler .find_library_file (lib_dirs , 'crypt' ):
927
+ libs = ['crypt' ]
928
+ else :
929
+ libs = []
930
+ exts .append ( Extension ('_crypt' , ['_cryptmodule.c' ], libraries = libs ) )
915
931
else :
916
- libs = []
917
- exts .append ( Extension ('_crypt' , ['_cryptmodule.c' ], libraries = libs ) )
932
+ missing .append ('_crypt' )
918
933
919
934
# CSV files
920
935
exts .append ( Extension ('_csv' , ['_csv.c' ]) )
921
936
922
937
# POSIX subprocess module helper.
923
- exts .append ( Extension ('_posixsubprocess' , ['_posixsubprocess.c' ]) )
938
+ if not host_platform .startswith (('mingw' , 'win' )):
939
+ exts .append ( Extension ('_posixsubprocess' , ['_posixsubprocess.c' ]) )
940
+ else :
941
+ missing .append ('_posixsubprocess' )
924
942
925
943
# socket(2)
926
944
socket_libs = []
0 commit comments