forked from pz4kybsvg/Conception
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.2 KiB
48 lines
1.2 KiB
# This is a separate file from drake_py.bzl because the dependency on
|
|
# @drake_detected_os is somewhat brittle and might present challenges
|
|
# for users exploring novel platforms.
|
|
|
|
load(
|
|
"@drake//tools/skylark:drake_py.bzl",
|
|
"drake_py_binary",
|
|
"drake_py_unittest",
|
|
)
|
|
load(
|
|
"@drake_detected_os//:os.bzl",
|
|
"UBUNTU_RELEASE",
|
|
)
|
|
|
|
def drake_py_binary_ubuntu_only(
|
|
name,
|
|
visibility = ["//visibility:private"],
|
|
**kwargs):
|
|
"""Declares a drake_py_binary iff we are building on Ubuntu.
|
|
Otherwise, does nothing.
|
|
|
|
The visibility defaults to private because this binary is not
|
|
cross-platform.
|
|
"""
|
|
if UBUNTU_RELEASE != None:
|
|
drake_py_binary(
|
|
name = name,
|
|
visibility = visibility,
|
|
**kwargs
|
|
)
|
|
|
|
def drake_py_unittest_ubuntu_only(
|
|
name,
|
|
visibility = ["//visibility:private"],
|
|
**kwargs):
|
|
"""Declares a drake_py_unittest iff we are building on Ubuntu.
|
|
Otherwise, does nothing.
|
|
|
|
The visibility defaults to private because this binary is not
|
|
cross-platform.
|
|
"""
|
|
if UBUNTU_RELEASE != None:
|
|
drake_py_unittest(
|
|
name = name,
|
|
visibility = visibility,
|
|
**kwargs
|
|
)
|