From 85fe7526ccf5d4a4eef052cd8fd6f3640b521ada Mon Sep 17 00:00:00 2001 From: QING WANG Date: Fri, 4 Jul 2025 16:48:37 +0000 Subject: [PATCH 1/9] Try to fix on py11 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 42c4070..7f5d574 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ logger = logging.getLogger(__name__) -SUPPORTED_PYTHONS = [(3, 6), (3, 7), (3, 8), (3, 9), (3, 10)] +SUPPORTED_PYTHONS = [(3, 6), (3, 7), (3, 8), (3, 9), (3, 10), (3, 11)] SUPPORTED_BAZEL = (3, 2, 0) ROOT_DIR = os.path.dirname(__file__) From 9601796ca0ed74844dacb2c8366974229880bd9e Mon Sep 17 00:00:00 2001 From: QING WANG Date: Sat, 5 Jul 2025 13:07:14 +0000 Subject: [PATCH 2/9] 1 --- WORKSPACE | 34 +++++++++++++++++++++++++--------- pygloo/BUILD | 4 +++- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index cdd3513..6d4a91c 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -5,6 +5,21 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # Group the sources of the library so that CMake rule have access to it all_content = """filegroup(name = "all", srcs = glob(["**"]), visibility = ["//visibility:public"])""" +http_archive( + name = "rules_python", + # sha256 = "7b9039c31e909cf59eeaea8ccbdc54f09f7ebaeb9609b94371c7de45e802977c", + strip_prefix = "rules_python-1.5.0", + url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.0/rules_python-1.5.0.tar.gz", +) +# if missing it will trig the error message of the OP +load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains") +py_repositories() + +python_register_toolchains( + name = "python_3_11", + python_version = "3.11", +) + # Rule repository http_archive( name = "rules_foreign_cc", @@ -42,18 +57,19 @@ http_archive( http_archive( name = "pybind11_bazel", - strip_prefix = "pybind11_bazel-f4f1bd4fa4b368b79dd6f003f8ef8c5a91fad36b", - urls = ["https://github.com/Ezra-H/pybind11_bazel/archive/f4f1bd4fa4b368b79dd6f003f8ef8c5a91fad36b.zip"], - sha256 = "6ea811e7a7348f7c9d5b59887aa0c65e42222e199049a1ee55db147d2e9ca4a7", + strip_prefix = "pybind11_bazel-2.13.6", + urls = ["https://github.com/pybind/pybind11_bazel/releases/download/v2.13.6/pybind11_bazel-2.13.6.zip"], + sha256 = "9df284330336958c837fb70dc34c0a6254dac52a5c983b3373a8c2bbb79ac35e", ) # We still require the pybind library. http_archive( name = "pybind11", - build_file = "@pybind11_bazel//:pybind11.BUILD", - strip_prefix = "pybind11-2.6.1", - urls = ["https://github.com/pybind/pybind11/archive/v2.6.1.tar.gz"], - sha256 = "cdbe326d357f18b83d10322ba202d69f11b2f49e2d87ade0dc2be0c5c34f8e2a", + build_file = "@pybind11_bazel//:pybind11-BUILD.bazel", + strip_prefix = "pybind11-2.13.6", + # urls = ["https://github.com/pybind/pybind11/archive/v2.13.6.zip"], + urls = ["https://wq-boost.oss-cn-beijing.aliyuncs.com/pybind11-2.13.6.zip"], + # sha256 = "cdbe326d357f18b83d10322ba202d69f11b2f49e2d87ade0dc2be0c5c34f8e2a", ) http_archive( @@ -81,7 +97,7 @@ http_archive( sha256 = "a146136bb6efdac0e3ede952d09aec44b771a87ebc713bd815c3a90a7428c908", ) -load("@pybind11_bazel//:python_configure.bzl", "python_configure_pybind") -python_configure_pybind(name = "local_config_python") +# load("@pybind11_bazel//:python_configure.bzl", "python_configure_pybind") +# python_configure_pybind(name = "local_config_python") diff --git a/pygloo/BUILD b/pygloo/BUILD index 41f152f..7eaf71e 100644 --- a/pygloo/BUILD +++ b/pygloo/BUILD @@ -2,6 +2,8 @@ load("@rules_foreign_cc//tools/build_defs:cmake.bzl", "cmake_external") load("@rules_foreign_cc//tools/build_defs:make.bzl", "make") load("@pybind11_bazel//:build_defs.bzl", "pybind_library") load("@pybind11_bazel//:build_defs.bzl", "pybind_extension") +load("@rules_python//python:defs.bzl", "py_library") + cmake_external( name = "libuv", @@ -72,7 +74,7 @@ pybind_library( hdrs = glob(["include/*.h"]), strip_include_prefix = "include", visibility = ["//visibility:public"], - deps = [":gloo"] + deps = [":gloo", "@rules_python//python/cc:current_py_cc_libs"] ) pybind_extension( From a04dd6939a6ace893822e13a73fc0b2bf1a0aa56 Mon Sep 17 00:00:00 2001 From: QING WANG Date: Sat, 5 Jul 2025 14:32:09 +0000 Subject: [PATCH 3/9] 1 --- WORKSPACE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 6d4a91c..c860bd1 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -7,9 +7,8 @@ all_content = """filegroup(name = "all", srcs = glob(["**"]), visibility = ["//v http_archive( name = "rules_python", - # sha256 = "7b9039c31e909cf59eeaea8ccbdc54f09f7ebaeb9609b94371c7de45e802977c", - strip_prefix = "rules_python-1.5.0", - url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.0/rules_python-1.5.0.tar.gz", + strip_prefix = "rules_python-0.30.0", + url = "https://wq-boost.oss-cn-beijing.aliyuncs.com/rules_python-0.30.0.tar.gz", ) # if missing it will trig the error message of the OP load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains") @@ -18,6 +17,7 @@ py_repositories() python_register_toolchains( name = "python_3_11", python_version = "3.11", + ignore_root_user_error = True, ) # Rule repository From aa93b6e18fa67807e5bf87560f5642493e07cede Mon Sep 17 00:00:00 2001 From: QING WANG Date: Sat, 5 Jul 2025 15:43:35 +0000 Subject: [PATCH 4/9] ubuntu 22 --- .github/workflows/ubuntu_basic.yml | 12 ++++++------ setup.py | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ubuntu_basic.yml b/.github/workflows/ubuntu_basic.yml index df379b0..4cd2546 100644 --- a/.github/workflows/ubuntu_basic.yml +++ b/.github/workflows/ubuntu_basic.yml @@ -10,7 +10,7 @@ jobs: run-unit-tests: timeout-minutes: 60 runs-on: ubuntu-latest - container: docker.io/library/ubuntu:20.04 + container: docker.io/library/ubuntu:22.04 steps: - uses: actions/checkout@v2 @@ -18,20 +18,20 @@ jobs: - name: Install bazel run: | apt-get update - apt-get install -yq wget gcc g++ python3.8 zlib1g-dev zip libuv1.dev + apt-get install -yq wget gcc g++ python3.11 zlib1g-dev zip libuv1.dev apt-get install -yq pip - wget "https://github.com/bazelbuild/bazel/releases/download/5.1.0/bazel_5.1.0-linux-x86_64.deb" -O bazel_5.1.0-linux-x86_64.deb - dpkg -i bazel_5.1.0-linux-x86_64.deb + wget "https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel_6.5.0-linux-x86_64.deb" -O bazel_6.5.0-linux-x86_64.deb + dpkg -i bazel_6.5.0-linux-x86_64.deb - name: Install dependencies run: | python3 -m pip install virtualenv - python3 -m virtualenv -p python3.8 py3 + python3 -m virtualenv -p python3.11 py3 . py3/bin/activate which python pip install pytest torch - pip install ray==1.13.0 + pip install ray - name: Build and test run: | diff --git a/setup.py b/setup.py index 7f5d574..a4ea04e 100644 --- a/setup.py +++ b/setup.py @@ -22,8 +22,8 @@ logger = logging.getLogger(__name__) -SUPPORTED_PYTHONS = [(3, 6), (3, 7), (3, 8), (3, 9), (3, 10), (3, 11)] -SUPPORTED_BAZEL = (3, 2, 0) +SUPPORTED_PYTHONS = [(3, 11), (3, 11), (3, 13)] +SUPPORTED_BAZEL = (6, 5, 0) ROOT_DIR = os.path.dirname(__file__) @@ -130,10 +130,10 @@ def finalize_options(self): setuptools.setup( name="pygloo", - version="0.2.0", + version="0.2.2.dev0", author="Ray Team", author_email="ray-dev@googlegroups.com", - description=("A python binding for gloo"), + description=("A python binding for gloo."), long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/ray-project/pygloo", From ce017b800d4694d27c9a3e4a751b6e4f34466a92 Mon Sep 17 00:00:00 2001 From: Qing Wang Date: Sun, 6 Jul 2025 00:10:15 +0800 Subject: [PATCH 5/9] Update ubuntu_basic.yml Signed-off-by: Qing Wang --- .github/workflows/ubuntu_basic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu_basic.yml b/.github/workflows/ubuntu_basic.yml index 4cd2546..524dc52 100644 --- a/.github/workflows/ubuntu_basic.yml +++ b/.github/workflows/ubuntu_basic.yml @@ -10,7 +10,7 @@ jobs: run-unit-tests: timeout-minutes: 60 runs-on: ubuntu-latest - container: docker.io/library/ubuntu:22.04 + container: docker.io/library/ubuntu:24.04 steps: - uses: actions/checkout@v2 From 2f98059702df53c70a9d5518b2f101788736f5e5 Mon Sep 17 00:00:00 2001 From: Qing Wang Date: Sun, 6 Jul 2025 13:38:33 +0800 Subject: [PATCH 6/9] Update ubuntu_basic.yml Signed-off-by: Qing Wang --- .github/workflows/ubuntu_basic.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu_basic.yml b/.github/workflows/ubuntu_basic.yml index 524dc52..c98a895 100644 --- a/.github/workflows/ubuntu_basic.yml +++ b/.github/workflows/ubuntu_basic.yml @@ -10,7 +10,7 @@ jobs: run-unit-tests: timeout-minutes: 60 runs-on: ubuntu-latest - container: docker.io/library/ubuntu:24.04 + container: docker.io/library/ubuntu:22.04 steps: - uses: actions/checkout@v2 @@ -30,11 +30,13 @@ jobs: python3 -m virtualenv -p python3.11 py3 . py3/bin/activate which python + python --version pip install pytest torch pip install ray - name: Build and test run: | . py3/bin/activate + python --version python3 setup.py install cd tests && python3 -m pytest * From 8a34a2d8f63c4a4bed16c31e81d064b60a258785 Mon Sep 17 00:00:00 2001 From: Qing Wang Date: Sun, 6 Jul 2025 13:46:34 +0800 Subject: [PATCH 7/9] Update ubuntu_basic.yml Signed-off-by: Qing Wang --- .github/workflows/ubuntu_basic.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ubuntu_basic.yml b/.github/workflows/ubuntu_basic.yml index c98a895..48a2939 100644 --- a/.github/workflows/ubuntu_basic.yml +++ b/.github/workflows/ubuntu_basic.yml @@ -18,6 +18,7 @@ jobs: - name: Install bazel run: | apt-get update + add-apt-repository ppa:deadsnakes/ppa apt-get install -yq wget gcc g++ python3.11 zlib1g-dev zip libuv1.dev apt-get install -yq pip From 5bc3707b49e582287b62697137b72af10c82d5a3 Mon Sep 17 00:00:00 2001 From: Qing Wang Date: Mon, 7 Jul 2025 23:34:11 +0800 Subject: [PATCH 8/9] Update ubuntu_basic.yml Signed-off-by: Qing Wang --- .github/workflows/ubuntu_basic.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ubuntu_basic.yml b/.github/workflows/ubuntu_basic.yml index 48a2939..f9c679c 100644 --- a/.github/workflows/ubuntu_basic.yml +++ b/.github/workflows/ubuntu_basic.yml @@ -17,6 +17,8 @@ jobs: - name: Install bazel run: | + export DEBIAN_FRONTEND=noninteractive + apt-get install -y software-properties-common apt-get update add-apt-repository ppa:deadsnakes/ppa apt-get install -yq wget gcc g++ python3.11 zlib1g-dev zip libuv1.dev From 4881eb5d829c83eea4f3199de3594a04770186f8 Mon Sep 17 00:00:00 2001 From: Qing Wang Date: Mon, 7 Jul 2025 23:54:08 +0800 Subject: [PATCH 9/9] Update ubuntu_basic.yml Signed-off-by: Qing Wang --- .github/workflows/ubuntu_basic.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ubuntu_basic.yml b/.github/workflows/ubuntu_basic.yml index f9c679c..db94132 100644 --- a/.github/workflows/ubuntu_basic.yml +++ b/.github/workflows/ubuntu_basic.yml @@ -18,7 +18,6 @@ jobs: - name: Install bazel run: | export DEBIAN_FRONTEND=noninteractive - apt-get install -y software-properties-common apt-get update add-apt-repository ppa:deadsnakes/ppa apt-get install -yq wget gcc g++ python3.11 zlib1g-dev zip libuv1.dev