bpo-31904: Don't build the _crypt extension on VxWorks (GH-12833) · python/cpython@236d0b7 (original) (raw)

3 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -30,6 +30,8 @@ the :manpage:`crypt(3)` routine in the running system. Therefore, any
30 30 extensions available on the current implementation will also be available on
31 31 this module.
32 32
33 +.. availability:: Unix. Not available on VxWorks.
34 +
33 35 Hashing Methods
34 36 ---------------
35 37
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 +Don't build the ``_crypt`` extension on VxWorks.
Original file line number Diff line number Diff line change
@@ -973,17 +973,18 @@ def detect_readline_curses(self):
973 973
974 974 def detect_crypt(self):
975 975 # crypt module.
976 +if VXWORKS:
977 +# bpo-31904: crypt() function is not provided by VxWorks.
978 +# DES_crypt() OpenSSL provides is too weak to implement
979 +# the encryption.
980 +return
981 +
976 982 if self.compiler.find_library_file(self.lib_dirs, 'crypt'):
977 983 libs = ['crypt']
978 984 else:
979 985 libs = []
980 986
981 -if not VXWORKS:
982 -self.add(Extension('_crypt', ['_cryptmodule.c'],
983 -libraries=libs))
984 -elif self.compiler.find_library_file(self.lib_dirs, 'OPENSSL'):
985 -libs = ['OPENSSL']
986 -self.add(Extension('_crypt', ['_cryptmodule.c'],
987 +self.add(Extension('_crypt', ['_cryptmodule.c'],
987 988 libraries=libs))
988 989
989 990 def detect_socket(self):