Skip to content

Commit f74626c

Browse files
committed
discover lib-rt source more flexibly
1 parent c73021f commit f74626c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

mypyc/test/test_external.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313
from mypyc.build import get_cflags, include_dir
1414

15-
base_dir = os.path.join(os.path.dirname(__file__), "..", "..")
15+
from .config import PREFIX
16+
1617
EXCLUDED_LIB_RT_COMPILE_FILES = ["static_data.c"]
1718

1819

@@ -88,7 +89,7 @@ def test_c_unit_test(self) -> None:
8889
"--run-capi-tests",
8990
],
9091
env=env,
91-
cwd=os.path.join(base_dir, "mypyc", "lib-rt"),
92+
cwd=os.path.join(PREFIX, "mypyc", "lib-rt"),
9293
)
9394
# Run C unit tests.
9495
env = os.environ.copy()

0 commit comments

Comments
 (0)