Browse Source

fix python for linux (#4869)

ruki 1 year ago
parent
commit
9d1ede210f
1 changed files with 5 additions and 0 deletions
  1. 5 0
      packages/p/python/xmake.lua

+ 5 - 0
packages/p/python/xmake.lua

@@ -237,6 +237,11 @@ package("python")
             os.mkdir(package:installdir("lib", pyver))
             os.mkdir(package:installdir("lib", pyver))
         end
         end
 
 
+        -- fix ssl module detect, e.g. gcc conftest.c -ldl   -lcrypto >&5
+        if package:is_plat("linux") then
+            io.replace("./configure", "-lssl -lcrypto", "-lssl -lcrypto -ldl", {plain = true})
+        end
+
         -- unset these so that installing pip and setuptools puts them where we want
         -- unset these so that installing pip and setuptools puts them where we want
         -- and not into some other Python the user has installed.
         -- and not into some other Python the user has installed.
         import("package.tools.autoconf").configure(package, configs, {envs = {PYTHONHOME = "", PYTHONPATH = ""}})
         import("package.tools.autoconf").configure(package, configs, {envs = {PYTHONHOME = "", PYTHONPATH = ""}})