Skip to content

Commit fd39b6b

Browse files
committed
[NO TESTS] WIP
1 parent 2c56e5f commit fd39b6b

File tree

22 files changed

+5032
-5043
lines changed

22 files changed

+5032
-5043
lines changed

.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import %workspace%/bazel/defaults.bazelrc
22

33
test --test_output=errors
4+
test --test_tag_filters=-manual
45
common --enable_bzlmod
56

67
# Define value used by tests

bazel/include/oci.MODULE.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ git_override(
2323

2424
# Used for testing container layers
2525
bazel_dep(name = "tar.bzl", version = "0.5.5")
26+
bazel_lib_toolchains = use_extension("@tar.bzl//tar:extensions.bzl", "toolchains")
27+
use_repo(bazel_lib_toolchains, "bsd_tar_toolchains")
28+
29+
register_toolchains("@bsd_tar_toolchains//:all")

bazel/include/rust.MODULE.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ crate.from_cargo(
2727
"//py/tools/unpack_bin:Cargo.toml",
2828
"//py/tools/venv_bin:Cargo.toml",
2929
"//py/tools/venv_shim:Cargo.toml",
30+
"//py/tools/runfiles:Cargo.toml",
3031
],
3132
supported_platform_triples = [
3233
"aarch64-apple-darwin",

docs/virtual_deps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ https://github.com/aspect-build/rules_py/issues/213
1717
Simply move an element from the `deps` attribute to `virtual_deps`.
1818

1919
For example, instead of getting a specific version of Django from
20-
`deps = ["@pypi_django//:pkg"]` on a `py_library` target,
20+
`deps = ["@pypi//django"]` on a `py_library` target,
2121
provide the package name with `virtual_deps = ["django"]`.
2222

2323
> Note that any `py_binary` or `py_test` transitively depending on this `py_library` must be loaded from `aspect_rules_py` rather than `rules_python`, as the latter does not have a feature of resolving the virtual dep.

examples/django/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ py_binary(
55
srcs = ["manage.py"],
66
deps = [
77
"//examples/django/mysite",
8-
"@pypi_django//:pkg",
8+
"@pypi//django",
99
],
1010
)

examples/django/mysite/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ py_library(
1111
],
1212
visibility = ["//examples/django:__pkg__"],
1313
deps = [
14-
"@pypi_django//:pkg",
14+
"@pypi//django",
1515
],
1616
)

examples/multi_version/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ py_binary(
1111

1212
py_pytest_main(
1313
name = "__test__",
14-
deps = ["@pipi//pytest"],
14+
deps = ["@pypi//pytest"],
1515
)
1616

1717
py_test(

examples/pytest/BUILD.bazel

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ py_test(
2121
pytest_main = True,
2222
deps = [
2323
":lib",
24-
"@pypi_coverage//:pkg",
25-
"@pypi_ftfy//:pkg",
26-
"@pypi_neptune//:pkg",
27-
"@pipi//pytest",
24+
"@pypi//coverage",
25+
"@pypi//ftfy",
26+
"@pypi//neptune",
27+
"@pypi//pytest",
2828
],
2929
)
3030

@@ -36,5 +36,5 @@ py_test(
3636
package_collisions = "warning",
3737
pytest_main = True,
3838
shard_count = 2,
39-
deps = ["@pipi//pytest"],
39+
deps = ["@pipy//pytest"],
4040
)

examples/pytest/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ load("@aspect_rules_py//py:defs.bzl", "py_pytest_main")
1414

1515
py_pytest_main(
1616
name = "__test__",
17-
deps = ["@pypi_pytest//:pkg"], # change this to the pytest target in your repo.
17+
deps = ["@pypi//pytest"], # change this to the pytest target in your repo.
1818
)
1919
```
2020

py/tests/import-pathing/tests.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ def _ctx_with_imports(imports, deps = []):
1010
),
1111
build_file_path = "foo/bar/BUILD.bazel",
1212
workspace_name = "aspect_rules_py",
13-
label = Label("//foo/bar:baz"),
13+
# Under bzlmod we have to set the workspace name otherwise we get _main
14+
label = Label("@@aspect_rules_py//foo/bar:baz"),
1415
)
1516

1617
def _can_resolve_path_in_workspace_test_impl(ctx):

0 commit comments

Comments
 (0)