summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
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
2018-05-15Generate CDash reports for build/install stepZack Galbreath1-2/+33
2018-05-15CDash report for concretization errorsZack Galbreath2-1/+24
Capture any concretization errors and record them in a CTest Update.xml file.
2018-05-15CDash report for configure stepZack Galbreath2-8/+112
Generate CTest XML file containing configure output
2018-05-15Capture source line number in CTest log parserZack Galbreath1-1/+1
2018-05-15Fix typo in commentZack Galbreath1-1/+1
2018-05-15Add CDash as a valid reporting formatZack Galbreath1-1/+2
2018-05-15Initialize report generator before parsing specsZack Galbreath2-7/+10
This will allow us to generate reports for concretization errors
2018-05-15Allow --overwrite and --log-format to be used togetherZack Galbreath1-36/+35
Restructure the logic of the spack install command to allow these two command-line arguments to be used at the same time.
2018-05-15Format-agnostic data structure for reportsZack Galbreath1-43/+45
Replace the JUnit-specific terms 'testsuite' and 'testcase' with 'spec' and 'package', respectively.
2018-05-08Packages can tune the list of files to be archived at the end of install (#7760)Massimiliano Culpo4-0/+81
Fixes #2781 This PR introduces a new attribute for packages called `archive_files`, which designates files that should be saved from a package build (e.g. the config.log generated during autotools builds). The attribute contains a list of glob expressions; Any file that matches will be archived in the `<prefix>/.spack/archived-files` directory. Errors that occur when archiving files are collected and reported in a file named `<prefix>/.spack/archived-files/errors.txt`. `AutotoolsPackage` and `CMakePackage` provide a sensible default override for this attribute.
2018-05-07Specs add a space before dependencies (#7942)Massimiliano Culpo3-26/+45
fixes #7941 Modified string representation of Specs to add a space before deps Unit-tests have been modified accordingly Added a test for regression on #7941
2018-05-06Support *.TAR.gz extension. (#7973)健美猫1-1/+1
2018-05-05Fix coloring of URLs containing @ symbol (#7799)Adam J. Stewart1-3/+3
* Fix coloring of URLs containing @ symbol * Fix coloring of descriptions containing @ symbol
2018-05-05Set default provider for every virtual package (#7784)Adam J. Stewart1-0/+10
* Set default provider for every virtual package * Add unit test to ensure that every virtual package has a default provider explicitly set
2018-05-01Fix initialization of defaults in yaml schema validation (#7959)scheibelp2-2/+47
Fixes #7924 Spack's yaml schema validator was initializing all instances of unspecified properties with the same object, so that updating the property for one entry was updating it for others (e.g. updating versions for one package would update it for other packages). This updates the schema validator to instantiate defaults with separate object instances and adds a test to confirm this behavior (and also confirms #7924 without this change).
2018-04-28Document how to run unit tests with print statements (#7860)Adam J. Stewart1-0/+7
2018-04-26Allow len(Version) to return number of split components. (#7918)Chris Green2-0/+11
2018-04-26XL Fortran compiler >= 16.0 is synced with C compiler version (#7887)serbanmaerean2-0/+12
* Use reported version of IBM XL Fortran compiler for compiler versions >= 16.0. Starting with the April 2018 release, the IBM XL C and Fortran compilers report the same version, 16.0. Consequently, there is no need to downgrade the Fortran compiler version to match that of the C compiler.
2018-04-26Use GitLab's API endpoint for fetching a git snapshot. (#7881)Sergey Kosukhin2-4/+25
* Use GitLab's API endpoint for fetching a git snapshot. * More GitLab packages use the API. * find_list_url for GitLab's API URLs. * Flake8 * Url for 'hacckernels'. * Check GitLab API regexps before the non-API ones.
2018-04-26config_args does NOT apply to CMakePackage. (#7917)健美猫1-1/+1
2018-04-18Add -d option to diy to specify source path move -j to common args (#5963)Matthew Scott Krafczyk3-4/+20
2018-04-18Fix bug/oversight in formatting error message. (#7810)Elizabeth Fischer1-1/+1
2018-04-17Activation of activated package just msg's (#7752)George Hartzell1-1/+2
Activating a package that is already activated now sends a `tty.msg` and returns. ``` -bash-4.2$ ~/spack/bin/spack activate aspell6-en ==> Package aspell6-en/lc4v24f is already activated. ```
2018-04-17Better error message for spack providers (#7748)Massimiliano Culpo3-7/+116
* Better error message for spack providers fixes #1355 `spack providers` now outputs a sensible error message if non-virtual specs are provided as arguments: ``` $ spack providers mpi zlib petsc ==> Error: non-virtual specs cannot be part of the query [zlib, petsc] ``` Formatting of the output changed slightly. * Calling 'spack providers' without arguments print the virtual pkg list Also, the error message in case of a wrong parameter has been improved to show the list of valid packages. * Avoid printing headers if stdout is not a tty * The provider list is formatted with colify if not in a tty * Added a test to check the list of providers returned from the command
2018-04-13cray: add comment about module use in packages.yaml (#7751)Cameron Smith1-1/+8
This advises users to prefer `modules:` entries in `packages.yaml` on Cray.
2018-04-13Fix when_spec inheritance for extensions (#7746)becker331-1/+1
Popping the when spec from kwargs in the extends directive breaks class inheritance. Inheriting classes do not find their when spec. We now get the when spec from kwargs instead, leaving it to be found by any downstream package classes.
2018-04-11Package.provides account for v deps that are provided conditionally (#7716)Massimiliano Culpo2-1/+13
fixes #7705 Package.provides now checks constraints to ensure that a spec provides a given virtual package. Note that 'strict=True' is not passed to satisfies as this function is also used during concretization.
2018-04-04make view understand hashes (#7573)healther1-4/+5
Fixes #7548 This updates the "spack view" command to use the same parsing logic as "spack install" on the user-provided specs. For example you can provide a DAG hash to refer to an exact installed spec instead of specifying name, compiler, etc.
2018-04-03Fix bug in test_find_with_globbing unit test (#7652)Adam J. Stewart1-1/+1
2018-04-03Do not call sys.exit() in except block (#7659)Zack Galbreath3-12/+31
When an invalid spec is encountered by `parse_specs()` we now raise a `SpackError` instead of calling `sys.exit()`
2018-03-31Avoid double 'lib' for packages whose name already starts with lib (#7651)Adam J. Stewart4-12/+51
2018-03-28mirrors.yaml: does not expand ~ (#7631)Axel Huebl1-4/+4
Use `$HOME` for cli commands in `mirrors.yaml` and add "username" example strings in the file itself.
2018-03-27Fix buildcache relocate: only skip if rpaths are relative (#7605)Patrick Gartung1-1/+1
This fixes a check that decides when to skip buildcache relocation. Originally the check was flawed in two ways: it would skip if the source prefix matched the destination prefix, which no longer matters since the source prefix is replaced with a placeholder (so it always needs to be updated); it also would skip relocation if the rpaths were not relative, when in fact it should be the opposite (binaries without relative rpaths *should* be relocated, and those without don't need it).
2018-03-24Update copyright on LLNL files for 2018. (#7592)Todd Gamblin293-295/+295
2018-03-24Avoid stat-ing all packages at startup. (#7587)Todd Gamblin1-3/+9
- FastPackageChecker was being called at startup every time Spack runs, which takes a long time on networked filesystems. Startup was taking 5-7 seconds due to this call. - The checker was intended to avaoid importing all packages (which is really expensive) when all it needs is to stat them. So it's only "fast" for parts of the code that *need* it. - This commit makes repositories instantiate the checker lazily, so it's only constructed when needed.
2018-03-23Remove case consistency check at startup. (#7585)Todd Gamblin1-110/+0
- This was needed when we transitioned to all lowercase packages because git didn't handle case changes well on case-insensitive filesystems. - Now it just adds extra stat calls to startup, and we check for all-lowercase package names in tests, so we'll remove it. - people using really old versions of Spack can re-clone.
2018-03-23Cray clean environment (#7582)Mario Melara2-3/+19
* Create unload_module method Extract code from load_module into unload_module. * Unload modules to create a clean env on Cray removes cray-libsci, cray-mpich and darshan to prevent any silent linking with those packages.
2018-03-23Increment Spack version (#7565)Adam J. Stewart1-1/+1
2018-03-23Grab crayos version from PrgEnv module versions (#7583)becker331-3/+11
2018-03-23Add the ability to separate architecture in path scheme (#4329)Mario Melara3-6/+67
* Add format to separate target and os for path spec format can now handle separations of target and os for setting up the path. * Added ${PLATFORM} et al to spec.format() ${PLATFORM}, ${OS}, ${TARGET} * Update tests Updated tests and got rid of unnecessary code. * Also update documentation to reflect this new ability. * Add default path scheme to config.yaml Added default path scheme to config.yaml. Users can overwrite this section if they want.