From: Michael R. Crusoe <crusoe@debian.org>
Subject: discover lib-rt source more flexibly
Forwarded: https://github.com/python/mypy/pull/21034
--- mypy.orig/mypyc/test/test_external.py
+++ mypy/mypyc/test/test_external.py
@@ -8,7 +8,7 @@
 import tempfile
 import unittest
 
-base_dir = os.path.join(os.path.dirname(__file__), "..", "..")
+from .config import PREFIX
 
 
 class TestExternal(unittest.TestCase):
@@ -37,7 +37,7 @@
                     "--run-capi-tests",
                 ],
                 env=env,
-                cwd=os.path.join(base_dir, "mypyc", "lib-rt"),
+                cwd=os.path.join(PREFIX, "mypyc", "lib-rt"),
             )
             # Run C unit tests.
             env = os.environ.copy()
