install python on linux and macosx

pull/3/head
ruki 6 years ago
parent 23dfba293d
commit dce94ed46b
  1. 11
      packages/p/python/xmake.lua
  2. 10
      packages/p/python3/xmake.lua

@ -12,6 +12,9 @@ package("python")
set_urls("https://www.python.org/ftp/python/$(version)/python-$(version).msi")
add_versions("2.7.15", "1afa1b10cf491c788baa340066a813d5ec6232561472cfc3af1664dbc6f29f77")
end
else
set_urls("https://www.python.org/ftp/python/$(version)/Python-$(version).tgz")
add_versions("2.7.15", "18617d1f15a380a919d517630a9cd85ce17ea602f9bbdc58ddc672df4b0239db")
end
on_build(function (package)
@ -23,6 +26,12 @@ package("python")
os.cp("targetdir/*", package:installdir("bin"))
end)
on_build("macosx", "linux", function (package)
os.vrun("./configure --prefix=%s", package:installdir())
os.vrun("make")
end)
on_install("macosx", "linux", function (package)
import("package.manager").install("python")
os.vrun("make install")
end)

@ -12,6 +12,9 @@ package("python3")
set_urls("https://www.python.org/ftp/python/$(version)/python-$(version)-embed-win32.zip")
add_versions("3.7.0", "9596b23a8db1f945c2e26fe0dc1743e33f3700b4b708c68ea202cf2ac761a736")
end
else
set_urls("https://www.python.org/ftp/python/$(version)/Python-$(version).tgz")
add_versions("3.7.0", "85bb9feb6863e04fb1700b018d9d42d1caac178559ffa453d7e6a436e259fd0d")
end
on_build(function (package)
@ -22,6 +25,11 @@ package("python3")
os.cp("*", package:installdir("bin"))
end)
on_build("macosx", "linux", function (package)
os.vrun("./configure --prefix=%s", package:installdir())
os.vrun("make")
end)
on_install("macosx", "linux", function (package)
import("package.manager").install("python3")
os.vrun("make altinstall")
end)

Loading…
Cancel
Save