Add py-meep package and dependencies

This commit is contained in:
Adam J. Stewart
2016-07-01 16:30:11 -05:00
parent cc3fc2ba4c
commit 7e53f4328f
12 changed files with 580 additions and 31 deletions

View File

@@ -0,0 +1,54 @@
##############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (as
# published by the Free Software Foundation) version 2.1, February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
class PyMeep(Package):
"""Python-meep is a wrapper around libmeep. It allows the scripting of
Meep-simulations with Python"""
homepage = "https://launchpad.net/python-meep"
url = "https://launchpad.net/python-meep/1.4/1.4/+download/python-meep-1.4.2.tar"
version('1.4.2', 'f8913542d18b0dda92ebc64f0a10ce56')
variant('mpi', default=True, description='Enable MPI support')
extends('python')
depends_on('meep@1.1.1') # must be compiled with -fPIC
depends_on('swig@1.3.39:')
depends_on('py-numpy')
depends_on('py-scipy')
depends_on('py-matplotlib')
depends_on('mpi', when='+mpi') # OpenMPI 1.3.3 is recommended
# depends_on('hdf5+mpi', when='+mpi') # ???
def install(self, spec, prefix):
setup = 'setup-mpi.py' if '+mpi' in spec else 'setup.py'
python(setup, 'clean', '--all')
python(setup, 'build_ext')
python(setup, 'install', '--prefix={0}'.format(prefix))
python(setup, 'bdist')