From 0fb6bf4189c57802fafb611f18f419cd6b588ac4 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 12 Jun 2010 14:37:19 -0400 Subject: Improved the way that acprep finds Python If Boost.Python comes from /opt, then Python must too. --- acprep | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'acprep') diff --git a/acprep b/acprep index d07d3bef..92bbd89e 100755 --- a/acprep +++ b/acprep @@ -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 ' 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: -- cgit v1.2.3