diff --git a/packages/p/python2/xmake.lua b/packages/p/python2/xmake.lua index be61208a7..a0c8d2c6e 100644 --- a/packages/p/python2/xmake.lua +++ b/packages/p/python2/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) diff --git a/packages/s/skia/xmake.lua b/packages/s/skia/xmake.lua index 44165773c..c742a06e2 100644 --- a/packages/s/skia/xmake.lua +++ b/packages/s/skia/xmake.lua @@ -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)