source/WORKSPACE

80 lines
2.4 KiB
Python
Raw Normal View History

2021-04-08 06:37:51 +00:00
# WORKSPACE
#
# This file exists to configure the Bazel (https://bazel.build/) build tool to our needs.
# Particularly, it installs rule definitions and other capabilities which aren't in Bazel core.
# In the future we may have our own modifications to this config.
# Install the blessed Python and PyPi rule support
# From https://github.com/bazelbuild/rules_python
workspace(
name = "arrdem_source",
)
load(
"@bazel_tools//tools/build_defs/repo:http.bzl",
"http_archive",
"http_file",
)
load(
"@bazel_tools//tools/build_defs/repo:git.bzl",
"git_repository",
)
####################################################################################################
# Skylib
####################################################################################################
git_repository(
name = "bazel_skylib",
remote = "https://github.com/bazelbuild/bazel-skylib.git",
tag = "1.0.3",
)
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
####################################################################################################
# Python support
####################################################################################################
2021-08-30 01:23:39 +00:00
2021-04-08 06:37:51 +00:00
# Using rules_python at a more recent SHA than the last release like a baws
git_repository(
name = "rules_python",
remote = "https://github.com/bazelbuild/rules_python.git",
# tag = "0.4.0",
2024-05-14 04:31:23 +00:00
commit = "5f51a4451b478c5fed491614756d16745682fd7c",
2021-04-08 06:37:51 +00:00
)
2024-05-14 04:31:23 +00:00
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
2021-08-30 03:59:32 +00:00
register_toolchains("//tools/python:python3_toolchain")
2021-04-08 06:37:51 +00:00
# pip package pinnings need to be initialized.
# this generates a bunch of bzl rules so that each pip dep is a bzl target
load("@rules_python//python:pip.bzl", "pip_parse")
2021-04-08 06:37:51 +00:00
pip_parse(
2021-04-08 06:37:51 +00:00
name = "arrdem_source_pypi",
2023-05-13 22:56:01 +00:00
requirements_lock = "//tools/python:requirements_lock.txt",
python_interpreter_target = "//tools/python:pythonshim",
2021-04-08 06:37:51 +00:00
)
# Load the starlark macro which will define your dependencies.
load("@arrdem_source_pypi//:requirements.bzl", "install_deps")
# Call it to define repos for your requirements.
install_deps()
2024-05-14 04:31:23 +00:00
git_repository(
name = "rules_zapp",
remote = "https://git.arrdem.com/arrdem/rules_zapp.git",
commit = "961be891e5cff539e14f2050d5cd9e82845ce0f2",
# tag = "0.1.2",
2022-11-20 06:54:45 +00:00
)
2024-05-14 04:31:23 +00:00
# local_repository(
# name = "rules_zapp",
# path = "/home/arrdem/Documents/hobby/programming/rules_zapp",
# )