Skip to content

Commit

Permalink
add bsd python2
Browse files Browse the repository at this point in the history
  • Loading branch information
xq114 committed Nov 2, 2024
1 parent bedf251 commit d51d768
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions packages/p/python2/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ package("python2")
package:addenv("PATH", "bin")
end)

on_load("@macosx", "@linux", function (package)
on_load("@macosx", "@linux", "@bsd", function (package)

-- set includedirs
local version = package:version()
Expand All @@ -72,7 +72,7 @@ package("python2")
os.vrunv(python, {"-m", "pip", "install", "wheel"})
end)

on_install("@macosx", "@linux", function (package)
on_install("@macosx", "@linux", "@bsd", function (package)

-- init configs
local configs = {"--enable-ipv6", "--with-ensurepip"}
Expand Down Expand Up @@ -125,26 +125,6 @@ package("python2")
xcode_sdkver = xcode_sdkver or get_config("xcode_sdkver")
target_minver = target_minver or get_config("target_minver")

-- TODO will be deprecated after xmake v2.5.1
xcode_sdkver = xcode_sdkver or get_config("xcode_sdkver_macosx")
if not xcode_dir or not xcode_sdkver then
-- maybe on cross platform, we need find xcode envs manually
local xcode = import("detect.sdks.find_xcode")(nil, {force = true, plat = package:plat(), arch = package:arch()})
if xcode then
xcode_dir = xcode.sdkdir
xcode_sdkver = xcode.sdkver
end
end

-- TODO will be deprecated after xmake v2.5.1
target_minver = target_minver or get_config("target_minver_macosx")
if not target_minver then
local macos_ver = macos.version()
if macos_ver then
target_minver = macos_ver:major() .. "." .. macos_ver:minor()
end
end

if xcode_dir and xcode_sdkver then
-- help Python's build system (setuptools/pip) to build things on SDK-based systems
-- the setup.py looks at "-isysroot" to get the sysroot (and not at --sysroot)
Expand Down

0 comments on commit d51d768

Please sign in to comment.