diff options
author | Gerion Entrup <gerion.entrup@flump.de> | 2020-02-14 13:03:39 +0100 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2020-02-17 01:10:40 +0530 |
commit | b1304f729079fdc07523904902273ac581cfb702 (patch) | |
tree | 0a8840f64d7b3c2d96464d19f9a4a0c7e9a3f8bb /mesonbuild/dependencies/base.py | |
parent | 08d8cfbbb676913398aed2f9d3d5253d1aef9735 (diff) | |
download | meson-b1304f729079fdc07523904902273ac581cfb702.zip meson-b1304f729079fdc07523904902273ac581cfb702.tar.gz meson-b1304f729079fdc07523904902273ac581cfb702.tar.bz2 |
version parsing: match only when version starts with a number
This leads to better version parsing. An concrete example use case is
llc. When invoking llc with "--version", the output is
```
LLVM (http://llvm.org/):
LLVM version 9.0.1
...
```
The old version parsing recognizes the dot in the first line as version.
This commit also tries to adapt the two regexes to each other.
Reported-by: Björn Fiedler <fiedler@sra.uni-hannover.de>
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r-- | mesonbuild/dependencies/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index fac7435..6f8181d 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -388,7 +388,7 @@ class ConfigToolDependency(ExternalDependency): tools = None tool_name = None - __strip_version = re.compile(r'^[0-9.]*') + __strip_version = re.compile(r'^[0-9][0-9.]+') def __init__(self, name, environment, kwargs, language: T.Optional[str] = None): super().__init__('config-tool', environment, kwargs, language=language) |