improve python2

pull/18/head
ruki 6 years ago
parent 4e3ee5bc02
commit 412e9acdfb
No known key found for this signature in database
GPG Key ID: 33341DF9719963FA
  1. 2
      packages/g/glib/xmake.lua
  2. 4
      packages/p/python/xmake.lua
  3. 5
      packages/p/python2/xmake.lua

@ -7,7 +7,7 @@ package("glib")
{version = function (version) return table.concat(table.slice((version):split('%.'), 1, 2), '.') .. "/glib-" .. version end})
add_versions("2.60.2", "2ef15475060addfda0443a7e8a52b28a10d5e981e82c083034061daf9a8f80d9")
add_deps("meson", "ninja")
add_deps("meson", "ninja", "libffi")
on_install("macosx", "linux", function (package)
local configs = {"-Dbsymbolic_functions=false", "-Ddtrace=false"}

@ -88,12 +88,14 @@ package("python")
end)
on_install("@windows", function (package)
os.cp("*", package:installdir())
if package:version():ge("3.0") then
os.cp("python.exe", path.join(package:installdir("bin"), "python3.exe"))
else
os.cp("python.exe", path.join(package:installdir("bin"), "python2.exe"))
end
os.mv("*.exe", package:installdir("bin"))
os.mv("*.dll", package:installdir("bin"))
os.cp("*", package:installdir())
package:data("install_resources")()
end)

@ -61,6 +61,7 @@ package("python2")
http.download(resource.url, resourcefile)
assert(resource.sha256 == hash.sha256(resourcefile), "resource(%s): unmatched checksum!", name)
assert(archive.extract(resourcefile, resourcedir), "resource(%s): extract failed!", name)
print(resourcedir)
local setupfile = assert(find_file("setup.py", path.join(resourcedir, "*")), "resource(%s): setup.py not found!", name)
local oldir = os.cd(path.directory(setupfile))
os.vrunv(python, {"setup.py", "install", "--prefix=" .. package:installdir()}, {envs = envs})
@ -70,8 +71,10 @@ package("python2")
end)
on_install("@windows", function (package)
os.cp("*", package:installdir())
os.cp("python.exe", path.join(package:installdir("bin"), "python2.exe"))
os.mv("*.exe", package:installdir("bin"))
os.mv("*.dll", package:installdir("bin"))
os.cp("*", package:installdir())
package:data("install_resources")()
end)

Loading…
Cancel
Save