Allow py-meep to link properly

This commit is contained in:
Adam J. Stewart
2016-07-08 14:36:54 -05:00
parent 880cbb2217
commit 8d0758fc4c
4 changed files with 41 additions and 6 deletions

View File

@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
import platform
class PyNumpy(Package):
@@ -48,6 +49,18 @@ class PyNumpy(Package):
depends_on('blas', when='+blas')
depends_on('lapack', when='+lapack')
def setup_dependent_package(self, module, dep_spec):
python_version = self.spec['python'].version.up_to(2)
arch = '{0}-{1}'.format(platform.system().lower(), platform.machine())
self.spec.include = join_path(
self.prefix.lib,
'python{0}'.format(python_version),
'site-packages',
'numpy-{0}-py{1}-{2}.egg'.format(
self.spec.version, python_version, arch),
'numpy/core/include')
def install(self, spec, prefix):
libraries = []
library_dirs = []