Using Bzlmod
Add to your MODULE.bazel
file:
- for packaging and dependency management with Poetry
bazel_dep(name = "ofiuco", version = "0.3.7")
poetry = use_extension("@ofiuco//python:extensions.bzl", "poetry")
poetry.parse(
name = "poetry",
lock = "//:poetry.lock",
)
use_repo(poetry, "poetry")
Using WORKSPACE
Paste this snippet into your WORKSPACE
file:
- for packaging and dependency management with Poetry
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
toolchain_name = "python"
python_version = "3.12"
# Setup rules_python
http_archive(
name = "rules_python",
sha256 = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -",
strip_prefix = "rules_python-0.34.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.34.0/rules_python-0.34.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
py_repositories()
python_register_toolchains(toolchain_name, python_version)
# Setup ofiuco
http_archive(
name = "ofiuco",
sha256 = "009543bf36b39a9f422cd3b50cefe52e4fb2e3a08de2c3c9ccf3d915ac036f08",
strip_prefix = "ofiuco-0.3.7",
url = "https://github.com/oxidase/ofiuco/releases/download/v0.3.7/ofiuco-0.3.7.tar.gz",
)
load("@ofiuco//python:repositories.bzl", install_poetry_dependencies = "install_dependencies")
install_poetry_dependencies(toolchain_name, python_version)
load("@ofiuco//python:poetry_parse.bzl", "poetry_parse")
poetry_parse(
name = "poetry",
lock = "//:poetry.lock",
)
What's Changed
- Feat/test by @oxidase in #73
- Rename to rules_ophiuchus by @oxidase in #74
- feat: rename s/host/system/g and use host interpret from rules_python by @oxidase in #75
Full Changelog: v0.3.6...v0.3.7