blob: bd10366ca51e17b737d01237896abaadcde2c268 [file] [log] [blame]
Austin Schuh85fc6f12018-01-23 21:59:43 -08001licenses(["notice"])
2
3cc_library(
4 name = "matplotlib-cpp",
5 hdrs = [
Austin Schuhdde64052019-12-11 20:28:00 -08006 "matplotlibcpp.h",
Austin Schuh85fc6f12018-01-23 21:59:43 -08007 ],
Philipp Schrader1f0a3d02022-12-21 20:30:42 -08008 data = select({
9 "//tools/platforms/python:debian_bundled_python": [
10 "@matplotlib_repo//:matplotlib3",
11 ],
12 "//tools/platforms/python:upstream_bundled_python": [
13 "@pip//matplotlib",
14 "@pip//pygobject",
15 ],
16 }) + [
17 "//third_party/python:python_runtime",
Austin Schuhc4a833d2020-07-03 18:14:58 -070018 ],
Philipp Schrader12da8122020-12-12 18:08:23 -080019 # While this is technically compatible with "linux", the
20 # "@python_repo//:all_files" has x86 binaries in it.
21 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuhdde64052019-12-11 20:28:00 -080022 visibility = ["//visibility:public"],
Philipp Schrader1f0a3d02022-12-21 20:30:42 -080023 deps = select({
24 "//tools/platforms/python:debian_bundled_python": [],
25 "//tools/platforms/python:upstream_bundled_python": [
26 "//third_party/python:numpy_cc",
27 ],
28 }) + [
29 "//third_party/python",
Austin Schuh85fc6f12018-01-23 21:59:43 -080030 ],
Austin Schuh85fc6f12018-01-23 21:59:43 -080031)
32
33cc_binary(
34 name = "basic_example",
35 srcs = [
36 "examples/basic.cpp",
37 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080038 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh85fc6f12018-01-23 21:59:43 -080039 deps = [
40 "matplotlib-cpp",
41 ],
Austin Schuh85fc6f12018-01-23 21:59:43 -080042)
43
44cc_binary(
45 name = "animation_example",
46 srcs = [
47 "examples/animation.cpp",
48 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080049 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh85fc6f12018-01-23 21:59:43 -080050 deps = [
51 "matplotlib-cpp",
52 ],
Austin Schuh85fc6f12018-01-23 21:59:43 -080053)