|
|
@ -405,9 +405,10 @@ class BoostDependency(Dependency): |
|
|
|
self.boost_root = self.detect_win_root() |
|
|
|
self.boost_root = self.detect_win_root() |
|
|
|
self.incdir = os.path.join(self.boost_root, 'boost') |
|
|
|
self.incdir = os.path.join(self.boost_root, 'boost') |
|
|
|
else: |
|
|
|
else: |
|
|
|
self.incdir = '/usr/include/boost' |
|
|
|
self.incdir = '/usr/include' |
|
|
|
else: |
|
|
|
else: |
|
|
|
self.incdir = os.path.join(self.boost_root, 'include/boost') |
|
|
|
self.incdir = os.path.join(self.boost_root, 'include') |
|
|
|
|
|
|
|
self.boost_inc_subdir = os.path.join(self.incdir, 'boost') |
|
|
|
mlog.debug('Boost library root dir is', self.boost_root) |
|
|
|
mlog.debug('Boost library root dir is', self.boost_root) |
|
|
|
self.src_modules = {} |
|
|
|
self.src_modules = {} |
|
|
|
self.lib_modules = {} |
|
|
|
self.lib_modules = {} |
|
|
@ -442,13 +443,12 @@ class BoostDependency(Dependency): |
|
|
|
args.append('-I' + self.boost_root) |
|
|
|
args.append('-I' + self.boost_root) |
|
|
|
else: |
|
|
|
else: |
|
|
|
args.append('-I' + os.path.join(self.boost_root, 'include')) |
|
|
|
args.append('-I' + os.path.join(self.boost_root, 'include')) |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
args.append('-I' + self.incdir) |
|
|
|
return args |
|
|
|
return args |
|
|
|
|
|
|
|
|
|
|
|
def get_requested(self, kwargs): |
|
|
|
def get_requested(self, kwargs): |
|
|
|
modules = 'modules' |
|
|
|
candidates = kwargs.get('modules', []) |
|
|
|
if not modules in kwargs: |
|
|
|
|
|
|
|
raise DependencyException('Boost dependency must specify "%s" keyword.' % modules) |
|
|
|
|
|
|
|
candidates = kwargs[modules] |
|
|
|
|
|
|
|
if isinstance(candidates, str): |
|
|
|
if isinstance(candidates, str): |
|
|
|
return [candidates] |
|
|
|
return [candidates] |
|
|
|
for c in candidates: |
|
|
|
for c in candidates: |
|
|
@ -469,7 +469,7 @@ class BoostDependency(Dependency): |
|
|
|
|
|
|
|
|
|
|
|
def detect_version(self): |
|
|
|
def detect_version(self): |
|
|
|
try: |
|
|
|
try: |
|
|
|
ifile = open(os.path.join(self.incdir, 'version.hpp')) |
|
|
|
ifile = open(os.path.join(self.boost_inc_subdir, 'version.hpp')) |
|
|
|
except FileNotFoundError: |
|
|
|
except FileNotFoundError: |
|
|
|
self.version = None |
|
|
|
self.version = None |
|
|
|
return |
|
|
|
return |
|
|
@ -482,8 +482,8 @@ class BoostDependency(Dependency): |
|
|
|
self.version = None |
|
|
|
self.version = None |
|
|
|
|
|
|
|
|
|
|
|
def detect_src_modules(self): |
|
|
|
def detect_src_modules(self): |
|
|
|
for entry in os.listdir(self.incdir): |
|
|
|
for entry in os.listdir(self.boost_inc_subdir): |
|
|
|
entry = os.path.join(self.incdir, entry) |
|
|
|
entry = os.path.join(self.boost_inc_subdir, entry) |
|
|
|
if stat.S_ISDIR(os.stat(entry).st_mode): |
|
|
|
if stat.S_ISDIR(os.stat(entry).st_mode): |
|
|
|
self.src_modules[os.path.split(entry)[-1]] = True |
|
|
|
self.src_modules[os.path.split(entry)[-1]] = True |
|
|
|
|
|
|
|
|
|
|
|