summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2018-01-29Mark slow unit tests (#6994)Massimiliano Culpo14-71/+136
* Marking database tests as slow * Marking url command tests as slow * Marking every test that uses database as slow * Marking tests that import files as slow * Marking gpg tests as slow * Marking all versions and one list tests as slow * Added more markers to unit tests + cli option to skip slow tests Following a discussion with Axel, the generic 'slowtest' marker has been split into 'db', 'network' and 'maybeslow'. A brief description of the meaning of each marker has been added to pytest.ini. A command line option to run only fast tests has been added to 'spack test' * Don't use classes to group tests together Reverted grouping tests under a class, as required in the review * Minor style changes
2018-01-28Remove Package instance caching in Repo (#6367)scheibelp9-60/+27
This attempts to address one of the complaints at #5996 (comment): > Repo currently caches package instances by Spec, and those Package instances have a Spec. > This is unnecessary and causes confusion. I think I thought that we'd need to cache instances > after loading package classes, but really just caching the classes is fine. With this update, Repo's package cache is removed and Specs cache the package reference themselves. One consequence is that Specs which compare as equal will store separate instances of a Package class (not doing this creates issues for #4595 (comment)). There were several references to Spec.package that could be replaced with Spec.package_class without any additional modifications. There are still a couple remaining references to Spec.package in Spec that would require adding functionality before replacing (e.g. calling Package.provides and Package.installed). Note this makes it difficult to mock fetchers for tests which invokes code that reconstructs specs. test_packaging was one example of this where the updates caused a failure (in that case the error was avoided by not making an unnecessary call). Details: * Replace instances of spec.package with spec.package_class where a class method is being called * Remove instances of Repo.get where Spec.package_class can be used in its place * remove Repo.get caching instances of Package class for specs * remove redundant check (which is also incorrect now that each spec stores its own copy of its package) * avoid creating mirror with specs because it copies specs and those copies dont refer to the mocked fetcher (and it is also not required for the test) * remove checks that are no longer necessary since repo doesn't cache specs
2018-01-28Fix gfortran 7 detection (#7017)Adam J. Stewart4-7/+44
2018-01-28Cleaned up JUnit report generation on install (#6977)Massimiliano Culpo3-226/+364
* Cleaned up JUnit report generation on install The generation of a JUnit report was previously part of the install command. This commit factors the logic into its own module, and uses a template for the generation of the report. It also improves report generation, that now can deal with multiple specs installed at once. Finally, extending the list of supported formats is much easier than before, as it entails just writing a new template. * Polished report generation + added tests for failures and errors The generation of a JUnit report has been polished, so that the stacktrace is correctly displayed with Jenkins JUnit plugin. Standard error is still not used. Added unit tests to cover for installation failures and installation errors.
2018-01-26Enable install of multiple specs from yaml files (#6984)Federico Ficarelli2-21/+52
2018-01-25Python Installs: No User Site Dir (#7065)Axel Huebl1-3/+3
Avoid adding an "outside" (local home's) python user site directory during python package installs. Implements #6611 Fixes packages with auto-find side effects such as `py-setuptools` that cause `py-matplotlib` to fail to build #6558
2018-01-23Fix error message typo in 'spack create' cmd (#7042)Alastair Harrison1-1/+1
- Previously would print the spec's namespace twice, rather than printing the spec's namespace, followed by the repo's namespace.
2018-01-19Add --full-path option to module find (#6838)Levi Baber2-4/+16
2018-01-19Added a setter to the Spec.prefix property (#6814)Massimiliano Culpo2-13/+17
This commit removes logic from Spec that was there only to be used in tests, and allows to set a new prefix cleanly in user's code.
2018-01-18Fix type issues with setting flag handlers (#6960)becker332-2/+27
The flag_handlers method was being set as a bound method, but when reset in the package.py file it was being set as an unbound method (all python2 issues). This gets the underlying function information, which is the same in either case. The bug was uncovered for parmetis in #6858. This is a partial fix. Included are changes to the parmetis package.py file to make use of flag_handlers.
2018-01-16Final changes for v0.11.0 (#6318)Todd Gamblin2-2/+1
2018-01-16Fix installing specs from yaml file (#6906)Massimiliano Culpo4-4/+34
The feature added in #4611 is currently broken. This commit fixes the behavior of the command and adds unit tests to ensure the basic semantic is maintained. It also changes slightly the behavior of Spec.concretized to avoid copying caches before the concretization (as this may result in a wrong hash computation for the DAG).
2018-01-16Speed up doc builds with spack list --format=html (#6945)Todd Gamblin5-18/+141
- Generating the HTML from for >2300 packages from RST in Sphinx seems to take forever. - Add an option to `spack list` to generate straight HTML instead. - This reduces the doc build time to about a minute (from 5 minutes on a mac laptop).
2018-01-16Vendor ordereddict for python2.6 only (#6931)Massimiliano Culpo9-281/+181
* Vendor ordereddict for python2.6 only This commit substitutes the custom module 'ordereddict_backport' with the more known 'ordereddict' and vendors it only for python 2.6. Other supported versions of python will use 'collections.OrderedDict'. * Use absolute imports also for python 2.6 See PEP-328 for more information on the subject * Added provenance of vendored ordereddict
2018-01-12Handle test dependencies that are python extensions (#6904)scheibelp1-1/+2
See #6794 This fixes cases where test-only dependencies were omitted from consideration when modifying the environment at build time. This includes an update to the python package definition to add testing-related python extensions to its specialized environment setup.
2018-01-12Relax conflict checks for externals (#6907)scheibelp1-2/+2
This updates the conflict-checking logic to require that the conflict spec matches exactly and that all fields mentioned in the conflict spec are present in the concretized spec in order to report a conflict. This will automatically skip all conflict checks for dependencies of externals (since externals strip dependencies). This will not affect non-external packages since all fields and dependencies are fully specified for such packages.
2018-01-10Keep track of source and versions for external libraries (#6803)Adam J. Stewart1-16/+98
* Keep track of source and versions for external libraries * Note source of more obscure libraries * We aren't upgrading jsonschema after all * Add note on modifications made to pytest
2018-01-10Update to pytest 3.2.5 (#6801)Adam J. Stewart48-2109/+3303
* Update to pytest 3.2.5 * Get pytest to pass Python 2.6 compatibility checks
2018-01-10Add suggestion to Contribution Guide to activate flake8 (#6886)Adam J. Stewart1-9/+19
2018-01-10Update to the latest version of jinja2 (#6790)Adam J. Stewart23-365/+728
2018-01-10Update to py 1.4.34 (#6789)Adam J. Stewart9-79/+25
* Update to the latest version of py * Revert back to py 1.4.34
2018-01-10Add unit tests for spack versions command (#6774)Adam J. Stewart2-1/+47
* Add unit tests for spack versions command * Fix bug in web spidering for Python 2.6
2018-01-10Update to the latest version of six (#6787)Adam J. Stewart1-3/+8
2018-01-10Fix bug in placeholder spack cd command and add unit tests (#6776)Adam J. Stewart3-3/+40
2018-01-10Add unit tests for spack arch command (#6775)Adam J. Stewart1-0/+34
2018-01-10Add unit tests for spack graph command (#6778)Adam J. Stewart1-0/+76
2018-01-10Fix a typo in fetch_strategy error message formatting (#6878)Adam J. Stewart1-1/+1
2018-01-07Add documentation on Codecov (#6842)Adam J. Stewart1-12/+60
2018-01-05Fixes the bug in spack configure spotted in #6833 (#6837)Massimiliano Culpo1-1/+1
2018-01-05Fix spack configure output (#6835)Adam J. Stewart1-1/+1
2018-01-02Fix HTML detection (#6394)Michael Kuhn1-1/+2
Some servers report a content-type header instead of Content-Type.
2018-01-02add OctavePackage (#6746)Denis Davydov4-9/+85
* add OctavePackage 1. remove import CudaPackage which is not needed anymore 2. mention CudaPackage and OctavePackage in packaging guide 3. adjust OctavePackageTemplate 4. add clue file for Octave build 5. sanity check on self.prefix * use setup_environment
2018-01-02Add more unit tests for spack clean command (#6777)Adam J. Stewart1-3/+5
2017-12-30Add unit tests for spack help command (#6779)Adam J. Stewart1-0/+75
* Add unit tests for spack help command * Work around issue with using `spack help` twice in tests
2017-12-30Update to the latest version of argparse (#6786)Adam J. Stewart1-53/+36
* Update to the latest version of argparse * Re-add colified logic
2017-12-30Update to distro 1.0.4 (#6788)Adam J. Stewart1-24/+39
* Update to the latest version of distro * Update distro to 1.0.4
2017-12-22Add more unit tests for spack list command (#6750)Adam J. Stewart1-2/+32
2017-12-22spack mirror remove: fix no-update error (#6559)Massimiliano Culpo1-9/+1
Fixes #4573 "spack mirror remove" was not actually removing mirrors from the configuration.
2017-12-21Fix python3 compatibility bug in spack edit command (#6748)Adam J. Stewart1-2/+2
In Python 2, filter() returns a list, but in Python 3, filter() returns an iterator, and iterators have no length.
2017-12-21separate stdout and stderr for module loading (#6713)becker331-1/+4
2017-12-20binary caching: handle files misidentified as needing relocation (#6679)Patrick Gartung3-25/+54
* Only specify a file as needing relocation if it contains the spack root as a text string (this constraint also applies to binaries) * Don't fail if there is an error retrieving RPATH information from a binary (even if it is specified as requiring relocation)
2017-12-20Compiler flag handlers (#6415)becker3312-1320/+372
This adds the ability for packages to apply compiler flags in one of three ways: by injecting them into the compiler wrapper calls (the default in this PR and previously the only automated choice); exporting environment variable definitions for variables with corresponding names (e.g. CPPFLAGS=...); providing them as arguments to the build system (e.g. configure). When applying compiler flags using build system arguments, a package must implement the 'flags_to_build_system_args" function. This is provided for CMake and autotools packages, so for packages which subclass those build systems, they need only update their flag handler method specify which compiler flags should be specified as arguments to the build system. Convenience methods are provided to specify that all flags be applied in one of the 3 available ways, so a custom implementation is only required if more than one method of applying compiler flags is needed. This also removes redundant build system definitions from tutorial examples
2017-12-19dealii: add GMSH, add CMAKE_FIND_APPBUNDLE to CMakePackage (#6723)Denis Davydov1-1/+4
* dealii: add GMSH dependency * CMakePackage: add CMAKE_FIND_APPBUNDLE to prevent picking up binaries from /Applications
2017-12-18spack install: make restaging the default (#6465)Massimiliano Culpo2-3/+9
Fixes #5940 This PR changes the option '--restage' of 'spack install' to '--dont-restage', inverting its meaning and the default behavior of the command.
2017-12-14Skip collection of compilers which report an empty version (#6684)scheibelp2-19/+39
Fixes #6200 For compilers that successfully run a version detection script but don't actually return a version, Spack was keeping track of the empty version and then failing when attempting to construct a compiler spec. This skips any attempt to add a compiler entry when no version is reported (but logs when a compiler fails to report a version).
2017-12-14misc fixes, changed to EnvironmentModifications (issue #6501) (#6541)Mark Olesen1-11/+52
* Support pruning of vars with Env from_sourcing_file (issue #6501) - Blacklist string literals or regular expressions of environment variables that are to be removed from consideration as being affect by the sourcing of the file. Conversely, whitelist modifications that should not ignored. Whitelisted variables have priority over blacklisting. Eg, EnvironmentModifications.from_sourcing_file ( bashrc blacklist=['JUNK_ENV', 'OPTIONAL_.*'], whitelist=['OPTIONAL_REQUIRED.*'] ) This modification can be used to eliminate environment variables that are not generalized for modules (eg, user-specific variables). * BUG: module prepend-path in wrong order (fixes #6501) * STYLE: module variables in sorted order (issue #6501) - looks nicer and also helps when comparing the contents of different module files. * ENH: remove duplicates from env paths when creating modules (issue #6501) - this makes for a cleaner module environment and helps avoid some unnecessary changes to the environment that are only provoked by redundancies in the PATH. eg, before PATH=/usr/bin after PATH=/usr/bin:/usr/bin:/my/application/bin should only result in /my/application/bin being added to the PATH and not /usr/bin:/my/application/bin Activate via the 'clean' flag (default: False): EnvironmentModifications.from_sourcing_file(bashrc, clean=True,..
2017-12-11add -d option for edit command (#6416)becker331-3/+21
* add -d option for edit command and improve suffix extrapolation from '.py' to use glob
2017-12-11Simplified "Environment-Modules" section in getting started guide. (#6410)Massimiliano Culpo1-58/+21
Fixes #2440 The "Getting started" guide should be short and sweet. This commit simplifies the "Environment-Modules" section pruning: - outdated / wrong suggestions as noted in #2440 - uncommon setups that are better treated in a reference guide
2017-12-07config.py: fixed comments that refer to variables following them (#6585)Massimiliano Culpo1-11/+10
According to the documentation here: http://www.sphinx-doc.org/en/stable/ext/autodoc.html "For module data members and class attributes, documentation can either be put into a comment with special formatting (using a #: to start the comment instead of just #), or in a docstring after the definition."
2017-12-06CMAKE_INSTALL_RPATH is semicolon-separated. (#6577)Sergey Kosukhin1-1/+1