Skip to content

Commit 6ac8fd9

Browse files
committed
Always copy header files.
1 parent 981330d commit 6ac8fd9

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,15 +1166,12 @@ def _dev_headers_dir(self):
11661166
return os.path.join(SUITE.dir, "graalpython", "include")
11671167

11681168
def _prepare_headers(self):
1169-
# This should only be done for the base task, otherwise we'll duplicate
1170-
# the work. This is a development-time thing, because we need the
1171-
# include directory for the C API to be next to lib-graalpython
1172-
if type(self) == GraalpythonCAPIBuildTask: # pylint: disable=unidiomatic-typecheck;
1173-
target_dir = self._dev_headers_dir()
1174-
if os.path.exists(target_dir):
1175-
shutil.rmtree(target_dir)
1176-
shutil.copytree(os.path.join(self.src_dir(), "include"), target_dir)
1177-
shutil.copy(os.path.join(mx.dependency("SULONG_LEGACY").get_output(), "include", "truffle.h"), target_dir)
1169+
target_dir = self._dev_headers_dir()
1170+
if os.path.exists(target_dir):
1171+
shutil.rmtree(target_dir)
1172+
mx.logv("Preparing header files (dest: {!s})".format(target_dir))
1173+
shutil.copytree(os.path.join(self.src_dir(), "include"), target_dir)
1174+
shutil.copy(os.path.join(mx.dependency("SULONG_LEGACY").get_output(), "include", "truffle.h"), target_dir)
11781175

11791176
def build(self):
11801177
self._prepare_headers()

0 commit comments

Comments
 (0)