summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
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.
2018-03-22Speedup the default 'libs' property search ... (#7553)Veselin Dobrev1-24/+21
* Speedup the default 'libs' property search - important for external packages. * As advised by @alalazo, use tuples instead of lists inside _libs_default_handler.
2018-03-22Fix error raising during install with Python 3 (#6894)Adam J. Stewart1-2/+8
* Fix error raising during install with Python 3 * Fix env_path too
2018-03-22Record installation date and time in DB (#7334)Massimiliano Culpo6-51/+262
* Added installation date and time to the database Information on the date and time of installation of a spec is recorded into the database. The information is retained on reindexing. * Expose the possibility to query for installation date The DB can now be queried for specs that have been installed in a given time window. This query possibility is exposed to command line via two new options of the `find` command. * Extended docstring for Database._add * Use timestamps since the epoch instead of formatted date in the DB * Allow 'pretty date' formats from command line * Substituted kwargs with explicit arguments * Simplified regex for pretty date strings. Added unit tests.
2018-03-22Recover the old patching order for packages. (#7558)Massimiliano Culpo1-1/+1
fixes #7543 This is very likely an hot-fix, while a more permanent solution is needed. See this comment for more insight: https://github.com/spack/spack/pull/7193#discussion_r176448831 on the problem.
2018-03-21Propagate architecture information during concretization (#7412)becker332-17/+57
This updates architecture concretization to * Search for the nearest parent in the DAG for architecture information rather than defaulting to the root of the DAG * Propagate architecture settings transitively, such that if for example the target is set at the root of the dag it will set the same target on indirect dependencies (assuming no intermediate dependency specifies a separate target). Previously this occurred in general but under some conditions did not, for example if an intermediate dependency specified some subset of architecture properties.
2018-03-21Enable creation of mirrors for systems with different compilers (#5153)scheibelp3-13/+50
* Create mirror for system with different compilers Spack concretizes the spec provided by the user in "spack mirror create" to ensure downloading the right dependencies. Under normal circumstances concretization requires that the chosen compiler exists on the system, but this is not required when creating download mirrors for other systems, so this requirement is removed in that case. * Add test for disabling compiler existence check * Update compiler existence checking logic * improve test for disabling compiler existence check
2018-03-21Generate spack docset for Dash. (#6981)健美猫1-1/+7
2018-03-21make py-setuptools a run-time-only dep for py-basemap and patch pytho… (#6989)Gregory Lee1-2/+8
* make py-setuptools a run-time-only dep for py-basemap and patch python package to only apply setuptools flag for build deps * py-qtconsole does not require setuptools
2018-03-21Support MD5 with a warning when OpenSSL is compiled in FIPS mode (#7531)scheibelp1-3/+48
* This allows Spack to work with MD5 hashes on machines with openssl in FIPS mode. * We are still using MD5 for validation in many places, and a later PR will replace all uses of MD5 with SHA256. * This is a quick fix until that happens.
2018-03-21patch config.guess for ARM (aarch64) (#7427)Gregory Lee1-3/+3
2018-03-20spec: support "full" hashesPeter Scheibel2-3/+34
This hash includes the content of the package itself as well as the DAG for the package.
2018-03-20package: add a content_hash method for packagesPeter Scheibel2-0/+56
This calculates a hash which depends on the complete content of the package including sources and the associated `package.py` file.
2018-03-20package: ensure patches are applied in-orderPeter Scheibel1-1/+11
This helps to ensure that patches are applied consistently and will also be used as the source for the patch part of full package hashes.
2018-03-20package_hash: add code to generate a hash for a package filePeter Scheibel2-0/+235
This will be included in the full hash of packages.
2018-03-20PackageBase: add a list of metadata attributesPeter Scheibel1-0/+4
These attributes are ignored when doing a content hash of a package.
2018-03-20fetch_strategy: add a source_id to fetchesPeter Scheibel1-0/+46
This will be included in the full hash of packages.
2018-03-12Fix bugs in `spack dependencies` command (#7435)Todd Gamblin3-20/+35
- transitive dependencies were not being handled correctly - restructure code to do recursion and mark visited packages properly - add `-V` option to *not* expand virtuals in spack dependencies
2018-03-12Constructing a SpecBuildInterface from another gives no inconsistent MRO (#7457)Massimiliano Culpo2-1/+34
fixes #7239
2018-03-09spack buildcache: allow unsigned tarballs (#7440)Patrick Gartung4-67/+49
This re-adds the option to create and install unsigned tarballs, now with the -u option (--unsigned) rather than the -y option. This also changes the "keys" command, replacing the -y/--yes-to-all option with the -t/--trust option (which has the same effect but is more-clearly named).
2018-03-09resource: convert symlink to real path (#7417)Levi Baber1-1/+1
Fixes #7130 shutil.move expects a source path like "/x/y/" to be a directory and fails if "/x/y" is a symlink. This invokes realpath on the source path to avoid the issue.
2018-03-09replace dash with underscore in os name/version (#7381)scheibelp1-2/+2
Fixes #7356 In some cases OperatingSystem (e.g. LinuxDistro) was getting instantiated with a version that contains dashes. This breaks because the concretizer later converts this value to a string and re-parses it, and the '-' character is used to separate architecture components. This adds a guard in the initializer to convert '-' to '_'.
2018-03-07Changed CudaPackage base class to PackageBase (#7416)Massimiliano Culpo1-2/+2
CudaPackage is always used as a mixin. As such it should inherit from PackageBase, and not Package.
2018-03-06Improved binary relocation: error checking and reporting (#7314)Patrick Gartung5-149/+352
Fixes #7237 Fixes #6404 Fixes #6418 Fixes #6369 Identify when binary relocation fails to remove all instances of the source prefix (and report an error to the user unless they specify -a to allow the old root to appear). This check occurs at two stages: during "bincache create" all instances of the root are replaced with a special placeholder string ("@@@@..."), and a failure occurs if the root is detected at this point; when the binary package is extracted there is a second check. This addresses #7237 and #6418. This is intended to be compatible with previously-created binary packages. This also adds: * Better error messages for "spack install --use-cache" (#6404) * Faster relocation on Mac OS (using a single call to install_name_tool for all files rather than a call for each file) * Clean up when "buildcache create" fails (addresses #6369) * Explicit error message when the spack instance extracting the binary package uses a different install layout than the spack instance that created the binary package (since this is currently not supported) * Remove the option to create unsigned binary packages with -y
2018-03-05Fix pkgconf on Crays (#7171)Mario Melara1-0/+3
This updates Cray.setup_platform_environment to use cray-specific pkgconfig paths so that all providers of 'pkgconfig' have access to them (previously the 'pkg-config' provider had this but the 'pkgconf' provider did not).
2018-03-05only filter compiler paths for binaries provided by the compiler (#7369)scheibelp1-4/+9