mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[bazel][robotpy] Add mirror for robotpy's wpiuil and wpinet libraries (#8062)
Project import generated by Copybara. GitOrigin-RevId: 92ea93d1b47a82667044bd0af05f7fdb34d2c2c2
This commit is contained in:
19
shared/bazel/rules/robotpy/hack_pkgcfgs.py
Normal file
19
shared/bazel/rules/robotpy/hack_pkgcfgs.py
Normal file
@@ -0,0 +1,19 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user