Skip to content

Commit a43136b

Browse files
hawkinspGoogle-ML-Automation
authored andcommitted
Simplify handling of type stubs in nanobind extension rules.
Pass pytype_srcs as data to the pybind_extension rule. PiperOrigin-RevId: 745238783
1 parent f1bcf3b commit a43136b

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

jaxlib/pywrap.bzl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,11 @@ def nanobind_pywrap_extension(
7373
name = name,
7474
srcs = [src_cc_name],
7575
deps = [":" + lib_name],
76+
data = pytype_srcs,
7677
linkopts = linkopts,
7778
visibility = visibility,
7879
default_deps = [],
7980
common_lib_packages = [
8081
"jaxlib",
8182
],
8283
)
83-
84-
# Create a py_library with the type stubs as data, on which wheel builds can depend.
85-
native.py_library(
86-
name = name + "_type_stubs",
87-
data = pytype_srcs,
88-
deps = pytype_deps,
89-
)

jaxlib/tools/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ py_binary(
6767
"//jaxlib:jaxlib_binaries",
6868
"//jaxlib:setup.py",
6969
"//jaxlib/xla:xla_client.py",
70-
"//jaxlib/xla:xla_extension_type_stubs",
70+
"//jaxlib/xla:xla_extension",
7171
"@xla//xla/ffi/api:api.h",
7272
"@xla//xla/ffi/api:c_api.h",
7373
"@xla//xla/ffi/api:ffi.h",

jaxlib/triton/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ pytype_strict_library(
3737
[],
3838
[
3939
"//jaxlib/mlir/_mlir_libs:_triton_ext",
40-
"//jaxlib/mlir/_mlir_libs:_triton_ext_type_stubs",
4140
],
4241
),
4342
)

0 commit comments

Comments
 (0)