Bazel 7; bzlmod

This commit is contained in:
Reid 'arrdem' McKenzie 2024-04-07 01:06:28 -06:00
parent 0fbb6e4f88
commit 0e1d4c6b7b
4 changed files with 14 additions and 53 deletions

View file

@ -1 +1 @@
6.0.0 7.0.0

1
.gitignore vendored
View file

@ -2,3 +2,4 @@
/**/*.egg-info /**/*.egg-info
scratch scratch
bazel-* bazel-*
MODULE.bazel.lock

12
MODULE.bazel Normal file
View file

@ -0,0 +1,12 @@
bazel_dep(name = "bazel_skylib", version = "1.4.0")
bazel_dep(name = "rules_python", version = "0.31.0")
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.11",
requirements_lock = "//tools/python:requirements_lock.txt",
)
use_repo(pip, "pypi")

View file

@ -1,52 +0,0 @@
workspace(
name = "flowmetal"
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "bazel_skylib",
sha256 = "b8a1527901774180afc798aeb28c4634bdccf19c4d98e7bdd1ce79d1fe9aaad7",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz",
],
)
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
rules_python_version = "c504355672223144cefb2cbf3f69e2d38e7e2726"
http_archive(
name = "rules_python",
sha256 = "3f12b492dbf7d56b0e3deed81f21d56c3241babaa52d7eb525cb7c657bba9125",
strip_prefix = "rules_python-{}".format(rules_python_version),
url = "https://github.com/bazelbuild/rules_python/archive/{}.zip".format(rules_python_version),
)
load("@rules_python//python:repositories.bzl", "python_register_toolchains")
python_register_toolchains(
name = "python3_10",
python_version = "3.10",
)
load("@python3_10//:defs.bzl", python3_10="interpreter")
load("@rules_python//python:pip.bzl", "pip_parse")
# Create a central repo that knows about the dependencies needed from
# requirements_lock.txt.
pip_parse(
name = "pypi",
python_interpreter_target = python3_10,
requirements_lock = "//tools/python:requirements_lock.txt",
)
load("@pypi//:requirements.bzl", "install_deps")
install_deps()