2
0
Fork 0
mirror of https://github.com/bazel-contrib/rules_foreign_cc synced 2024-11-28 08:43:26 +00:00
rules_foreign_cc/examples/third_party/python/BUILD.python3.bazel

41 lines
1 KiB
Plaintext
Raw Normal View History

load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make")
package(default_visibility = ["//visibility:public"])
filegroup(
name = "all_srcs",
srcs = glob(
include = ["**"],
exclude = ["*.bazel"],
),
)
configure_make(
name = "python3",
configure_options = [
"CFLAGS='-Dredacted=\"redacted\"'",
"--with-openssl=$$EXT_BUILD_DEPS/openssl",
"--with-zlib=$$EXT_BUILD_DEPS/zlib",
"--enable-optimizations",
],
env = select({
"@platforms//os:macos": {"AR": ""},
"//conditions:default": {},
}),
features = select({
"@platforms//os:macos": ["-headerpad"],
"//conditions:default": {},
}),
# rules_foreign_cc defaults the install_prefix to "python". This conflicts with the "python" executable that is generated.
install_prefix = "py_install",
lib_source = ":all_srcs",
out_binaries = [
"python3.10",
],
out_data_dirs = ["lib"],
deps = [
"@openssl",
"@zlib",
],
)