提交 4d365f68 authored 作者: Ben Mares's avatar Ben Mares 提交者: Thomas Wiecki

Fix PyPy by eliminating deprecated library detection code

PyPy fails when handled here as a special case. For example, the correct value for libname may be "pypy3.9-c" and can be inferred from LDLIBRARY, but setting it to "pypy3-c" leads to failure with `ld: cannot find -lpypy3-c: No such file or directory`.
上级 4ee35881
......@@ -1750,13 +1750,6 @@ def std_lib_dirs_and_libs() -> Optional[tuple[list[str], ...]]:
# makes it unnecessary.
elif sys.platform == "darwin":
std_lib_dirs_and_libs.data = [], []
else:
if platform.python_implementation() == "PyPy":
# Assume Linux (note: Ubuntu doesn't ship this .so)
libname = "pypy3-c"
# Unfortunately the only convention of this .so is that it appears
# next to the location of the interpreter binary.
libdir = os.path.dirname(os.path.realpath(sys.executable))
else:
# Assume Linux
# Typical include directory: /usr/include/python2.6
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论