Skip to content

Commit bdef6ef

Browse files
authored
librt cache tests: build respecting MYPY_TEST_PREFIX (#21097)
similar to #21034
1 parent abbeb73 commit bdef6ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypyc/test/librt_cache.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
from mypyc.build import LIBRT_MODULES, get_cflags, include_dir
3333
from mypyc.common import RUNTIME_C_FILES
34+
from mypyc.test.config import PREFIX
3435

3536

3637
def _librt_build_hash(experimental: bool, opt_level: str) -> str:
@@ -153,8 +154,7 @@ def get_librt_path(experimental: bool = True, opt_level: str = "0") -> str:
153154
Path to directory containing built librt modules.
154155
"""
155156
# Use build/librt-cache/ under the repo root (gitignored)
156-
repo_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
157-
cache_root = os.path.join(repo_root, "build", "librt-cache")
157+
cache_root = os.path.join(PREFIX, "build", "librt-cache")
158158
build_hash = _librt_build_hash(experimental, opt_level)
159159
build_dir = os.path.join(cache_root, f"librt-{build_hash}")
160160
lock_file = os.path.join(cache_root, f"librt-{build_hash}.lock")

0 commit comments

Comments
 (0)