-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed as not planned
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixesbuildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
On some platforms, e.g. NetBSD, building _crypt
module needs linking against libcrypt. It semms like libcrypt detection has been removed from Python 3.11.0's setup.py
, while still present in Python 3.10.8.
Your environment
- CPython versions tested on: 3.11.0
- Operating system and architecture: NetBSD 9.2, NetBSD-current
Fix
I copied the appropriate section of setup.py
from Python 3.10.8, and now the building works correctly.
--- setup.py.orig 2022-10-24 17:35:39.000000000 +0000
+++ setup.py
@@ -1176,7 +1194,11 @@ class PyBuildExt(build_ext):
self.missing.append('_curses_panel')
def detect_crypt(self):
- self.addext(Extension('_crypt', ['_cryptmodule.c']))
+ if self.compiler.find_library_file(self.lib_dirs, 'crypt'):
+ libs = ['crypt']
+ else:
+ libs = []
+ self.addext(Extension('_crypt', ['_cryptmodule.c'], libraries=libs))
def detect_dbm_gdbm(self):
# Modules that provide persistent dictionary-like semantics. You will
Metadata
Metadata
Assignees
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixesbuildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error