improve python

pull/18/head
ruki 6 years ago
parent 5299d65bc0
commit aed4c6ec5c
No known key found for this signature in database
GPG Key ID: 33341DF9719963FA
  1. 8
      packages/p/python2/xmake.lua
  2. 3
      packages/s/skia/xmake.lua

@ -45,9 +45,15 @@ package("python2")
-- add openssl libs path for detecting -- add openssl libs path for detecting
io.gsub("setup.py", "/usr/local/ssl", package:dep("openssl"):installdir()) io.gsub("setup.py", "/usr/local/ssl", package:dep("openssl"):installdir())
-- allow python modules to use ctypes.find_library to find xmake's stuff
if is_host("macosx") then
io.gsub("Lib/ctypes/macholib/dyld.py", "DEFAULT_LIBRARY_FALLBACK = [", format("DEFAULT_LIBRARY_FALLBACK = [ '%s/lib',", package:installdir()))
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").install(package, configs, {envs = {PYTHONHOME = "", PYTHONPATH = ""}}) import("package.tools.autoconf").configure(package, configs, {envs = {PYTHONHOME = "", PYTHONPATH = ""}})
os.vrunv("make", {"install", "-j4", "PYTHONAPPSDIR=" .. package:installdir()})
end) end)
on_test(function (package) on_test(function (package)

@ -11,7 +11,6 @@ package("skia")
add_deps("python2", "ninja") add_deps("python2", "ninja")
on_install("macosx", "linux", "windows", function (package) on_install("macosx", "linux", "windows", function (package)
--os.vrun("git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git --depth 1")
local pathes = os.getenv("PATH") or "" local pathes = os.getenv("PATH") or ""
pathes = pathes .. path.envsep() .. path.join(os.curdir(), "depot_tools") pathes = pathes .. path.envsep() .. path.join(os.curdir(), "depot_tools")
pathes = pathes .. path.envsep() .. path.join(os.curdir(), "bin") pathes = pathes .. path.envsep() .. path.join(os.curdir(), "bin")
@ -41,7 +40,7 @@ package("skia")
for k, v in pairs(args) do for k, v in pairs(args) do
argstr = argstr .. ' ' .. k .. '=' .. tostring(v) argstr = argstr .. ' ' .. k .. '=' .. tostring(v)
end end
os.vrunv("python2", {"tools/git-sync-deps"})--, {envs = {PATH = pathes}}) os.vrun("python2 tools/git-sync-deps")
os.vrun("bin/gn gen build --args='%s'", argstr) os.vrun("bin/gn gen build --args='%s'", argstr)
os.vrun("ninja -C build") os.vrun("ninja -C build")
end) end)

Loading…
Cancel
Save