summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-02-15 01:59:36 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2015-02-15 01:59:36 -0800
commit3c0048dd89e4d18ac95afd19b65d7ce54a48d862 (patch)
tree9feded8d79080c20c2e357de0b7f4cf92bc426ae /var
parentc0c08799249fb56c281f62b3659e7cf7d7080188 (diff)
downloadspack-3c0048dd89e4d18ac95afd19b65d7ce54a48d862.tar.gz
spack-3c0048dd89e4d18ac95afd19b65d7ce54a48d862.tar.bz2
spack-3c0048dd89e4d18ac95afd19b65d7ce54a48d862.tar.xz
spack-3c0048dd89e4d18ac95afd19b65d7ce54a48d862.zip
py-sip installs properly into a prefix
Diffstat (limited to 'var')
-rw-r--r--var/spack/packages/py-sip/package.py7
-rw-r--r--var/spack/packages/python/package.py10
2 files changed, 14 insertions, 3 deletions
diff --git a/var/spack/packages/py-sip/package.py b/var/spack/packages/py-sip/package.py
index 06aea35a74..6753bdd2a5 100644
--- a/var/spack/packages/py-sip/package.py
+++ b/var/spack/packages/py-sip/package.py
@@ -1,4 +1,5 @@
from spack import *
+import os
class PySip(Package):
"""SIP is a tool that makes it very easy to create Python bindings for C and C++ libraries."""
@@ -10,6 +11,10 @@ class PySip(Package):
extends('python')
def install(self, spec, prefix):
- python('configure.py')
+ python('configure.py',
+ '--destdir=%s' % site_packages_dir,
+ '--bindir=%s' % spec.prefix.bin,
+ '--incdir=%s' % python_include_dir,
+ '--sipdir=%s' % os.path.join(spec.prefix.share, 'sip'))
make()
make('install')
diff --git a/var/spack/packages/python/package.py b/var/spack/packages/python/package.py
index de7f412b52..fb875a7eeb 100644
--- a/var/spack/packages/python/package.py
+++ b/var/spack/packages/python/package.py
@@ -43,6 +43,11 @@ class Python(Package):
@property
+ def python_include_dir(self):
+ return os.path.join('include', 'python%d.%d' % self.version[:2])
+
+
+ @property
def site_packages_dir(self):
return os.path.join(self.python_lib_dir, 'site-packages')
@@ -58,8 +63,9 @@ class Python(Package):
module.python = Executable(join_path(spec.prefix.bin, 'python'))
# Add variables for lib/pythonX.Y and lib/pythonX.Y/site-packages dirs.
- module.python_lib_dir = os.path.join(ext_spec.prefix, self.python_lib_dir)
- module.site_packages_dir = os.path.join(ext_spec.prefix, self.site_packages_dir)
+ module.python_lib_dir = os.path.join(ext_spec.prefix, self.python_lib_dir)
+ module.python_include_dir = os.path.join(ext_spec.prefix, self.python_include_dir)
+ module.site_packages_dir = os.path.join(ext_spec.prefix, self.site_packages_dir)
# Make the site packages directory if it does not exist already.
mkdirp(module.site_packages_dir)