forked from RussTedrake/manipulation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE.bazel
66 lines (47 loc) · 1.76 KB
/
WORKSPACE.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# -*- mode: python -*-
# vi: set ft=python :
# Copyright 2020-2021 Massachusetts Institute of Technology.
# Licensed under the BSD 3-Clause License. See LICENSE.TXT for details.
workspace(name = "manipulation")
load(
"//htmlbook/tools:repositories.bzl",
"rt_dependencies",
"rt_toolchains",
)
rt_dependencies()
rt_toolchains()
load("@bazel_skylib//lib:versions.bzl", "versions")
versions.check("2.0.0")
load("//htmlbook/tools/buildifier:repositories.bzl", "buildifier_dependencies")
buildifier_dependencies()
load("//htmlbook/tools/tidy:repositories.bzl", "tidy_dependencies")
tidy_dependencies()
# Set the DRAKE_INSTALL_DIR environment variable to the correct path; if
# DRAKE_INSTALL_DIR is not set it will look in "/opt/drake".
load("//htmlbook/tools:environ.bzl", "environ_repository")
# Allowing PWD to be loaded here is a terrible work-around that allows me to
# pass the equivalent of BUILD_WORKSPACE_DIRECTORY as a command line argument
# (since it's not available to tests). This enables *non-hermetic* tests...
# which I introduced because it is hard to list all .py and .ipynb files as
# dependencies via bazel's glob since "labels are not allowed to cross the
# package boundary and glob does not match files in subpackages."
environ_repository(
name = "environ",
vars = [
"DRAKE_INSTALL_DIR",
"PWD",
],
)
load("@environ//:environ.bzl", "DRAKE_INSTALL_DIR")
new_local_repository(
name = "rules_drake",
build_file_content = "",
path = DRAKE_INSTALL_DIR if DRAKE_INSTALL_DIR else "/opt/drake",
)
load("@rules_drake//:share/drake/repo.bzl", "drake_repository")
drake_repository(name = "drake")
load("@rules_python//python:pip.bzl", "pip_install")
pip_install(
name = "pip",
requirements = "//:requirements.txt",
)