Skip to content

Commit 236d0b7

Browse files
pxinwrvstinner
authored andcommitted
bpo-31904: Don't build the _crypt extension on VxWorks (GH-12833)
1 parent 2430d53 commit 236d0b7

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

Doc/library/crypt.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ the :manpage:`crypt(3)` routine in the running system. Therefore, any
3030
extensions available on the current implementation will also be available on
3131
this module.
3232

33+
.. availability:: Unix. Not available on VxWorks.
34+
3335
Hashing Methods
3436
---------------
3537

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Don't build the ``_crypt`` extension on VxWorks.

setup.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -973,17 +973,18 @@ def detect_readline_curses(self):
973973

974974
def detect_crypt(self):
975975
# 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+
976982
if self.compiler.find_library_file(self.lib_dirs, 'crypt'):
977983
libs = ['crypt']
978984
else:
979985
libs = []
980986

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'],
987988
libraries=libs))
988989

989990
def detect_socket(self):

0 commit comments

Comments
 (0)