[Python-checkins] bpo-31904: Don't build the _crypt extension on VxWorks (GH-12833)
Victor Stinner
webhook-mailer at python.org
Mon Apr 15 05:02:35 EDT 2019
https://github.com/python/cpython/commit/236d0b75c41449a266201c683b4b0d6acdee02df
commit: 236d0b75c41449a266201c683b4b0d6acdee02df
branch: master
author: pxinwr <peixing.xin at windriver.com>
committer: Victor Stinner <vstinner at redhat.com>
date: 2019-04-15T11:02:20+02:00
summary:
bpo-31904: Don't build the _crypt extension on VxWorks (GH-12833)
files:
A Misc/NEWS.d/next/Build/2019-04-15-15-01-29.bpo-31904.38fdkg.rst
M Doc/library/crypt.rst
M setup.py
diff --git a/Doc/library/crypt.rst b/Doc/library/crypt.rst
index 43d4b5b749e4..d25c626a1758 100644
--- a/Doc/library/crypt.rst
+++ b/Doc/library/crypt.rst
@@ -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
this module.
+.. availability:: Unix. Not available on VxWorks.
+
Hashing Methods
---------------
diff --git a/Misc/NEWS.d/next/Build/2019-04-15-15-01-29.bpo-31904.38fdkg.rst b/Misc/NEWS.d/next/Build/2019-04-15-15-01-29.bpo-31904.38fdkg.rst
new file mode 100644
index 000000000000..c82636ed7b5b
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2019-04-15-15-01-29.bpo-31904.38fdkg.rst
@@ -0,0 +1 @@
+Don't build the ``_crypt`` extension on VxWorks.
diff --git a/setup.py b/setup.py
index 30caed5b51c1..9c83914fd907 100644
--- a/setup.py
+++ b/setup.py
@@ -973,17 +973,18 @@ def detect_readline_curses(self):
def detect_crypt(self):
# 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'):
libs = ['crypt']
else:
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))
def detect_socket(self):
More information about the Python-checkins
mailing list