Skip to content

Commit

Permalink
handle more invalid x264 version strings
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Nov 24, 2022
1 parent 18cff56 commit 66eeba7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions setup.py
Expand Up @@ -118,10 +118,10 @@ def pkg_config_version(req_version, pkgname):
if r!=0 or not out:
return False
out = out.rstrip("\n\r")
#workaround for libx264 version numbers:
#ie: 0.163.x
if out.endswith(".x"):
out = out[:-2]
#workaround for libx264 invalid version numbers:
#ie: "0.163.x" or "0.164.3094M"
while out[-1].isalpha() or out[-1]==".":
out = out[:-1]
try:
from packaging.version import parse
return parse(out)>=parse(req_version)
Expand Down

0 comments on commit 66eeba7

Please sign in to comment.