From da2c4ad3a892780cea8058ad170d27b3a7e74a82 Mon Sep 17 00:00:00 2001 From: Jon Turney <jon.turney@dronecode.org.uk> Date: Mon, 13 Aug 2018 17:40:25 +0100 Subject: Use the exact current version in obtainMesonOutput Currently this trims '0.48.0.dev1' to '0.48.0', and then requires exactly that version in the generated meson.build for the test. Just use the exact version. Also only use a 'project(meson_version:)' constraint in the generated project if a version is specified Also remove unused grab_leading_numbers --- mesonbuild/mesonlib.py | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'mesonbuild/mesonlib.py') diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index 1c63f17..b117cf5 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -391,19 +391,6 @@ def detect_vcs(source_dir): return vcs return None -def grab_leading_numbers(vstr, strict=False): - result = [] - for x in vstr.rstrip('.').split('.'): - try: - result.append(int(x)) - except ValueError as e: - if strict: - msg = 'Invalid version to compare against: {!r}; only ' \ - 'numeric digits separated by "." are allowed: ' + str(e) - raise MesonException(msg.format(vstr)) - break - return result - # a helper class which implements the same version ordering as RPM @functools.total_ordering class Version: -- cgit v1.1