Commit 236d0b75 authored by pxinwr's avatar pxinwr Committed by Victor Stinner

bpo-31904: Don't build the _crypt extension on VxWorks (GH-12833)

parent 2430d532
...@@ -30,6 +30,8 @@ the :manpage:`crypt(3)` routine in the running system. Therefore, any ...@@ -30,6 +30,8 @@ the :manpage:`crypt(3)` routine in the running system. Therefore, any
extensions available on the current implementation will also be available on extensions available on the current implementation will also be available on
this module. this module.
.. availability:: Unix. Not available on VxWorks.
Hashing Methods Hashing Methods
--------------- ---------------
......
Don't build the ``_crypt`` extension on VxWorks.
...@@ -973,16 +973,17 @@ class PyBuildExt(build_ext): ...@@ -973,16 +973,17 @@ class PyBuildExt(build_ext):
def detect_crypt(self): def detect_crypt(self):
# crypt module. # crypt module.
if VXWORKS:
# bpo-31904: crypt() function is not provided by VxWorks.
# DES_crypt() OpenSSL provides is too weak to implement
# the encryption.
return
if self.compiler.find_library_file(self.lib_dirs, 'crypt'): if self.compiler.find_library_file(self.lib_dirs, 'crypt'):
libs = ['crypt'] libs = ['crypt']
else: else:
libs = [] libs = []
if not VXWORKS:
self.add(Extension('_crypt', ['_cryptmodule.c'],
libraries=libs))
elif self.compiler.find_library_file(self.lib_dirs, 'OPENSSL'):
libs = ['OPENSSL']
self.add(Extension('_crypt', ['_cryptmodule.c'], self.add(Extension('_crypt', ['_cryptmodule.c'],
libraries=libs)) libraries=libs))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment