summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Scogland <tom.scogland@gmail.com>2016-08-18 11:55:40 -0700
committerGitHub <noreply@github.com>2016-08-18 11:55:40 -0700
commitc8dd1bb40b5c145ca3047cfbb541ef851ebd5759 (patch)
tree2bade735a697d2ca34cab931a08ca7d4b191e25a
parent7f57405eac19fd2f28d32e7c69348112653ad6e8 (diff)
parent3445a781ebb8205a44e629568f660e9a5d1d0309 (diff)
downloadspack-c8dd1bb40b5c145ca3047cfbb541ef851ebd5759.tar.gz
spack-c8dd1bb40b5c145ca3047cfbb541ef851ebd5759.tar.bz2
spack-c8dd1bb40b5c145ca3047cfbb541ef851ebd5759.tar.xz
spack-c8dd1bb40b5c145ca3047cfbb541ef851ebd5759.zip
Merge pull request #1527 from SteVwonder/py-cffi-rpath-fix
py-cffi: set LDSHARED in env so that rpath is set
-rw-r--r--var/spack/repos/builtin/packages/py-cffi/package.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-cffi/package.py b/var/spack/repos/builtin/packages/py-cffi/package.py
index 3c1044783f..7c08e51de8 100644
--- a/var/spack/repos/builtin/packages/py-cffi/package.py
+++ b/var/spack/repos/builtin/packages/py-cffi/package.py
@@ -22,6 +22,8 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
+import os
+
from spack import *
@@ -39,4 +41,12 @@ class PyCffi(Package):
depends_on('libffi')
def install(self, spec, prefix):
+ # This sets the compiler (and flags) that distutils will use
+ # to create the final shared library. It will use the
+ # compiler specified by the environment variable 'CC' for all
+ # other compilation. We are setting the 'LDSHARED" to the
+ # spack compiler wrapper plus a few extra flags necessary for
+ # building the shared library.
+ os.environ['LDSHARED'] = "{0} -shared -pthread".format(spack_cc)
+
python('setup.py', 'install', '--prefix=%s' % prefix)