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
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
-- 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)
on_test(function (package)

@ -11,7 +11,6 @@ package("skia")
add_deps("python2", "ninja")
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 ""
pathes = pathes .. path.envsep() .. path.join(os.curdir(), "depot_tools")
pathes = pathes .. path.envsep() .. path.join(os.curdir(), "bin")
@ -41,7 +40,7 @@ package("skia")
for k, v in pairs(args) do
argstr = argstr .. ' ' .. k .. '=' .. tostring(v)
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("ninja -C build")
end)

Loading…
Cancel
Save