diff options
-rwxr-xr-x | acprep | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -113,10 +113,11 @@ class BoostInfo(object): def inform_boost_details(self): self.log.info('Boost was found here:') + self.log.info('Boost home path => ' + self.home_path) self.log.info('Boost include path => ' + self.include_directory()) self.log.info('Boost library path => ' + self.library_directory()) - self.log.info('Boost suffix => ' + self.suffix) - self.log.info('Boost file suffix => ' + self.file_suffix) + self.log.info('Boost suffix => ' + self.suffix) + self.log.info('Boost file suffix => ' + self.file_suffix) def find_boost_in_directory(self, path): if exists(path) and isdir(path): @@ -913,9 +914,16 @@ class PrepareBuild(CommandLineApp): ######################################################################### def setup_system_directories(self): + boost_include = self.boost_info.include_directory() + boost_library = self.boost_info.library_directory() + + if re.match('/opt/local', self.boost_info.home_path): + self.log.debug("Setting Python home to /opt/local based on Boost's location") + self.envvars['PYTHON_HOME'] = '/opt/local' + # Each of these becomes '-isystem <name>' for path in ['/usr/local/include', - self.boost_info.include_directory(), + boost_include, '%s/include/python%s' % (self.envvars['PYTHON_HOME'], self.envvars['PYTHON_VERSION'].strip()), @@ -933,7 +941,7 @@ class PrepareBuild(CommandLineApp): % (self.envvars['PYTHON_HOME'], self.envvars['PYTHON_VERSION'].strip()), '/opt/local/lib', - self.boost_info.library_directory(), + boost_library, '/sw/lib']: if exists(path) and isdir(path) and \ path not in self.sys_library_dirs: |