summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2017-05-17Sphinx no longer supports Python 2.6 (#4266)Adam J. Stewart6-301/+3
* Sphinx no longer supports Python 2.6 * Update vendored sphinxcontrib.programoutput from 0.9.0 to 0.10.0 * Documentation cannot be built in parallel * Let Travis install programoutput for us * Remove vendored sphinxcontrib-programoutput Recent updates to the sphinx package prevent the vendored version from being found in sys.path. We don't vendor sphinx, so it doesn't make sense to vendor sphinxcontrib-programoutput either.
2017-05-16Sphinx no longer ignores first argument (#4243)Adam J. Stewart1-1/+1
* Sphinx no longer ignores first argument * Duplicate first argument for maximum compatibility
2017-05-12Add helpful error message for uncompressed downloads (#4205)Adam J. Stewart1-6/+26
2017-05-11Fix typo in PythonPackage documentation (#4221)Adam J. Stewart1-1/+1
2017-05-11filesystem.py: fixed bug introduced in #3367 (scrambled order in output) (#4156)Massimiliano Culpo19-7/+95
PR #3367 inadvertently changed the semantics of _find_recursive and _find_non_recursive so that the returned list are not ordered as the input search list. This commit restores the original semantic, and adds tests to verify it.
2017-05-09cp2k: fixed compilation issues for intel stackMassimiliano Culpo1-1/+1
Added DFLAGS to the `make.inc` file being written. These macros are also added to the language specific variables like CFLAGS, CXXFLAGS and FCFLAGS. Changed `spec.satisfies('foo')` with `'foo' in spec` in `intel-mkl`, see #4135. Added a basic build interface to `intel-mpi`.
2017-05-08spec_syntax: added xfailing tests for cases in #4144 (#4151)Massimiliano Culpo1-0/+26
It seems that parse_anonymous_spec may fail if more than one part (variant, version range, etc.) is given to the function. Added tests to code against to fix the problem in #4144.
2017-05-08rework spack help (#3033)Todd Gamblin55-17/+711
- Full help is now only generated lazily, when needed. - Executing specific commands doesn't require loading all of them. - All commands are only loaded if we need them for help. - There is now short and long help: - short help (spack help) shows only basic spack options - long help (spack help -a) shows all spack options - Both divide help on commands into high-level sections - Commands now specify attributes from which help is auto-generated: - description: used in help to describe the command. - section: help section - level: short or long - Clean up command descriptions - Add a `spack docs` command to open full documentation in the browser. - move `spack doc` command to `spack pydoc` for clarity - Add a `spack --spec` command to show documentation on the spec syntax.
2017-05-07BarrierTimeoutError must derive from Exception (#4157)Massimiliano Culpo1-1/+1
Seen in https://travis-ci.org/LLNL/spack/builds/229484526, very likely due to a problem in the Travis builder.
2017-05-07Fix PGI compiler detection on PowerPC (#4150)Adam J. Stewart1-2/+10
2017-05-07Spec.__init__: removed dead code (#4146)Massimiliano Culpo1-5/+2
The conditionals are repeated in the statement before _add_dependencies
2017-05-05Remind developers to update tab completion script (#4148)Adam J. Stewart1-0/+4
2017-05-05Fix typos in Basic Installation Tutorial (#4127)Adam J. Stewart1-4/+4
2017-05-04SV variants are evaluated correctly in "when=" (#4118)Massimiliano Culpo3-41/+48
* SV variants are evaluated correctly in `when=` statements fixes #4113 The problem here was tricky: ```python spec.satisfies(other) ``` changes already the MV variants in others into SV variants (where necessary) if spec is concrete. If it is not concrete it does nothing because we may be acting at a pure syntactical level. When evaluating a `when=` keyword spec is for sure not concrete as it is in the middle of the concretization process. In this case we have to trigger manually the substitution in other to not end up comparing a MV variant "foo=bar" to a SV variant "foo=bar" and having False in return. Which is wrong. * sv variants: improved error message for typos in "when=" statements
2017-05-04add transitive run dependencies of direct build dependenciesDenis Davydov1-3/+3
2017-05-03Merge pull request #4069 from davydden/fix_transitive_build_depscheibelp1-1/+6
only add direct build-only dependencies to PATH
2017-05-03Update cray compiler options (#4086)Matthew Scott Krafczyk1-0/+12
2017-05-03spack: no stacktrace if not in debug mode + fix emacs variant (#4098)Massimiliano Culpo1-2/+2
* spack: no stacktrace if not in debug mode + fix emacs variant * emacs: removed dead code
2017-05-02Add link to spack view docs in command index (#4082)Adam J. Stewart1-3/+4
2017-05-02add run-time dependencies of direct build-time dependencies to PATHDenis Davydov1-0/+5
2017-05-01only add direct build-only dependencies to PATHDenis Davydov1-1/+1
2017-05-01Multi-valued variants (#2386)Massimiliano Culpo16-187/+1703
Modifications: - added support for multi-valued variants - refactored code related to variants into variant.py - added new generic features to AutotoolsPackage that leverage multi-valued variants - modified openmpi to use new features - added unit tests for the new semantics
2017-05-01Skip fetch tests for tools that are not installed. (#4059)Todd Gamblin4-9/+39
This allows people on systems that don't have all the fetchers to still run Spack tests. Mark tests that require git, subversion, or mercurial to be skipped if they're not installed.
2017-05-01url_parse: ported to pytest (#3430)Massimiliano Culpo1-693/+391
2017-05-01namespace_trie: ported to pytest (#4060)Massimiliano Culpo1-59/+63
2017-05-01Add a WafPackage base class (#3975)Adam J. Stewart7-35/+201
* Add a WafPackage base class * Correct comment in docstring * Be more specific about the Python versions supported
2017-05-01url_substitution: ported to pytest (#4032)Massimiliano Culpo1-54/+34
2017-04-30disable rpaths on Darwin when arg=-r mode=ccld (#3930)Denis Davydov1-1/+1
This fixes build of Ipopt package.
2017-04-30Updated cc wrapper: switch from ld to vcheck if version is requested. (#2501)Sergey Kosukhin1-1/+1
2017-04-30Don't add system paths to PATH (#3910)Adam J. Stewart3-84/+72
* Filter all system paths introduced by dependencies from PATH * Make sure path filtering works *even* for trailing slashes * Revert some of the changes to `filter_system_paths` * Yes, `bin64` is a real thing (sigh) * add tests: /usr, /usr/, /usr/local/../bin, etc. * Convert from rST to Google-style docstrings
2017-04-30spack_yaml: ported to pytest (#4033)Massimiliano Culpo1-67/+69
2017-04-30file_list: ported to pytest (#4054)Massimiliano Culpo1-180/+158
2017-04-29fetch: do full clone of git submodules (fix #3956) (#3958)Christoph Junghans1-13/+4
The required hash of a submodule might point to the non-HEAD commit of the current main branch and hence would lead to a "no such remote ref" at checkout in a shallow submodule.
2017-04-29Python command, libraries, and headers (#3367)Adam J. Stewart6-189/+614
## Motivation Python installations are both important and unfortunately inconsistent. Depending on the Python version, OS, and the strength of the Earth's magnetic field when it was installed, the name of the Python executable, directory containing its libraries, library names, and the directory containing its headers can vary drastically. I originally got into this mess with #3274, where I discovered that Boost could not be built with Python 3 because the executable is called `python3` and we were telling it to use `python`. I got deeper into this mess when I started hacking on #3140, where I discovered just how difficult it is to find the location and name of the Python libraries and headers. Currently, half of the packages that depend on Python and need to know this information jump through hoops to determine the correct information. The other half are hard-coded to use `python`, `spec['python'].prefix.lib`, and `spec['python'].prefix.include`. Obviously, none of these packages would work for Python 3, and there's no reason to duplicate the effort. The Python package itself should contain all of the information necessary to use it properly. This is in line with the recent work by @alalazo and @davydden with respect to `spec['blas'].libs` and friends. ## Prefix For most packages in Spack, we assume that the installation directory is `spec['python'].prefix`. This generally works for anything installed with Spack, but gets complicated when we include external packages. Python is a commonly used external package (it needs to be installed just to run Spack). If it was installed with Homebrew, `which python` would return `/usr/local/bin/python`, and most users would erroneously assume that `/usr/local` is the installation directory. If you peruse through #2173, you'll immediately see why this is not the case. Homebrew actually installs Python in `/usr/local/Cellar/python/2.7.12_2` and symlinks the executable to `/usr/local/bin/python`. `PYTHONHOME` (and presumably most things that need to know where Python is installed) needs to be set to the actual installation directory, not `/usr/local`. Normally I would say, "sounds like user error, make sure to use the real installation directory in your `packages.yaml`". But I think we can make a special case for Python. That's what we decided in #2173 anyway. If we change our minds, I would be more than happy to simplify things. To solve this problem, I created a `spec['python'].home` attribute that works the same way as `spec['python'].prefix` but queries Python to figure out where it was actually installed. @tgamblin Is there any way to overwrite `spec['python'].prefix`? I think it's currently immutable. ## Command In general, Python 2 comes with both `python` and `python2` commands, while Python 3 only comes with a `python3` command. But this is up to the OS developers. For example, `/usr/bin/python` on Gentoo is actually Python 3. Worse yet, if someone is using an externally installed Python, all 3 commands may exist in the same directory! Here's what I'm thinking: If the spec is for Python 3, try searching for the `python3` command. If the spec is for Python 2, try searching for the `python2` command. If neither are found, try searching for the `python` command. ## Libraries Spack installs Python libraries in `spec['python'].prefix.lib`. Except on openSUSE 13, where it installs to `spec['python'].prefix.lib64` (see #2295 and #2253). On my CentOS 6 machine, the Python libraries are installed in `/usr/lib64`. Both need to work. The libraries themselves change name depending on OS and Python version. For Python 2.7 on macOS, I'm seeing: ``` lib/libpython2.7.dylib ``` For Python 3.6 on CentOS 6, I'm seeing: ``` lib/libpython3.so lib/libpython3.6m.so.1.0 lib/libpython3.6m.so -> lib/libpython3.6m.so.1.0 ``` Notice the `m` after the version number. Yeah, that's a thing. ## Headers In Python 2.7, I'm seeing: ``` include/python2.7/pyconfig.h ``` In Python 3.6, I'm seeing: ``` include/python3.6m/pyconfig.h ``` It looks like all Python 3 installations have this `m`. Tested with Python 3.2 and 3.6 on macOS and CentOS 6 Spack has really nice support for libraries (`find_libraries` and `LibraryList`), but nothing for headers. Fixed.
2017-04-28Add tests to MakefilePackage (#4039)Adam J. Stewart1-0/+13
2017-04-28No compiler found: fixed error message (#4034)Massimiliano Culpo1-3/+4
When a compiler was not found a stacktrace was displayed to user because there were three arguments to be substituted in a string with only two substitutions to be done.
2017-04-27Reindex checks install for non-external packages (#4027)scheibelp1-7/+12
Fixes #4026 #1167 updated Database.reindex to keep old installation records to support external packages. However, when a user manually removes a prefix and reindexes this kept the records so the packages were still installed according to "spack find" etc. This adds a check for non-external packages to ensure they are properly installed according to the directory layout.
2017-04-27Prevent spack test flake8 from making changes (#4023)Adam J. Stewart1-2/+2
2017-04-27Remove 'release' suffix from package name (#4014)Adam J. Stewart2-0/+5
2017-04-27Don't print successfully uninstalled twice (#4019)Adam J. Stewart1-1/+0
2017-04-27Fix Python3 issue with sbang checking; add tests. (#4017)Todd Gamblin2-49/+76
2017-04-27Convert rest docstrings to Google docstrings. (#3994)Todd Gamblin18-284/+360
- Sometimes you need something mindless to do. - Sometimes it can be helpful, as well.
2017-04-27pattern: ported to pytest (#4015)Massimiliano Culpo1-57/+60
2017-04-26Fix alignment of versions and urls in spack checksum (#4003)Adam J. Stewart1-1/+1
2017-04-26link_tree: ported to pytest (#4008)Massimiliano Culpo1-89/+98
2017-04-26Add __format__ support to version for fancy formatting. (#3996)Todd Gamblin1-0/+3
- add Version.__format__ to support new-style formatting. - Python3 doesn't handle this well -- it delegates to object.__format__(), which raises an error for fancy format strings. - not sure why it doesn't call str(self).__format__ instead, but that's hwo things are.
2017-04-25Add API Docs for lib/spack/llnl (#3982)Adam J. Stewart10-101/+130
* Add API Docs for lib/spack/llnl * Clean up after previous builds * Better fix for purging API docs
2017-04-25Fix bug with '# noqa' filtering (#3993)Adam J. Stewart1-9/+4
2017-04-25spack flake8 should exempt line-wrapped directives (#3990)Todd Gamblin1-8/+8
- Omit final paren from regular expressions in cmd/flake8.py - Allows long directives to be exempted even if they are wrapped.
2017-04-25hooks take spec as an argument (instead of pkg) (#3967)Massimiliano Culpo6-23/+27