mesonbuild / mesonwrap

Meson wraps service and tools, please use https://github.com/mesonbuild/wrapdb for wraps issues
https://wrapdb.mesonbuild.com
Apache License 2.0
26 stars 7 forks source link

Fix get_current_version in meson/mesonbuild/wrap/wraptool.py to not rely on API path #66

Open sarum9in opened 6 years ago

sarum9in commented 6 years ago
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']