summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/docs/index.rst2
-rw-r--r--lib/spack/docs/packaging_guide.rst12
-rw-r--r--lib/spack/docs/site_configuration.rst15
-rw-r--r--lib/spack/spack/concretize.py8
-rw-r--r--lib/spack/spack/config.py16
-rw-r--r--lib/spack/spack/test/mock_packages_test.py4
-rw-r--r--var/spack/repos/builtin/packages/cmake/package.py39
-rw-r--r--var/spack/repos/builtin/packages/emacs/package.py21
-rw-r--r--var/spack/repos/builtin/packages/netlib-lapack/package.py1
-rw-r--r--var/spack/repos/builtin/packages/qt/package.py3
-rw-r--r--var/spack/repos/builtin/packages/tmux/package.py5
11 files changed, 92 insertions, 34 deletions
diff --git a/lib/spack/docs/index.rst b/lib/spack/docs/index.rst
index 79757208c9..d6ce52b747 100644
--- a/lib/spack/docs/index.rst
+++ b/lib/spack/docs/index.rst
@@ -18,7 +18,7 @@ configurations can coexist on the same system.
Most importantly, Spack is *simple*. It offers a simple *spec* syntax
so that users can specify versions and configuration options
concisely. Spack is also simple for package authors: package files
-are writtin in pure Python, and specs allow package authors to
+are written in pure Python, and specs allow package authors to
maintain a single file for many different builds of the same package.
See the :doc:`features` for examples and highlights.
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst
index ef9fd89b62..169899212d 100644
--- a/lib/spack/docs/packaging_guide.rst
+++ b/lib/spack/docs/packaging_guide.rst
@@ -419,7 +419,7 @@ directory to the directory containing the downloaded archive before it
calls your ``install`` method. Within ``install``, the path to the
downloaded archive is available as ``self.stage.archive_file``.
-Here is an example snippet for packages distribuetd as self-extracting
+Here is an example snippet for packages distributed as self-extracting
archives. The example sets permissions on the downloaded file to make
it executable, then runs it with some arguments.
@@ -1556,12 +1556,12 @@ you ask for a particular spec.
``Concretization Policies``
~~~~~~~~~~~~~~~~~~~~~~~~~~~
-A user may have certain perferrences for how packages should
+A user may have certain preferences for how packages should
be concretized on their system. For example, one user may prefer packages
built with OpenMPI and the Intel compiler. Another user may prefer
packages be built with MVAPICH and GCC.
-Spack can be configurated to prefer certain compilers, package
+Spack can be configured to prefer certain compilers, package
versions, depends_on, and variants during concretization.
The preferred configuration can be controlled via the
``~/.spack/packages.yaml`` file for user configuations, or the
@@ -1588,16 +1588,16 @@ At a high level, this example is specifying how packages should be
concretized. The dyninst package should prefer using gcc 4.9 and
be built with debug options. The gperftools package should prefer version
2.2 over 2.4. Every package on the system should prefer mvapich for
-its MPI and gcc 4.4.7 (except for Dyninst, which overrides this by perfering gcc 4.9).
+its MPI and gcc 4.4.7 (except for Dyninst, which overrides this by preferring gcc 4.9).
These options are used to fill in implicit defaults. Any of them can be overwritten
on the command line if explicitly requested.
-Each packages.yaml file begin with the string ``packages:`` and
+Each packages.yaml file begins with the string ``packages:`` and
package names are specified on the next level. The special string ``all``
applies settings to each package. Underneath each package name is
one or more components: ``compiler``, ``variants``, ``version``,
or ``providers``. Each component has an ordered list of spec
-``constraints``, with earlier entries in the list being prefered over
+``constraints``, with earlier entries in the list being preferred over
later entries.
Sometimes a package installation may have constraints that forbid
diff --git a/lib/spack/docs/site_configuration.rst b/lib/spack/docs/site_configuration.rst
index 7ae541d4a3..3abfa21a9d 100644
--- a/lib/spack/docs/site_configuration.rst
+++ b/lib/spack/docs/site_configuration.rst
@@ -78,8 +78,7 @@ This example lists three installations of OpenMPI, one built with gcc,
one built with gcc and debug information, and another built with Intel.
If Spack is asked to build a package that uses one of these MPIs as a
dependency, it will use the the pre-installed OpenMPI in
-the given directory. This example also specifies that Spack should never
-build its own OpenMPI via the ``nobuild: True`` option.
+the given directory.
Each ``packages.yaml`` begins with a ``packages:`` token, followed
by a list of package names. To specify externals, add a ``paths``
@@ -111,16 +110,16 @@ be:
paths:
openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib: /opt/openmpi-1.4.3
openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib+debug: /opt/openmpi-1.4.3-debug
- openmpi@1.6.5%intel@10.1=chaos_5_x86_64_ib: /opt/openmpi-1.6.5-intel
- nobuild: True
+ openmpi@1.6.5%intel@10.1=chaos_5_x86_64_ib: /opt/openmpi-1.6.5-intel
+ buildable: False
-The addition of the ``nobuild`` flag tells Spack that it should never build
+The addition of the ``buildable`` flag tells Spack that it should never build
its own version of OpenMPI, and it will instead always rely on a pre-built
-OpenMPI. Similar to ``paths``, ``nobuild`` is specified as a property under
+OpenMPI. Similar to ``paths``, ``buildable`` is specified as a property under
a package name.
-The ``nobuild`` does not need to be paired with external packages.
-It could also be used alone to forbid packages that may be
+The ``buildable`` does not need to be paired with external packages.
+It could also be used alone to forbid packages that may be
buggy or otherwise undesirable.
diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py
index 2268084e56..8d29a03f93 100644
--- a/lib/spack/spack/concretize.py
+++ b/lib/spack/spack/concretize.py
@@ -69,12 +69,12 @@ class DefaultConcretizer(object):
packages = [spec]
# For each candidate package, if it has externals add those to the candidates
- # if it's a nobuild, then only add the externals.
+ # if it's not buildable, then only add the externals.
candidates = []
all_compilers = spack.compilers.all_compilers()
for pkg in packages:
externals = spec_externals(pkg)
- buildable = not is_spec_nobuild(pkg)
+ buildable = is_spec_buildable(pkg)
if buildable:
candidates.append((pkg, None))
for ext in externals:
@@ -369,8 +369,8 @@ class NoValidVersionError(spack.error.SpackError):
class NoBuildError(spack.error.SpackError):
- """Raised when a package is configured with the nobuild option, but
+ """Raised when a package is configured with the buildable option False, but
no satisfactory external versions can be found"""
def __init__(self, spec):
super(NoBuildError, self).__init__(
- "The spec '%s' is configured as nobuild, and no matching external installs were found" % spec.name)
+ "The spec '%s' is configured as not buildable, and no matching external installs were found" % spec.name)
diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py
index 3a785fe692..a21dd6dbe1 100644
--- a/lib/spack/spack/config.py
+++ b/lib/spack/spack/config.py
@@ -220,9 +220,9 @@ section_schemas = {
'type' : 'array',
'default' : [],
'items' : { 'type' : 'string' } }, #compiler specs
- 'nobuild': {
+ 'buildable': {
'type': 'boolean',
- 'default': False,
+ 'default': True,
},
'providers': {
'type': 'object',
@@ -557,15 +557,15 @@ def spec_externals(spec):
return spec_locations
-def is_spec_nobuild(spec):
- """Return true if the spec pkgspec is configured as nobuild"""
+def is_spec_buildable(spec):
+ """Return true if the spec pkgspec is configured as buildable"""
allpkgs = get_config('packages')
name = spec.name
if not spec.name in allpkgs:
- return False
- if not 'nobuild' in allpkgs[spec.name]:
- return False
- return allpkgs[spec.name]['nobuild']
+ return True
+ if not 'buildable' in allpkgs[spec.name]:
+ return True
+ return allpkgs[spec.name]['buildable']
class ConfigError(SpackError): pass
diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py
index 079cbcc136..6d24a84150 100644
--- a/lib/spack/spack/test/mock_packages_test.py
+++ b/lib/spack/spack/test/mock_packages_test.py
@@ -52,11 +52,11 @@ compilers:
mock_packages_config = """\
packages:
externaltool:
- nobuild: True
+ buildable: False
paths:
externaltool@1.0%gcc@4.5.0: /path/to/external_tool
externalvirtual:
- nobuild: True
+ buildable: False
paths:
externalvirtual@2.0%clang@3.3: /path/to/external_virtual_clang
externalvirtual@1.0%gcc@4.5.0: /path/to/external_virtual_gcc
diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py
index e20c1e4aeb..cc93c7067c 100644
--- a/var/spack/repos/builtin/packages/cmake/package.py
+++ b/var/spack/repos/builtin/packages/cmake/package.py
@@ -30,6 +30,7 @@ class Cmake(Package):
homepage = 'https://www.cmake.org'
url = 'https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz'
+ version('3.5.0', '33c5d09d4c33d4ffcc63578a6ba8777e')
version('3.4.3', '4cb3ff35b2472aae70f542116d616e63')
version('3.4.0', 'cd3034e0a44256a0917e254167217fc8')
version('3.3.1', '52638576f4e1e621fed6c3410d3a1b12')
@@ -37,16 +38,48 @@ class Cmake(Package):
version('2.8.10.2', '097278785da7182ec0aea8769d06860c')
variant('ncurses', default=True, description='Enables the build of the ncurses gui')
+ variant('qt', default=False, description='Enables the build of cmake-gui')
+ variant('doc', default=False, description='Enables the generation of html and man page documentation')
+
depends_on('ncurses', when='+ncurses')
+ depends_on('qt', when='+qt')
+ depends_on('python@2.7.11:', when='+doc')
+ depends_on('py-sphinx', when='+doc')
def url_for_version(self, version):
"""Handle CMake's version-based custom URLs."""
return 'https://cmake.org/files/v%s/cmake-%s.tar.gz' % (version.up_to(2), version)
+ def validate(self, spec):
+ """
+ Checks if incompatible versions of qt were specified
+
+ :param spec: spec of the package
+ :raises RuntimeError: in case of inconsistencies
+ """
+
+ if '+qt' in spec and spec.satisfies('^qt@5.4.0'):
+ msg = 'qt-5.4.0 has broken CMake modules.'
+ raise RuntimeError(msg)
def install(self, spec, prefix):
- configure('--prefix=' + prefix,
- '--parallel=' + str(make_jobs),
- '--', '-DCMAKE_USE_OPENSSL=ON')
+ # Consistency check
+ self.validate(spec)
+
+ # configure, build, install:
+ options = ['--prefix=%s' % prefix]
+ options.append('--parallel=%s' % str(make_jobs))
+
+ if '+qt' in spec:
+ options.append('--qt-gui')
+
+ if '+doc' in spec:
+ options.append('--sphinx-html')
+ options.append('--sphinx-man')
+
+ options.append('--')
+ options.append('-DCMAKE_USE_OPENSSL=ON')
+
+ configure(*options)
make()
make('install')
diff --git a/var/spack/repos/builtin/packages/emacs/package.py b/var/spack/repos/builtin/packages/emacs/package.py
new file mode 100644
index 0000000000..caa264857e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/emacs/package.py
@@ -0,0 +1,21 @@
+from spack import *
+
+class Emacs(Package):
+ """The Emacs programmable text editor."""
+ homepage = "https://www.gnu.org/software/emacs"
+ url = "http://ftp.gnu.org/gnu/emacs/emacs-24.5.tar.gz"
+
+ version('24.5', 'd74b597503a68105e61b5b9f6d065b44')
+
+ depends_on('ncurses')
+ # Emacs also depends on:
+ # GTK or other widget library
+ # libtiff, png, etc.
+ # For now, we assume the system provides all that stuff.
+ # For Ubuntu 14.04 LTS:
+ # sudo apt-get install libgtk-3-dev libxpm-dev libtiff5-dev libjpeg8-dev libgif-dev libpng12-dev
+
+ def install(self, spec, prefix):
+ configure('--prefix=%s' % prefix)
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py
index fb6b99e27c..741f4af421 100644
--- a/var/spack/repos/builtin/packages/netlib-lapack/package.py
+++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py
@@ -12,6 +12,7 @@ class NetlibLapack(Package):
homepage = "http://www.netlib.org/lapack/"
url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz"
+ version('3.6.0', 'f2f6c67134e851fe189bb3ca1fbb5101')
version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf')
version('3.4.2', '61bf1a8a4469d4bdb7604f5897179478')
version('3.4.1', '44c3869c38c8335c2b9c2a8bb276eb55')
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py
index 91afa420c1..ef5f05601f 100644
--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -8,6 +8,9 @@ class Qt(Package):
list_url = 'http://download.qt-project.org/official_releases/qt/'
list_depth = 2
+ version('5.4.2', 'fa1c4d819b401b267eb246a543a63ea5',
+ url='http://download.qt-project.org/official_releases/qt/5.4/5.4.2/single/qt-everywhere-opensource-src-5.4.2.tar.gz')
+
version('5.4.0', 'e8654e4b37dd98039ba20da7a53877e6',
url='http://download.qt-project.org/official_releases/qt/5.4/5.4.0/single/qt-everywhere-opensource-src-5.4.0.tar.gz')
diff --git a/var/spack/repos/builtin/packages/tmux/package.py b/var/spack/repos/builtin/packages/tmux/package.py
index 23d36db427..f2067d1366 100644
--- a/var/spack/repos/builtin/packages/tmux/package.py
+++ b/var/spack/repos/builtin/packages/tmux/package.py
@@ -7,10 +7,11 @@ class Tmux(Package):
do a lot more.
"""
- homepage = "http://tmux.sourceforge.net"
- url = "http://downloads.sourceforge.net/project/tmux/tmux/tmux-1.9/tmux-1.9a.tar.gz"
+ homepage = "http://tmux.github.io"
+ url = "https://github.com/tmux/tmux/releases/download/2.1/tmux-2.1.tar.gz"
version('1.9a', 'b07601711f96f1d260b390513b509a2d')
+ version('2.1', '74a2855695bccb51b6e301383ad4818c')
depends_on('libevent')
depends_on('ncurses')