@@ -2053,13 +2053,33 @@ def remove_inexisting_files(hpy_dir, our_dir):
2053
2053
remove_inexisting_files (hpy_repo_test_dir , test_files_dest )
2054
2054
2055
2055
# 'version.py' goes to 'lib-graalpython/module/hpy/devel/'
2056
- import_file (join (hpy_repo_path , "hpy" , "devel" , "version.py" ), join (_get_core_home (), "modules" , "hpy" , "devel" , "version.py" ))
2056
+ dest_version_file = join (_get_core_home (), "modules" , "hpy" , "devel" , "version.py" )
2057
+ import_file (join (hpy_repo_path , "hpy" , "devel" , "version.py" ), dest_version_file )
2058
+
2059
+ # read version from 'version.py'
2060
+ with open (dest_version_file , "r" ) as f :
2061
+ dummy_globals = {}
2062
+ exec (f .read (), dummy_globals )
2063
+ imported_version = dummy_globals ["__version__" ]
2057
2064
2058
2065
SUITE .vc .git_command (SUITE .dir , ["add" , header_dest , runtime_files_dest , test_files_dest ])
2059
2066
raw_input ("Check that the updated files look as intended, then press RETURN..." )
2060
2067
SUITE .vc .commit (SUITE .dir , "Update HPy inlined files: %s" % import_version )
2061
2068
SUITE .vc .git_command (SUITE .dir , ["checkout" , "-" ])
2062
2069
SUITE .vc .git_command (SUITE .dir , ["merge" , HPY_IMPORT_ORPHAN_BRANCH_NAME ])
2070
+
2071
+ # update PKG-INFO version
2072
+ pkg_info_file = join (_get_core_home (), "modules" , "hpy.devel.egg-info" , "PKG-INFO" )
2073
+ with open (pkg_info_file , "w" ) as f :
2074
+ f .write ("Metadata-Version: 2.1\n "
2075
+ "Name: hpy.devel\n "
2076
+ "Version: {}\n "
2077
+ "Summary: UNKNOWN\n "
2078
+ "Home-page: UNKNOWN\n "
2079
+ "License: UNKNOWN\n "
2080
+ "Description: UNKNOWN\n "
2081
+ "Platform: UNKNOWN\n "
2082
+ "Provides-Extra: dev" .format (imported_version ).strip ())
2063
2083
2064
2084
2065
2085
def run_leak_launcher (input_args , out = None ):
0 commit comments