summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2018-06-05Preserve Spack CC/FC/F77/CXX settings when loading modules (#8346)Massimiliano Culpo4-15/+110
Fixes #8345 Spack environment modifications are applied before modules are loaded; this includes settings to CC, FC, F77, and CXX, which point to the Spack compiler wrappers. If the loaded modules set CC, this overrides the Spack compiler wrappers. This PR adds a context manager to preserve the values of CC etc. that are set by Spack: any effects on the CC, FC, F77, and CXX variables from modules are undone and their original values are restored.
2018-06-04pybind11: test functionality (#8304)Axel Huebl1-0/+2
* pybind11: test support Add a test functionality to pybind11. * CMake: test also on "make check" Some projects use non-CTest manual targets for tests.
2018-06-02Less sensitive error detection in build logs (#8278)Adam J. Stewart1-5/+2
* Less sensitive error detection in build logs * Fix test_log_parser unit test
2018-06-02Don't duplicate Python error messages (#8270)Adam J. Stewart1-1/+1
2018-06-02Fix coloring of error messages containing '}' symbol (#8277)Adam J. Stewart3-11/+30
2018-06-02Fix package error message line numbers (#8271)Adam J. Stewart1-12/+20
Line numbers were reported as zero-indexed, but we need to adjust.
2018-06-01Skip external specs when creating mirrors (#8084)Massimiliano Culpo2-5/+47
fixes #8083 External specs are supposed to be installed already, so there's no need to try to download a tarball for them.
2018-06-01Typo: an -> and (#8350)George Hartzell1-1/+1
2018-06-01extend Prefix class with join() member to support dynamic directories (#8329)Denis Davydov3-2/+44
* extend Prefix class with join() member to support dynamic directories * add more tests for Prefix.join() * more tests for Prefix.join() * add docstring * add example to docstring of Prefix class * cleanup Prefix.join() tests * use Prefix.join() in Packaging Guide
2018-05-31binary caching: skip check if old and new paths are identical (#8281)George Hartzell1-0/+2
Fixes #8217 Trying to relocate a distribution when the new and old paths are equal leads to failure, because the test that ensures that no unrelocated bits are left over always fails. As an example, this occurs if a user installs a package, generates a binary with it using 'spack buildcache', uninstalls it, and then attempts to reinstall into the same spack installation using the generated binary package. This updates the relocation check to accept the presence of the old prefix in binaries if the package is being reinstalled into its original location.
2018-05-31improve Advanced Compiler Configuration part of tutorial (#8325)Denis Davydov1-2/+21
2018-05-30more-flexible user-specified dependency constraints (#8162)scheibelp3-17/+80
* allow user to constrain dependencies that are added conditionally * remove check for not-visited deps from normalize, move it to concretize. The check now runs after the concretization loop completes (so an error is only reported if the user-mentioned spec doesnt appear anywhere in the dag) * remove separate full_spec_deps variable; rename spec_deps to all_spec_deps to clarify that it merges user-specified dependencies with derived dependencies * add unit test to confirm new functionality
2018-05-30config: add `spack config blame` command (#8081)Todd Gamblin5-10/+339
- `spack config blame` is similar to `spack config get`, but it prints out the config file and line number that each line of the merged configuration came from. - This is a debugging tool for understanding where Spack config settings come from. - add tests for config blame
2018-05-30Document specs with multiple version ranges (#8284)Adam J. Stewart1-0/+8
2018-05-24Fix missing spack.compiler import (#8240)Michael Kuhn1-0/+1
Fixes: #8258 #8090 altered import behavior so that import spack no longer provides access to many other Spack modules. This addresses a case which depended on the prior behavior and was not updated as part of #8090. This particular import error only came up when users were setting compiler flags on specs. See also: #8194
2018-05-22CUDA 9.2 (#8238)Axel Huebl1-4/+7
Add the latest CUDA release, v9.2 and updated CUDA Compatibility Matrix
2018-05-21Add info about haveged to gpg/randomness note (#8227)George Hartzell1-3/+18
2018-05-20URL parsing: strip x86-64 from filename (#8200)Adam J. Stewart2-2/+4
2018-05-19fix leftover references to spack.<symbol>Todd Gamblin10-24/+19
- there were some leftover spack.* names being used after we removed globals and moved everything in the top-level namespace to spack.pkgkit - point those references to their new homes
2018-05-18imports: remove unnecessary `import spack` statementsTodd Gamblin26-47/+33
- remove most `import spack` statements, except for files that need `spack_version` - import spack is no longer sufficient to use submodules (e.g. spack.directives). - these submodules must be imported directly. Update references accordingly.
2018-05-18init: move symbols in `spack` to `spack.pkgkit`Todd Gamblin9-122/+137
- Spack packages were originally expected to call `from spack import *` themselves, but it has become difficult to manage imports in the Spack core. - the top-level namespace polluted by package symbols, and it's not possible to avoid circular dependencies and unnecessary module loads in the core, given all the stuff the packages need. - This makes the top-level `spack` package essentially empty, save for a version tuple and a version string, and `from spack import *` is now essentially a no-op. - The common routines and directives that packages need are now in `spack.pkgkit`, and the import system forces packages to automatically include this so that old packages that call `from spack import *` will continue to work without modification. - Since `from spack import *` is no longer required, we could consider removing ``from spack import *`` from packages in the future and shifting to ``from spack.pkgkit import *``, but we can wait a while to do this.
2018-05-18locks: add configuration and command-line options to enable/disable locks ↵Todd Gamblin10-54/+311
(#7692) - spack.util.lock behaves the same as llnl.util.lock, but Lock._lock and Lock._unlock do nothing. - can be disabled with a control variable. - configuration options can enable/disable locking: - `locks` option in spack configuration controls whether Spack will use filesystem locks or not. - `-l` and `-L` command-line options can force-disable or force-enable locking. - Spack will check for group- and world-writability before disabling locks, and it will not allow a group- or world-writable instance to have locks disabled. - update documentation
2018-05-17make check_for_compiler_existence an instance variableTodd Gamblin3-18/+16
2018-05-17use os.path.join instead of join_path in coreTodd Gamblin34-156/+141
- Spack core has long used llnl.util.filesystem.join_path, but os.path.join is pretty much the same thing, and is more efficient. - Use os.path.join in the core Spack code from now on.
2018-05-17Convert lazy singleton functions to Singleton objectTodd Gamblin61-537/+498
- simplify the singleton pattern across the codebase - reduce lines of code needed for crufty initialization - reduce functions that need to mess with a global - Singletons whose semantics changed: - spack.store.store() -> spack.store - spack.repo.path() -> spack.repo.path - spack.config.config() -> spack.config.config - spack.caches.fetch_cache() -> spack.caches.fetch_cache - spack.caches.misc_cache() -> spack.caches.misc_cache
2018-05-17init: make spack.cmd.all_commands lazyTodd Gamblin5-11/+27
- `spack.cmd.all_commands` does a directory listing on `lib/spack/spack/cmd`, regardless of whether it is needed - make this lazy so that the directory listing won't happen unless it's necessary.
2018-05-17init: only imoprt jsonschema if neededTodd Gamblin1-9/+10
- It turns out that jsonschema is one of the more expensive imports. - move imports of jsonschema into functions to avoid the performance hits for calls that don't need config.
2018-05-17init: initialize spack.store lazilyTodd Gamblin31-176/+215
- spack.store was previously initialized at the spack.store module level, but this means the store has to be initialized on every spack call. - this moves the state in spack.store to a singleton so that the store is only initialized when needed.
2018-05-17init: move spack.repo global variable into its own moduleTodd Gamblin63-233/+257
- spack.repository module is now spack.repo - `spack.repo` is now `spack.repo.path()` and loaded lazily - Added `spack.repo.get()` and `spack.repo.all_package_names()` as convenience functions to simplify the new lazy interface. - updated tests and code
2018-05-17tests: rename builtin_mock to "mock_packages" for clarity.Todd Gamblin33-121/+117
- rename `builtin_mock` and `refresh_builtin_mock` to the more clear `mock_packages` and `mutable_mock_packages`
2018-05-17init: convert spack.debug global variable to config optionTodd Gamblin11-27/+25
2018-05-17init: remove package_testing globalTodd Gamblin9-75/+82
- refactor the way test dependencies are passed to the concretizer - remove global state - update tests
2018-05-17init: remove dependency on spack.versionTodd Gamblin3-16/+8
- no longer require `spack_version` to be a Version (it isn't used that way anyway) - use a simple tuple `spack_version_info` with major, minor, patch versions - generate `spack_version` from the tuple
2018-05-17init: remove binary_cache_retrieved_specs global variableTodd Gamblin2-26/+21
- remove variable from spack/__init__.py - clean up imports and some code structure in binary_distribution.py
2018-05-17init: remove spack.concretizer global variableTodd Gamblin5-82/+104
2018-05-17init: remove build_jobs global variableTodd Gamblin3-15/+4
2018-05-17init: convert spack.dirty global to config optionTodd Gamblin4-34/+12
2018-05-17init: remove template_dirs globalTodd Gamblin6-24/+5
- remove template_dirs global variable from __init__.py - also remove update_template_dirs fixture, which had no effect on test correctness
2018-05-17init: replace global spack.do_checksum with config optionTodd Gamblin13-71/+67
2018-05-17init: replace spack.insecure global with spack.config.getTodd Gamblin10-43/+116
2018-05-17config: simplify configuration API to just get and setTodd Gamblin29-169/+203
- replace `spack.config.get_configuration()` with `spack.config.config()` - replace `get_config`/`update_config` with `get`, `set` - add a path syntax that can be used to refer to specific config options without firt getting the entire configuration dict - update usages of `get_config` and `update_config` to use `get` and `set`
2018-05-17config: create internal config scope for commands to use.Todd Gamblin5-13/+87
2018-05-17init: Move file cache initialization out of __init__.pyTodd Gamblin9-42/+102
2018-05-17config: rework config system into a class instead of globalsTodd Gamblin13-470/+555
- Current configuration code forces the config system to be initialized at module scope, so configs are parsed on every Spack run, essentially before anything else. - We need more control over configuration init order, so move the config scopes into a class and reduce global state in config.py
2018-05-17init: move editor from spack/__init__.py to spack.util.editorTodd Gamblin3-22/+58
2018-05-17init: factor paths out of spack/__init__.py and into spack.paths moduleTodd Gamblin59-286/+357
2018-05-17init: simplify import ordering in __init__.pyTodd Gamblin8-87/+112
2018-05-15Move report writers to separate classesZack Galbreath5-190/+335
2018-05-15Add test case for CDash reportingZack Galbreath1-0/+42
2018-05-15upload reports to CDashZack Galbreath2-6/+35