Skip to content

Commit e25ebcd

Browse files
committed
Also import HPy's devel/__init__.py
1 parent 11ab522 commit e25ebcd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2139,6 +2139,15 @@ def exclude_subdir(subdir):
21392139
# headers go into 'com.oracle.graal.python.cext/include'
21402140
header_dest = join(mx.project("com.oracle.graal.python.cext").dir, "include")
21412141

2142+
# copy 'hpy/devel/__init__.py' to 'lib-graalpython/module/hpy/devel/__init__.py'
2143+
dest_devel_file = join(_get_core_home(), "modules", "hpy", "devel", "__init__.py")
2144+
src_devel_file = join(hpy_repo_path, "hpy", "devel", "__init__.py")
2145+
if not os.path.exists(src_devel_file):
2146+
SUITE.vc.git_command(SUITE.dir, ["reset", "--hard"])
2147+
SUITE.vc.git_command(SUITE.dir, ["checkout", "-"])
2148+
mx.abort("File '{}' is missing but required.".format(src_devel_file))
2149+
import_file(src_devel_file, dest_devel_file)
2150+
21422151
# 'version.py' goes to 'lib-graalpython/module/hpy/devel/'
21432152
dest_version_file = join(_get_core_home(), "modules", "hpy", "devel", "version.py")
21442153
src_version_file = join(hpy_repo_path, "hpy", "devel", "version.py")

0 commit comments

Comments
 (0)