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")
|
2021-07-10 15:58:53 +02:00
|
|
|
load("@ankidesktop//cargo:crates.bzl", "raze_fetch_remote_crates")
|
2021-10-18 11:50:40 +02:00
|
|
|
load("//python:python.bzl", "setup_local_python")
|
2021-07-10 13:58:34 +02:00
|
|
|
load("//proto:protobuf.bzl", "setup_protobuf_binary")
|
2021-10-15 15:19:43 +02:00
|
|
|
load("//proto: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")
|
2021-10-23 02:56:17 +02:00
|
|
|
load("//python/pyqt:defs.bzl", "install_pyqt")
|
2021-10-15 07:50:47 +02:00
|
|
|
load("@rules_python//python:pip.bzl", "pip_parse")
|
2020-11-01 05:26:58 +01:00
|
|
|
|
2021-10-26 06:14:20 +02:00
|
|
|
anki_version = "2.1.50"
|
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(
|
2021-11-18 11:51:10 +01:00
|
|
|
edition = "2021",
|
2021-07-19 15:27:11 +02:00
|
|
|
include_rustc_srcs = False,
|
2022-02-28 01:28:39 +01:00
|
|
|
version = "1.58.1",
|
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")
|
|
|
|
|
2021-10-15 07:50:47 +02:00
|
|
|
pip_parse(
|
2020-11-01 05:26:58 +01:00
|
|
|
name = "py_deps",
|
2021-10-18 11:50:40 +02:00
|
|
|
requirements_lock = "@ankidesktop//python:requirements.txt",
|
2021-10-15 07:50:47 +02:00
|
|
|
python_interpreter_target = "@python//:python",
|
2021-10-23 00:47:29 +02:00
|
|
|
extra_pip_args = ["--require-hashes"],
|
2020-11-01 05:26:58 +01:00
|
|
|
)
|
|
|
|
|
2021-10-23 02:56:17 +02:00
|
|
|
install_pyqt(
|
|
|
|
name = "pyqt6",
|
2020-11-01 05:26:58 +01:00
|
|
|
python_runtime = "@python//:python",
|
2021-10-23 02:56:17 +02:00
|
|
|
requirements = "//python/pyqt:6_2/requirements.txt",
|
2020-11-01 05:26:58 +01:00
|
|
|
)
|
|
|
|
|
2021-10-23 02:56:17 +02:00
|
|
|
install_pyqt(
|
|
|
|
name = "pyqt515",
|
|
|
|
python_runtime = "@python//:python",
|
|
|
|
requirements = "//python/pyqt:5_15/requirements.txt",
|
|
|
|
)
|
|
|
|
|
|
|
|
install_pyqt(
|
|
|
|
name = "pyqt514",
|
2021-10-05 01:41:26 +02:00
|
|
|
python_runtime = "@python//:python",
|
2021-10-23 02:56:17 +02:00
|
|
|
requirements = "//python/pyqt:5_14/requirements.txt",
|
2021-10-05 01:41:26 +02:00
|
|
|
)
|
|
|
|
|
2021-10-15 14:46:53 +02:00
|
|
|
node_repositories(
|
|
|
|
package_json = ["@ankidesktop//:package.json"],
|
2022-02-25 07:19:26 +01:00
|
|
|
node_version = "16.13.2",
|
2021-10-15 14:46:53 +02:00
|
|
|
)
|
2020-11-01 05:26:58 +01:00
|
|
|
|
|
|
|
yarn_install(
|
|
|
|
name = "npm",
|
2021-10-07 03:34:00 +02:00
|
|
|
package_json = "@ankidesktop//:package.json",
|
|
|
|
yarn_lock = "@ankidesktop//:yarn.lock",
|
2020-11-01 05:26:58 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
sass_repositories()
|