mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
Move pybind11 over, delete the WORKSPACE files, and fix a test which assumed WORKSPACE support was enabled. --------- Signed-off-by: Austin Schuh <austin.linux@gmail.com>
34 lines
1.2 KiB
Python
34 lines
1.2 KiB
Python
# Copyright (c) FIRST and other WPILib contributors.
|
|
# Open Source Software; you can modify and/or share it under the terms of
|
|
# the WPILib BSD license file in the root directory of this project.
|
|
|
|
"""Bazel rule definition for publishing maven artifacts."""
|
|
|
|
def _publishing_repo_impl(repository_ctx):
|
|
"""Implementation of the publishing_repo rule."""
|
|
classifier_filter = repository_ctx.os.environ.get("WPI_PUBLISH_CLASSIFIER_FILTER", "")
|
|
|
|
content = """# Generated by publishing_repo rule. DO NOT EDIT.
|
|
|
|
CLASSIFIER_FILTER = "{classifier_filter}"
|
|
""".format(
|
|
classifier_filter = classifier_filter,
|
|
)
|
|
repository_ctx.file("publishing_config.bzl", content)
|
|
repository_ctx.file("BUILD.bazel", content = "# Generated file")
|
|
|
|
publishing_repo = repository_rule(
|
|
implementation = _publishing_repo_impl,
|
|
environ = ["WPI_PUBLISH_CLASSIFIER_FILTER"],
|
|
doc = "Repository rule to determine host OS and classifier filter for publishing.",
|
|
)
|
|
|
|
def _publishing_extension_impl(module_ctx):
|
|
publishing_repo(
|
|
name = "com_wpilib_allwpilib_publishing_config",
|
|
)
|
|
|
|
publishing_extension = module_extension(
|
|
implementation = _publishing_extension_impl,
|
|
)
|