mesonwrap
mesonwrap copied to clipboard
Fix get_current_version in meson/mesonbuild/wrap/wraptool.py to not rely on API path
def get_current_version(wrapfile):
cp = configparser.ConfigParser()
cp.read(wrapfile)
cp = cp['wrap-file']
patch_url = cp['patch_url']
arr = patch_url.split('/')
branch = arr[-3]
revision = int(arr[-2])
return branch, revision, cp['directory'], cp['source_filename'], cp['patch_filename']