-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
repository.bzl
46 lines (39 loc) · 1.28 KB
/
repository.bzl
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
# -*- python -*-
load("//tools/workspace:generate_file.bzl", "generate_file")
load("@drake//tools/workspace:github.bzl", "github_archive")
# Using the `drake` branch of this repository.
_REPOSITORY = "svenevs/pybind11"
# When upgrading this commit, check the version header within
# https://github.com/RobotLocomotion/pybind11/blob/drake/include/pybind11/detail/common.h
# and if it has changed, then update the version number in the two
# pybind11-*.cmake files in the current directory to match.
_COMMIT = "3d90c7d32ea615148e7ec1ac609f773f5580f478"
_SHA256 = "8c8f11f054eedb409655997f0c6801ee62f45bdea4b911296a04489ed79e0d1c"
def pybind11_repository(
name,
mirrors = None):
github_archive(
name = name,
repository = _REPOSITORY,
commit = _COMMIT,
sha256 = _SHA256,
build_file = ":package.BUILD.bazel",
mirrors = mirrors,
)
def generate_pybind11_version_py_file(name):
vars = dict(
repository = repr(_REPOSITORY),
commit = repr(_COMMIT),
sha256 = repr(_SHA256),
)
generate_file(
name = name,
content = '''
"""
Provides information on the external fork of `pybind11` used by `pydrake`.
"""
repository = {repository}
commit = {commit}
sha256 = {sha256}
'''.format(**vars),
)