Skip to content

Commit

Permalink
[ci][language binding] disable python binding due to build wasm versi…
Browse files Browse the repository at this point in the history
…on failed
  • Loading branch information
PikachuHy committed Feb 5, 2024
1 parent 1838dc1 commit c841c3c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 100 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/macos_bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
build_with_bazel:
runs-on: macos-14
runs-on: macos-13

steps:
- uses: actions/checkout@v3
Expand Down
11 changes: 1 addition & 10 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("version.bzl", "gen_pscm_version_info")
load("test.bzl", "collect_pscm_tests")
load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
load("@pybind11_bazel//:build_defs.bzl", "pybind_extension", "pybind_library")

config_setting(
name = "mlir_codegen",
Expand Down Expand Up @@ -184,12 +183,4 @@ gentbl_cc_library(
tblgen = "@llvm-project//mlir:mlir-tblgen",
td_file = "include/pscm/codegen/mlir/Ops.td",
deps = [":pscm-ops-td-files"],
)

# when import pscm, the pscm.so must in root folder
# TODO: rename pypscm to pscm
pybind_extension(
name = "pypscm",
visibility = ["//visibility:public"],
deps = ["//binding/python:pscm"],
)
)
57 changes: 0 additions & 57 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -353,60 +353,3 @@ http_archive(
strip_prefix = "freetype-2.9",
urls = ["https://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.gz"],
)

# https://thethoughtfulkoala.com/posts/2020/05/16/bazel-hermetic-python.html
# Special logic for building python interpreter with OpenSSL from homebrew.
# See https://devguide.python.org/setup/#macos-and-os-x
_py_configure = """
if [[ "$OSTYPE" == "darwin"* ]]; then
./configure --prefix=$(pwd)/bazel_install --with-openssl=$(brew --prefix openssl)
else
./configure --prefix=$(pwd)/bazel_install
fi
"""

http_archive(
name = "python_interpreter",
build_file_content = """
exports_files(["python_bin"])
filegroup(
name = "files",
srcs = glob(["bazel_install/**"], exclude = ["**/* *"]),
visibility = ["//visibility:public"],
)
""",
patch_cmds = [
"mkdir $(pwd)/bazel_install",
_py_configure,
"make",
"make install",
"ln -s bazel_install/bin/python3 python_bin",
],
sha256 = "5a99f8e7a6a11a7b98b4e75e0d1303d3832cada5534068f69c7b6222a7b1b002",
strip_prefix = "Python-3.10.0",
urls = ["https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tar.xz"],
)

register_toolchains("@dev_pscm//toolchains:my_py_toolchain")

http_archive(
name = "pybind11_bazel",
sha256 = "dc4882b23a617575d0fd822aba88aa4a14133c3d428b5a8fb83d81d03444a475",
strip_prefix = "pybind11_bazel-8889d39b2b925b2a47519ae09402a96f00ccf2b4",
urls = ["https://github.com/pybind/pybind11_bazel/archive/8889d39b2b925b2a47519ae09402a96f00ccf2b4.zip"],
)

http_archive(
name = "pybind11",
build_file = "@pybind11_bazel//:pybind11.BUILD",
sha256 = "c9375b7453bef1ba0106849c83881e6b6882d892c9fae5b2572a2192100ffb8a",
strip_prefix = "pybind11-a54eab92d265337996b8e4b4149d9176c2d428a6",
urls = ["https://github.com/pybind/pybind11/archive/a54eab92d265337996b8e4b4149d9176c2d428a6.tar.gz"],
)

load("@pybind11_bazel//:python_configure.bzl", "python_configure")

python_configure(
name = "local_config_python",
python_interpreter_target = "@python_interpreter//:python_bin",
)
32 changes: 0 additions & 32 deletions binding/python/BUILD.bazel

This file was deleted.

0 comments on commit c841c3c

Please sign in to comment.