Skip to content

Commit

Permalink
comment: address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
aignas committed May 16, 2023
1 parent 27c6f37 commit 8e3c9b0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 8 additions & 2 deletions examples/bzlmod/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,22 @@ python.toolchain(
)
use_repo(python, "python3_9")
use_repo(python, "python3_9_toolchains")
use_repo(python, "python3_9_host_interpreter")

register_toolchains(
"@python3_9_toolchains//:all",
)

interpreter = use_extension("@rules_python//python/extensions:interpreter.bzl", "interpreter")
interpreter.install(
name = "interpreter_python3_9",
python_name = "python3_9",
)
use_repo(interpreter, "interpreter_python3_9")

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
name = "pip",
python_interpreter_target = "@python3_9_host_interpreter//:python",
python_interpreter_target = "@interpreter_python3_9//:python",
requirements_lock = "//:requirements_lock.txt",
requirements_windows = "//:requirements_windows.txt",
)
Expand Down
4 changes: 3 additions & 1 deletion examples/bzlmod/entry_point/test_entry_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
class ExampleTest(unittest.TestCase):
def test_entry_point(self):
rlocation_path = os.environ.get("YAMLLINT_ENTRY_POINT")
assert rlocation_path is not None
assert (
rlocation_path is not None
), "expected 'YAMLLINT_ENTRY_POINT' env variable to be set to rlocation of the tool"

entry_point = pathlib.Path(runfiles.Create().Rlocation(rlocation_path))
self.assertTrue(entry_point.exists(), f"'{entry_point}' does not exist")
Expand Down

0 comments on commit 8e3c9b0

Please sign in to comment.