diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-01-17 01:17:04 +0100 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-01-28 01:03:12 +0000 |
commit | 75e41478cc954e3a2c445d77593247ee71380b6f (patch) | |
tree | a51b52b3118201649aa75ddafbeb50bb7e8a088a /wscript | |
parent | bc1af592db53f8b80256a75ebce4cc1da8c1d601 (diff) | |
download | mpv-75e41478cc954e3a2c445d77593247ee71380b6f.tar.bz2 mpv-75e41478cc954e3a2c445d77593247ee71380b6f.tar.xz |
waf: migrate to version.py
Fixes https://github.com/mpv-player/mpv-build/issues/204
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -1018,7 +1018,7 @@ def configure(ctx): ctx.add_os_flags('LIBRARY_PATH') - ctx.load('compiler_c') + ctx.load('compiler_c python') ctx.load('waf_customizations') ctx.load('dependencies') ctx.load('detections.compiler_swift') @@ -1075,16 +1075,11 @@ def configure(ctx): Logs.error("WARNING: Building mpv with waf is deprecated and will be removed the future! It is recommended to switch to meson as soon as possible.") def __write_version__(ctx): - ctx.env.VERSIONH_ST = '--versionh="%s"' - ctx.env.CWD_ST = '--cwd="%s"' - ctx.env.VERSIONSH_CWD = [ctx.srcnode.abspath()] - ctx( - source = 'version.sh', + source = 'version.py', target = 'generated/version.h', - rule = 'sh ${SRC} ${CWD_ST:VERSIONSH_CWD} ${VERSIONH_ST:TGT}', - always = True, - update_outputs = True) + rule = '${PYTHON} ${SRC} ${TGT}', + always = True) def build(ctx): if ctx.options.variant not in ctx.all_envs: |