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 | 1f0a3d0 | 2022-12-21 20:30:42 -0800 | [diff] [blame^] | 8 | 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 Schuh | c4a833d | 2020-07-03 18:14:58 -0700 | [diff] [blame] | 18 | ], |
Philipp Schrader | 12da812 | 2020-12-12 18:08:23 -0800 | [diff] [blame] | 19 | # 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 Schuh | dde6405 | 2019-12-11 20:28:00 -0800 | [diff] [blame] | 22 | visibility = ["//visibility:public"], |
Philipp Schrader | 1f0a3d0 | 2022-12-21 20:30:42 -0800 | [diff] [blame^] | 23 | 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 Schuh | 85fc6f1 | 2018-01-23 21:59:43 -0800 | [diff] [blame] | 30 | ], |
Austin Schuh | 85fc6f1 | 2018-01-23 21:59:43 -0800 | [diff] [blame] | 31 | ) |
| 32 | |
| 33 | cc_binary( |
| 34 | name = "basic_example", |
| 35 | srcs = [ |
| 36 | "examples/basic.cpp", |
| 37 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 38 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 85fc6f1 | 2018-01-23 21:59:43 -0800 | [diff] [blame] | 39 | deps = [ |
| 40 | "matplotlib-cpp", |
| 41 | ], |
Austin Schuh | 85fc6f1 | 2018-01-23 21:59:43 -0800 | [diff] [blame] | 42 | ) |
| 43 | |
| 44 | cc_binary( |
| 45 | name = "animation_example", |
| 46 | srcs = [ |
| 47 | "examples/animation.cpp", |
| 48 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 49 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 85fc6f1 | 2018-01-23 21:59:43 -0800 | [diff] [blame] | 50 | deps = [ |
| 51 | "matplotlib-cpp", |
| 52 | ], |
Austin Schuh | 85fc6f1 | 2018-01-23 21:59:43 -0800 | [diff] [blame] | 53 | ) |