Move target_version from coredata to mesonlib

pull/3486/head
Salamandar 7 years ago
parent b9c37e4fd2
commit dd91f96867
  1. 1
      mesonbuild/coredata.py
  2. 2
      mesonbuild/interpreter.py
  3. 5
      mesonbuild/interpreterbase.py
  4. 2
      mesonbuild/mesonlib.py

@ -23,7 +23,6 @@ import ast
import argparse
version = '0.47.0.dev1'
target_version = ''
backendlist = ['ninja', 'vs', 'vs2010', 'vs2015', 'vs2017', 'xcode']
default_yielding = False

@ -2286,7 +2286,7 @@ to directly access options of other subprojects.''')
if 'meson_version' in kwargs:
cv = coredata.version
pv = kwargs['meson_version']
coredata.target_version = pv
mesonlib.target_version = pv
if not mesonlib.version_compare(cv, pv):
raise InterpreterException('Meson version is %s but project requires %s.' % (cv, pv))
self.build.projects[self.subproject] = proj_name

@ -17,7 +17,6 @@
from . import mparser, mesonlib, mlog
from . import environment, dependencies
from . import coredata
import os, copy, re, types
from functools import wraps
@ -147,7 +146,7 @@ class FeatureNew:
def use(self):
self.add_called_feature()
tv = coredata.target_version
tv = mesonlib.target_version
if tv == '':
return
if not mesonlib.version_compare_condition_with_min(tv, self.feature_version):
@ -185,7 +184,7 @@ class FeatureDeprecated:
def use(self):
self.add_called_feature()
tv = coredata.target_version
tv = mesonlib.target_version
if tv == '':
return
if not mesonlib.version_compare_condition_with_max(tv, self.feature_version):

@ -23,6 +23,8 @@ from mesonbuild import mlog
have_fcntl = False
have_msvcrt = False
# Used to report conflicts between meson_version and new features used
target_version = ''
try:
import fcntl

Loading…
Cancel
Save