Browse Source

improve python

ruki 3 years ago
parent
commit
0d7b67b66c
3 changed files with 8 additions and 5 deletions
  1. 1 5
      packages/p/pcre/xmake.lua
  2. 3 0
      packages/p/python/xmake.lua
  3. 4 0
      packages/p/python2/xmake.lua

+ 1 - 5
packages/p/pcre/xmake.lua

@@ -41,11 +41,7 @@ package("pcre")
 
     on_install("macosx", "linux", "mingw", function (package)
         local configs = {}
-        if package:config("shared") then
-            table.insert(configs, "--enable-shared=yes")
-        else
-            table.insert(configs, "--enable-shared=no")
-        end
+        table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
         if package:config("jit") then
             table.insert(configs, "--enable-jit")
         end

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

@@ -95,6 +95,9 @@ package("python")
         table.insert(configs, "--datadir=" .. package:installdir("share"))
         table.insert(configs, "--datarootdir=" .. package:installdir("share"))
         table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
+        if package:is_plat("linux") and package:config("pic") ~= false then
+            table.insert(configs, "--with-pic")
+        end
 
         -- add openssl libs path for detecting
         local openssl_dir

+ 4 - 0
packages/p/python2/xmake.lua

@@ -78,6 +78,10 @@ package("python2")
         local configs = {"--enable-ipv6", "--with-ensurepip"}
         table.insert(configs, "--datadir=" .. package:installdir("share"))
         table.insert(configs, "--datarootdir=" .. package:installdir("share"))
+        table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
+        if package:is_plat("linux") and package:config("pic") ~= false then
+            table.insert(configs, "--with-pic")
+        end
 
         -- add openssl libs path for detecting
         local openssl_dir