summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-02-24 10:52:06 +0900
committerTodd Gamblin <tgamblin@llnl.gov>2016-02-24 10:52:06 +0900
commit0d23ff92b081ac5a580a684ab13d3d98b9b55620 (patch)
treeb167c46120f3fd49129796f170fa99d264ec6017 /var
parent87610a5102d234741b342efa82f30e0ec4db32c5 (diff)
parent19d10291bfeae45315fcef852baddec63b69247a (diff)
downloadspack-0d23ff92b081ac5a580a684ab13d3d98b9b55620.tar.gz
spack-0d23ff92b081ac5a580a684ab13d3d98b9b55620.tar.bz2
spack-0d23ff92b081ac5a580a684ab13d3d98b9b55620.tar.xz
spack-0d23ff92b081ac5a580a684ab13d3d98b9b55620.zip
Merge pull request #446 from LLNL/bugfix/python_config_compiler
modify compiler commands in python config files, fix for #431
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/python/package.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index a1ce06feb0..58d401244e 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -55,6 +55,20 @@ class Python(Package):
make()
make("install")
+ # Modify compiler paths in configuration files. This is necessary for
+ # building site packages outside of spack
+ filter_file(r'([/s]=?)([\S=]*)/lib/spack/env(/[^\s/]*)?/(\S*)(\s)',
+ (r'\4\5'),
+ join_path(prefix.lib, 'python%d.%d' % self.version[:2], '_sysconfigdata.py'))
+
+ python3_version = ''
+ if spec.satisfies('@3:'):
+ python3_version = '-%d.%dm' % self.version[:2]
+ makefile_filepath = join_path(prefix.lib, 'python%d.%d' % self.version[:2], 'config%s' % python3_version, 'Makefile')
+ filter_file(r'([/s]=?)([\S=]*)/lib/spack/env(/[^\s/]*)?/(\S*)(\s)',
+ (r'\4\5'),
+ makefile_filepath)
+
# ========================================================================
# Set up environment to make install easy for python extensions.