Bump versions of actions and dependencies. While I'm here, format the files in the `examples/basic/` directory.
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7d5f021..16b86a6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml
@@ -14,7 +14,7 @@ env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v4.1.4 + - uses: actions/checkout@v4.1.7 - run: | gh release create "${GITHUB_REF_NAME}" \ --generate-notes --latest --verify-tag \
diff --git a/MODULE.bazel b/MODULE.bazel index 1576122..6ad2b33 100644 --- a/MODULE.bazel +++ b/MODULE.bazel
@@ -4,10 +4,10 @@ version = "2.12.0", ) -bazel_dep(name = "bazel_skylib", version = "1.6.1") +bazel_dep(name = "bazel_skylib", version = "1.7.1") bazel_dep(name = "platforms", version = "0.0.10") bazel_dep(name = "rules_cc", version = "0.0.9") -bazel_dep(name = "rules_python", version = "0.32.2") +bazel_dep(name = "rules_python", version = "0.33.2") internal_configure = use_extension("//:internal_configure.bzl", "internal_configure_extension") use_repo(internal_configure, "pybind11")
diff --git a/examples/basic/BUILD.bazel b/examples/basic/BUILD.bazel index b58ddd3..ba62fd2 100644 --- a/examples/basic/BUILD.bazel +++ b/examples/basic/BUILD.bazel
@@ -5,11 +5,13 @@ name = "basic", srcs = ["basic.cpp"], ) + py_library( name = "basic_lib", data = [":basic"], imports = ["."], ) + py_test( name = "basic_test", srcs = ["basic_test.py"],
diff --git a/examples/basic/MODULE.bazel b/examples/basic/MODULE.bazel index d049a6f..dd4427e 100644 --- a/examples/basic/MODULE.bazel +++ b/examples/basic/MODULE.bazel
@@ -1,3 +1,2 @@ bazel_dep(name = "pybind11_bazel", version = "2.12.0") -bazel_dep(name = "rules_python", version = "0.33.1") - +bazel_dep(name = "rules_python", version = "0.33.2")
diff --git a/examples/basic/basic.cpp b/examples/basic/basic.cpp index bd3d35c..4996ac3 100644 --- a/examples/basic/basic.cpp +++ b/examples/basic/basic.cpp
@@ -1,10 +1,10 @@ #include <pybind11/pybind11.h> int add(int i, int j) { - return i + j; + return i + j; } PYBIND11_MODULE(basic, module) { - module.doc() = "A basic pybind11 extension"; - module.def("add", &add, "A function that adds two numbers"); + module.doc() = "A basic pybind11 extension"; + module.def("add", &add, "A function that adds two numbers"); }
diff --git a/examples/basic/basic_test.py b/examples/basic/basic_test.py index 6219734..0a1f15a 100644 --- a/examples/basic/basic_test.py +++ b/examples/basic/basic_test.py
@@ -4,10 +4,11 @@ class TestBasic(unittest.TestCase): - def test_add(self): - self.assertEqual(basic.add(1, 2), 3) - self.assertEqual(basic.add(2, 2), 4) + + def test_add(self): + self.assertEqual(basic.add(1, 2), 3) + self.assertEqual(basic.add(2, 2), 4) if __name__ == "__main__": - unittest.main() + unittest.main()