summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGregory L. Lee <lee218@surface86.llnl.gov>2016-02-18 15:45:29 -0800
committerGregory L. Lee <lee218@surface86.llnl.gov>2016-02-18 15:45:29 -0800
commit19d10291bfeae45315fcef852baddec63b69247a (patch)
tree292073c65a0da4ec1c4c15089e28c5903d7dc7c3 /var
parentd8a70166d3abd14b5a34025f735cf1825179f84f (diff)
downloadspack-19d10291bfeae45315fcef852baddec63b69247a.tar.gz
spack-19d10291bfeae45315fcef852baddec63b69247a.tar.bz2
spack-19d10291bfeae45315fcef852baddec63b69247a.tar.xz
spack-19d10291bfeae45315fcef852baddec63b69247a.zip
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.