diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-12 14:37:19 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-12 14:37:19 -0400 |
commit | 0fb6bf4189c57802fafb611f18f419cd6b588ac4 (patch) | |
tree | 54694848577ca9570ed1c0157d8ae4c7a8073589 /acprep | |
parent | 41902400280a8fddb0c97e5fd79a489c9f973908 (diff) | |
download | fork-ledger-0fb6bf4189c57802fafb611f18f419cd6b588ac4.tar.gz fork-ledger-0fb6bf4189c57802fafb611f18f419cd6b588ac4.tar.bz2 fork-ledger-0fb6bf4189c57802fafb611f18f419cd6b588ac4.zip |
Improved the way that acprep finds Python
If Boost.Python comes from /opt, then Python must too.
Diffstat (limited to 'acprep')
-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: |