diff options
-rw-r--r-- | lib/spack/spack/util/web.py | 28 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/dealii/package.py | 17 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/libmonitor/package.py | 8 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/ocaml/package.py | 43 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/unison/package.py | 51 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/xerces-c/package.py | 9 |
6 files changed, 131 insertions, 25 deletions
diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py index 47abc507e0..cac783a368 100644 --- a/lib/spack/spack/util/web.py +++ b/lib/spack/spack/util/web.py @@ -25,8 +25,7 @@ import re import os import sys -import subprocess -import urllib2, cookielib +import urllib2 import urlparse from multiprocessing import Pool from HTMLParser import HTMLParser, HTMLParseError @@ -84,7 +83,7 @@ def _spider(args): req.get_method = lambda: "HEAD" resp = urllib2.urlopen(req, timeout=TIMEOUT) - if not "Content-type" in resp.headers: + if "Content-type" not in resp.headers: tty.debug("ignoring page " + url) return pages, links @@ -125,11 +124,11 @@ def _spider(args): if abs_link in visited: continue - # If we're not at max depth, follow links. - if depth < max_depth: - subcalls.append((abs_link, visited, root, None, - depth+1, max_depth, raise_on_error)) - visited.add(abs_link) + # If we're not at max depth, follow links. + if depth < max_depth: + subcalls.append((abs_link, visited, root, None, + depth + 1, max_depth, raise_on_error)) + visited.add(abs_link) if subcalls: try: @@ -142,22 +141,22 @@ def _spider(args): pool.terminate() pool.join() - except urllib2.URLError, e: + except urllib2.URLError as e: tty.debug(e) if raise_on_error: raise spack.error.NoNetworkConnectionError(str(e), url) - except HTMLParseError, e: + except HTMLParseError as e: # This error indicates that Python's HTML parser sucks. msg = "Got an error parsing HTML." # Pre-2.7.3 Pythons in particular have rather prickly HTML parsing. - if sys.version_info[:3] < (2,7,3): + if sys.version_info[:3] < (2, 7, 3): msg += " Use Python 2.7.3 or newer for better HTML parsing." tty.warn(msg, url, "HTMLParseError: " + str(e)) - except Exception, e: + except Exception as e: # Other types of errors are completely ignored, except in debug mode. tty.debug("Error in _spider: %s" % e) @@ -173,7 +172,8 @@ def spider(root_url, **kwargs): performance over a sequential fetch. """ max_depth = kwargs.setdefault('depth', 1) - pages, links = _spider((root_url, set(), root_url, None, 1, max_depth, False)) + pages, links = _spider((root_url, set(), root_url, None, + 1, max_depth, False)) return pages, links @@ -235,7 +235,7 @@ def find_versions_of_archive(*archive_urls, **kwargs): try: ver = spack.url.parse_version(url) versions[ver] = url - except spack.url.UndetectableVersionError as e: + except spack.url.UndetectableVersionError: continue return versions diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 54604d351f..18c0849f68 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -51,14 +51,21 @@ class Dealii(Package): variant('petsc', default=True, description='Compile with Petsc (only with MPI)') variant('slepc', default=True, description='Compile with Slepc (only with Petsc and MPI)') variant('trilinos', default=True, description='Compile with Trilinos (only with MPI)') + variant('python', default=True, description='Compile with Python bindings') # required dependencies, light version depends_on("blas") # Boost 1.58 is blacklisted, see # https://github.com/dealii/dealii/issues/1591 # Require at least 1.59 - depends_on("boost@1.59.0:+thread+system+serialization+iostreams", when='~mpi') # NOQA: ignore=E501 - depends_on("boost@1.59.0:+mpi+thread+system+serialization+iostreams", when='+mpi') # NOQA: ignore=E501 + # +python won't affect @:8.4.1 + depends_on("boost@1.59.0:+thread+system+serialization+iostreams", when='@:8.4.1~mpi') + depends_on("boost@1.59.0:+thread+system+serialization+iostreams+mpi", when='@:8.4.1+mpi') + # since @8.5.0: (and @develop) python bindings are introduced: + depends_on("boost@1.59.0:+thread+system+serialization+iostreams", when='@8.5.0:~mpi~python') + depends_on("boost@1.59.0:+thread+system+serialization+iostreams+mpi", when='@8.5.0:+mpi~python') + depends_on("boost@1.59.0:+thread+system+serialization+iostreams+python", when='@8.5.0:~mpi+python') + depends_on("boost@1.59.0:+thread+system+serialization+iostreams+mpi+python", when='@8.5.0:+mpi+python') depends_on("bzip2") depends_on("cmake", type='build') depends_on("lapack") @@ -120,6 +127,12 @@ class Dealii(Package): '-DZLIB_DIR=%s' % spec['zlib'].prefix ]) + if spec.satisfies('@8.5.0:'): + options.extend([ + '-DDEAL_II_COMPONENT_PYTHON_BINDINGS=%s' % + ('ON' if '+python' in spec else 'OFF') + ]) + # Set directory structure: if spec.satisfies('@:8.2.1'): options.extend(['-DDEAL_II_COMPONENT_COMPAT_FILES=OFF']) diff --git a/var/spack/repos/builtin/packages/libmonitor/package.py b/var/spack/repos/builtin/packages/libmonitor/package.py index 883d8af405..611e602e2f 100644 --- a/var/spack/repos/builtin/packages/libmonitor/package.py +++ b/var/spack/repos/builtin/packages/libmonitor/package.py @@ -24,19 +24,17 @@ ############################################################################## from spack import * + class Libmonitor(Package): """Libmonitor is a library for process and thread control.""" - homepage = "http://hpctoolkit.org" - - version('20130218', svn='http://libmonitor.googlecode.com/svn/trunk/', revision=146) + homepage = "https://github.com/HPCToolkit/libmonitor" + version('20130218', git='https://github.com/HPCToolkit/libmonitor.git', commit='4f2311e') variant('krellpatch', default=False, description="build with openspeedshop based patch.") - patch('libmonitorkrell-0000.patch', when='@20130218+krellpatch') patch('libmonitorkrell-0001.patch', when='@20130218+krellpatch') patch('libmonitorkrell-0002.patch', when='@20130218+krellpatch') - def install(self, spec, prefix): configure("--prefix=" + prefix) make() diff --git a/var/spack/repos/builtin/packages/ocaml/package.py b/var/spack/repos/builtin/packages/ocaml/package.py new file mode 100644 index 0000000000..9488d3b7a6 --- /dev/null +++ b/var/spack/repos/builtin/packages/ocaml/package.py @@ -0,0 +1,43 @@ +############################################################################## +# 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 Ocaml(Package): + """OCaml is an industrial strength programming language supporting + functional, imperative and object-oriented styles""" + + homepage = "http://ocaml.org/" + url = "http://caml.inria.fr/pub/distrib/ocaml-4.03/ocaml-4.03.0.tar.gz" + + version('4.03.0', '43812739ea1b4641cf480f57f977c149') + + depends_on('ncurses') + + def install(self, spec, prefix): + configure('-prefix', '{0}'.format(prefix)) + + make('world.opt') + make('install') diff --git a/var/spack/repos/builtin/packages/unison/package.py b/var/spack/repos/builtin/packages/unison/package.py new file mode 100644 index 0000000000..181e1e6410 --- /dev/null +++ b/var/spack/repos/builtin/packages/unison/package.py @@ -0,0 +1,51 @@ +############################################################################## +# 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 Unison(Package): + """Unison is a file-synchronization tool for OSX, Unix, and + Windows. It allows two replicas of a collection of files and + directories to be stored on different hosts (or different disks + on the same host), modified separately, and then brought up to + date by propagating the changes in each replica to the + other.""" + + homepage = "https://www.cis.upenn.edu/~bcpierce/unison/" + url = "https://www.seas.upenn.edu/~bcpierce/unison//download/releases/stable/unison-2.48.3.tar.gz" + + version('2.48.4', '5334b78c7e68169df7de95f4c6c4b60f') + + depends_on('ocaml', type='build') + + parallel = False + + def install(self, spec, prefix): + make('./mkProjectInfo') + make('UISTYLE=text') + + mkdirp(prefix.bin) + install('unison', prefix.bin) + set_executable(join_path(prefix.bin, 'unison')) diff --git a/var/spack/repos/builtin/packages/xerces-c/package.py b/var/spack/repos/builtin/packages/xerces-c/package.py index 2efccc3c08..d0c2d3d497 100644 --- a/var/spack/repos/builtin/packages/xerces-c/package.py +++ b/var/spack/repos/builtin/packages/xerces-c/package.py @@ -24,16 +24,18 @@ ############################################################################## from spack import * + class XercesC(Package): """ Xerces-C++ is a validating XML parser written in a portable subset of C++. Xerces-C++ makes it easy to give your application the ability to read and write XML data. A shared library is provided for parsing, generating, - manipulating, and validating XML documents using the DOM, SAX, and SAX2 APIs. + manipulating, and validating XML documents using the DOM, SAX, and SAX2 + APIs. """ homepage = "https://xerces.apache.org/xerces-c" - url = "https://www.apache.org/dist/xerces/c/3/sources/xerces-c-3.1.3.tar.bz2" - version('3.1.3', '5e333b55cb43e6b025ddf0e5d0f0fb0d') + url = "https://www.apache.org/dist/xerces/c/3/sources/xerces-c-3.1.4.tar.bz2" + version('3.1.4', 'd04ae9d8b2dee2157c6db95fa908abfd') def install(self, spec, prefix): configure("--prefix=%s" % prefix, @@ -41,4 +43,3 @@ class XercesC(Package): make("clean") make() make("install") - |