Austin Schuh | 85fc6f1 | 2018-01-23 21:59:43 -0800 | [diff] [blame] | 1 | licenses(["notice"]) |
| 2 | |
| 3 | cc_library( |
| 4 | name = "matplotlib-cpp", |
| 5 | hdrs = [ |
Austin Schuh | dde6405 | 2019-12-11 20:28:00 -0800 | [diff] [blame] | 6 | "matplotlibcpp.h", |
Austin Schuh | 85fc6f1 | 2018-01-23 21:59:43 -0800 | [diff] [blame] | 7 | ], |
Philipp Schrader | 01535ee | 2023-01-08 13:19:03 -0800 | [diff] [blame^] | 8 | data = [ |
Philipp Schrader | 1f0a3d0 | 2022-12-21 20:30:42 -0800 | [diff] [blame] | 9 | "//third_party/python:python_runtime", |
Philipp Schrader | 01535ee | 2023-01-08 13:19:03 -0800 | [diff] [blame^] | 10 | "@pip//matplotlib", |
| 11 | "@pip//pygobject", |
Austin Schuh | c4a833d | 2020-07-03 18:14:58 -0700 | [diff] [blame] | 12 | ], |
Philipp Schrader | 12da812 | 2020-12-12 18:08:23 -0800 | [diff] [blame] | 13 | # While this is technically compatible with "linux", the |
| 14 | # "@python_repo//:all_files" has x86 binaries in it. |
| 15 | target_compatible_with = ["@platforms//cpu:x86_64"], |
Austin Schuh | dde6405 | 2019-12-11 20:28:00 -0800 | [diff] [blame] | 16 | visibility = ["//visibility:public"], |
Philipp Schrader | 01535ee | 2023-01-08 13:19:03 -0800 | [diff] [blame^] | 17 | deps = [ |
Philipp Schrader | 1f0a3d0 | 2022-12-21 20:30:42 -0800 | [diff] [blame] | 18 | "//third_party/python", |
Philipp Schrader | 01535ee | 2023-01-08 13:19:03 -0800 | [diff] [blame^] | 19 | "//third_party/python:numpy_cc", |
Austin Schuh | 85fc6f1 | 2018-01-23 21:59:43 -0800 | [diff] [blame] | 20 | ], |
Austin Schuh | 85fc6f1 | 2018-01-23 21:59:43 -0800 | [diff] [blame] | 21 | ) |
| 22 | |
| 23 | cc_binary( |
| 24 | name = "basic_example", |
| 25 | srcs = [ |
| 26 | "examples/basic.cpp", |
| 27 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 28 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 85fc6f1 | 2018-01-23 21:59:43 -0800 | [diff] [blame] | 29 | deps = [ |
| 30 | "matplotlib-cpp", |
| 31 | ], |
Austin Schuh | 85fc6f1 | 2018-01-23 21:59:43 -0800 | [diff] [blame] | 32 | ) |
| 33 | |
| 34 | cc_binary( |
| 35 | name = "animation_example", |
| 36 | srcs = [ |
| 37 | "examples/animation.cpp", |
| 38 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 39 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 85fc6f1 | 2018-01-23 21:59:43 -0800 | [diff] [blame] | 40 | deps = [ |
| 41 | "matplotlib-cpp", |
| 42 | ], |
Austin Schuh | 85fc6f1 | 2018-01-23 21:59:43 -0800 | [diff] [blame] | 43 | ) |