Files
allwpilib/shared/bazel/rules/robotpy/hack_pkgcfgs.py
PJ Reiniger bd1dcc4358 [bazel][robotpy] Add mirror for robotpy's wpiuil and wpinet libraries (#8062)
Project import generated by Copybara.

GitOrigin-RevId: 92ea93d1b47a82667044bd0af05f7fdb34d2c2c2
2025-08-30 11:55:11 -07:00

20 lines
578 B
Python

import os
import pathlib
from typing import List
def hack_pkgconfig(pkgcfgs: List[pathlib.Path]):
"""
This will place the given files in the PKG_CONFIG_PATH in such a way that will trick
semiwrap into thinking the libraries have been installed
"""
pkg_config_paths = os.environ.get("PKG_CONFIG_PATH", "").split(os.pathsep)
if pkgcfgs:
for pc in pkgcfgs:
# pkg_config_paths.append(str(pc.parent.absolute()))
pkg_config_paths.append(str(pc.parent))
os.environ["PKG_CONFIG_PATH"] = os.pathsep.join(pkg_config_paths)