2020-11-01 05:26:58 +01:00
|
|
|
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
|
2020-11-10 03:48:23 +01:00
|
|
|
load("@bazel_skylib//lib:versions.bzl", "versions")
|
2021-03-27 09:39:02 +01:00
|
|
|
load("@rules_rust//rust:repositories.bzl", "rust_repositories")
|
2020-11-05 02:01:30 +01:00
|
|
|
load("@net_ankiweb_anki//cargo:crates.bzl", "raze_fetch_remote_crates")
|
2020-11-01 05:26:58 +01:00
|
|
|
load(":python.bzl", "setup_local_python")
|
2020-12-23 08:10:37 +01:00
|
|
|
load(":protobuf.bzl", "setup_protobuf_binary")
|
2021-01-09 08:08:50 +01:00
|
|
|
load("//rslib:clang_format.bzl", "setup_clang_format")
|
2020-11-01 05:26:58 +01:00
|
|
|
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")
|
|
|
|
load("@io_bazel_rules_sass//:defs.bzl", "sass_repositories")
|
|
|
|
load("@com_github_ali5h_rules_pip//:defs.bzl", "pip_import")
|
2020-11-02 10:22:23 +01:00
|
|
|
load("//pip/pyqt5:defs.bzl", "install_pyqt5")
|
2021-04-15 02:53:49 +02:00
|
|
|
load("@esbuild_toolchain//:esbuild_repo.bzl", "esbuild_dependencies")
|
2020-11-01 05:26:58 +01:00
|
|
|
|
2021-05-04 08:24:28 +02:00
|
|
|
anki_version = "2.1.45"
|
2020-11-03 23:44:47 +01:00
|
|
|
|
2020-11-01 05:26:58 +01:00
|
|
|
def setup_deps():
|
|
|
|
bazel_skylib_workspace()
|
|
|
|
|
2020-11-10 03:48:23 +01:00
|
|
|
versions.check(minimum_bazel_version = "3.7.0")
|
|
|
|
|
2020-11-01 05:26:58 +01:00
|
|
|
rust_repositories(
|
|
|
|
edition = "2018",
|
2021-06-21 04:12:59 +02:00
|
|
|
include_rustc_srcs = True,
|
2020-11-01 05:26:58 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
raze_fetch_remote_crates()
|
|
|
|
|
|
|
|
setup_local_python(name = "python")
|
|
|
|
|
2020-12-23 08:10:37 +01:00
|
|
|
setup_protobuf_binary(name = "com_google_protobuf")
|
|
|
|
|
2021-01-09 08:08:50 +01:00
|
|
|
setup_clang_format(name = "clang_format")
|
|
|
|
|
2020-11-01 05:26:58 +01:00
|
|
|
native.register_toolchains("@python//:python3_toolchain")
|
|
|
|
|
|
|
|
pip_import(
|
|
|
|
name = "py_deps",
|
2020-11-05 02:01:30 +01:00
|
|
|
requirements = "@net_ankiweb_anki//pip:requirements.txt",
|
2020-11-01 05:26:58 +01:00
|
|
|
python_runtime = "@python//:python",
|
|
|
|
)
|
|
|
|
|
|
|
|
install_pyqt5(
|
|
|
|
name = "pyqt5",
|
|
|
|
python_runtime = "@python//:python",
|
|
|
|
)
|
|
|
|
|
2020-11-05 02:01:30 +01:00
|
|
|
node_repositories(package_json = ["@net_ankiweb_anki//ts:package.json"])
|
2020-11-01 05:26:58 +01:00
|
|
|
|
|
|
|
yarn_install(
|
|
|
|
name = "npm",
|
2020-11-05 02:01:30 +01:00
|
|
|
package_json = "@net_ankiweb_anki//ts:package.json",
|
|
|
|
yarn_lock = "@net_ankiweb_anki//ts:yarn.lock",
|
2020-11-01 05:26:58 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
sass_repositories()
|
2021-04-07 06:53:53 +02:00
|
|
|
|
|
|
|
esbuild_dependencies()
|