summaryrefslogtreecommitdiff
path: root/lib/spack/external
AgeCommit message (Collapse)AuthorFilesLines
2021-12-19externals: add `attrs` for new `jsonschema`Todd Gamblin15-0/+4924
Updating `jsonschema` to 3.2.0 requires `attrs`. Add it to externals.
2021-12-19externals: add `pyrsistent` for new `jsonschema`Todd Gamblin7-0/+1383
Updating `jsonschema` to 3.2.0 requires `pyrsistent`. Adding just the pieces of it that are needed for `jsonschema`.
2021-12-19externals: add `functools32` for new `jsonschema`Todd Gamblin6-0/+1034
Updating `jsonschema` to 3.2.0 requires `functools32`, just for Python 2.
2021-11-24Update distro to v1.6.0 (#27263)Massimiliano Culpo2-217/+502
2021-11-24Update Jinja2 to v2.11.3 and MarkupSafe to v1.1.1 (#27264)Massimiliano Culpo37-4147/+5002
2021-11-24Update six to v1.16.0 (#27265)Massimiliano Culpo2-21/+128
2021-11-23Remove support for Python 2.6 (#27256)Massimiliano Culpo5-219/+4
Modifications: - [x] Removed `centos:6` unit test, adjusted vermin checks - [x] Removed backport of `collections.OrderedDict` - [x] Removed backport of `functools.total_ordering` - [x] Removed Python 2.6 specific skip markers in unit tests - [x] Fixed a few minor Python 2.6 related TODOs in code Updating the vendored dependencies will be done in separate PRs
2021-11-18Allow recent pytest versions to be used with Spack (#25371)Massimiliano Culpo90-0/+0
Currently Spack vendors `pytest` at a version which is three major versions behind the latest (3.2.5 vs. 6.2.4). We do that since v3.2.5 is the latest version supporting Python 2.6. Remaining so much behind the currently supported versions though might introduce some incompatibilities and is surely a technical debt. This PR modifies Spack to: - Use the vendored `pytest@3.2.5` only as a fallback solution, if the Python interpreter used for Spack doesn't provide a newer one - Be able to parse `pytest --collect-only` in all the different output formats from v3.2.5 to v6.2.4 and use it consistently for `spack unit-test --list-*` - Updating the unit tests in Github Actions to use a more recent `pytest` version
2021-11-17Fix overly generic exceptions in log parser (#27413)Harmen Stoppels1-4/+0
This type of error is skipped: make[1]: *** [Makefile:222: /tmp/user/spack-stage/.../spack-src/usr/lib/julia/libopenblas64_.so.so] Error 1 but it's useful to have it, especially when a package sets a variable incorrectly in makefiles
2021-10-22Document backport in py (#26897)Harmen Stoppels1-0/+2
2021-10-22Backport #186 from py-py to fix macOS failures (#26653)Harmen Stoppels1-3/+3
Backports the relevant bits of https://github.com/pytest-dev/py/commit/0f77b6e66f79c07dbb657e2b4a7e94263eacc01b
2021-10-15Revert "Don't run lsb_release on linux (#26707)" (#26754)Harmen Stoppels2-4/+1
This reverts commit fcac95b0654a84151ad51a9123f74e8cdfcf8d26.
2021-10-14Don't run lsb_release on linux (#26707)Harmen Stoppels2-1/+4
Running `lsb_release` on Linux takes about 50ms because it is written in Python. We do not use the output, so this change makes use not call it.
2021-10-12Avoid quadratic complexity in log parser (#26568)Harmen Stoppels1-62/+21
TL;DR: there are matching groups trying to match 1 or more occurrences of something. We don't use the matching group. Therefore it's sufficient to test for 1 occurrence. This reduce quadratic complexity to linear time. --- When parsing logs of an mpich build, I'm getting a 4 minute (!!) wait with 16 threads for regexes to run: ``` In [1]: %time p.parse("mpich.log") Wall time: 4min 14s ``` That's really unacceptably slow... After some digging, it seems a few regexes tend to have `O(n^2)` scaling where `n` is the string / log line length. I don't think they *necessarily* should scale like that, but it seems that way. The common pattern is this ``` ([^:]+): error ``` which matches `: error` literally, and then one or more non-colons before that. So for a log line like this: ``` abcdefghijklmnopqrstuvwxyz: error etc etc ``` Any of these are potential group matches when using `search` in Python: ``` abcdefghijklmnopqrstuvwxyz bcdefghijklmnopqrstuvwxyz cdefghijklmnopqrstuvwxyz ⋮ yz z ``` but clearly the capture group should return the longest match. My hypothesis is that Python has a very bad implementation of `search` that somehow considers all of these, even though it can be implemented in linear time by scanning for `: error` first, and then greedily expanding the longest possible `[^:]+` match to the left. If Python indeed considers all possible matches, then with `n` matches of length `1 .. n` you see the `O(n^2)` slowness (i verified this by replacing + with {1,k} and doubling `k`, it doubles the execution time indeed). This PR fixes this by removing the `+`, so effectively changing the O(n^2) into a O(n) worst case. The reason we are fine with dropping `+` is that we don't use the capture group anywhere, so, we just ensure `:: error` is not a match but `x: error` is. After going from O(n^2) to O(n), the 15MB mpich build log is parsed in `1.288s`, so about 200x faster. Just to be sure I've also updated `^CMake Error.*:` to `^CMake Error`, so that it does not match with all the possible `:`'s in the line. Another option is to use `.*?` there to make it quit scanning as soon as possible, but what line that starts with `CMake Error` that does not have a colon is really a false positive...
2021-10-05Use gnuconfig package for config file replacement for RISC-V. (#26364)Kevin Pedretti4-1/+71
* Use gnuconfig package for config file replacement for RISC-V. This extends the changes in #26035 to handle RISC-V. Before this change, many packages fail to configure on riscv64 due to config.guess being too old to know about RISC-V. This is seen out of the box when clingo fails to build from source due to pkgconfig failing to configure, throwing error: "configure: error: cannot guess build type; you must specify one". * Add riscv64 architecture * Update vendored archspec from upstream project. These archspec updates include changes needed to support riscv64. * Update archspec's __init__.py to reflect the commit hash of archspec being used.
2021-10-04Build ppc64le docker images (#26442)Massimiliano Culpo3-5/+32
* Update archspec * Add ppc64le to docker images
2021-09-26log_parser.py: Find failed test case messages in error logs (#25694)bernhardkaindl1-1/+7
- Match failed autotest tests show the word "FAILED" near the end - Match "FAIL: ", "FATAL: ", "failed ", "Failed test" of other suites - autotest " ok"$ means the test passed, independend of text before. - autoconf messages showing missing tools are fatal later, show them.
2021-08-17Use a patched argparse only in Python 2.X (#25376)Massimiliano Culpo1-0/+0
Spack is internally using a patched version of `argparse` mainly to backport Python 3 functionality into Python 2. This PR makes it such that for the supported Python 3 versions we use `argparse` from the standard Python library. This PR has been extracted from #25371 where it was needed to be able to use recent versions of `pytest`. * Fixed formatting issues when using a pristine argparse.py * Fix error message for Python 3.X when missing positional arguments * Account for the change of API in Python 3.7 * Layout multi-valued args into columns in error messages * Seamless transition in develop if argparse.pyc is in external * Be more defensive in case we can't remove the file.
2021-07-15archspec: added support for arm compiler on graviton2 (#24904)Massimiliano Culpo2-1/+7
2021-06-26Update archspec to support arm compiler on a64fx (#24524)Massimiliano Culpo2-1/+13
2021-05-20spack: update archspecMassimiliano Culpo3-7/+172
This fixes the detection of Apple M1 and adds virtual levels for x86_64 architectures
2021-05-03archspec: updated external dependency (#23311)Massimiliano Culpo3-13/+71
Added support for Apple M1, extended support for zen3 with more compiler flags.
2021-04-22Docs: Updated copyrights in files still using 2020 as ending year (#23215)Tamara Dahlgren1-1/+1
2021-03-18archspec: update to latest version (#22357)Massimiliano Culpo2-2/+45
2021-02-01Python 3.10 support: collections.abc (#20441)Adam J. Stewart11-23/+71
2021-01-02copyrights: update all files with license headers for 2021Todd Gamblin2-2/+2
- [x] add `concretize.lp`, `spack.yaml`, etc. to licensed files - [x] update all licensed files to say 2013-2021 using `spack license update-copyright-year` - [x] appease mypy with some additions to package.py that needed for oneapi.py
2020-12-28archspec: fixed a typo in the vendored library (#20584)Massimiliano Culpo2-2/+2
2020-12-22add mypy to style checks; rename `spack flake8` to `spack style` (#20384)Tom Scogland1-0/+84
I lost my mind a bit after getting the completion stuff working and decided to get Mypy working for spack as well. This adds a `.mypy.ini` that checks all of the spack and llnl modules, though not yet packages, and fixes all of the identified missing types and type issues for the spack library. In addition to these changes, this includes: * rename `spack flake8` to `spack style` Aliases flake8 to style, and just runs flake8 as before, but with a warning. The style command runs both `flake8` and `mypy`, in sequence. Added --no-<tool> options to turn off one or the other, they are on by default. Fixed two issues caught by the tools. * stub typing module for python2.x We don't support typing in Spack for python 2.x. To allow 2.x to support `import typing` and `from typing import ...` without a try/except dance to support old versions, this adds a stub module *just* for python 2.x. Doing it this way means we can only reliably use all type hints in python3.7+, and mypi.ini has been updated to reflect that. * add non-default black check to spack style This is a first step to requiring black. It doesn't enforce it by default, but it will check it if requested. Currently enforcing the line length of 79 since that's what flake8 requires, but it's a bit odd for a black formatted project to be quite that narrow. All settings are in the style command since spack has no pyproject.toml and I don't want to add one until more discussion happens. Also re-format `style.py` since it no longer passed the black style check with the new length. * use style check in github action Update the style and docs action to use `spack style`, adding in mypy and black to the action even if it isn't running black right now.
2020-11-26archspec: added support for aocc (#20124)Massimiliano Culpo3-2/+145
2020-11-18spack test (#15702)Greg Becker1-0/+1
Users can add test() methods to their packages to run smoke tests on installations with the new `spack test` command (the old `spack test` is now `spack unit-test`). spack test is environment-aware, so you can `spack install` an environment and then run `spack test run` to run smoke tests on all of its packages. Historical test logs can be perused with `spack test results`. Generic smoke tests for MPI implementations, C, C++, and Fortran compilers as well as specific smoke tests for 18 packages. Inside the test method, individual tests can be run separately (and continue to run best-effort after a test failure) using the `run_test` method. The `run_test` method encapsulates finding test executables, running and checking return codes, checking output, and error handling. This handles the following trickier aspects of testing with direct support in Spack's package API: - [x] Caching source or intermediate build files at build time for use at test time. - [x] Test dependencies, - [x] packages that require a compiler for testing (such as library only packages). See the packaging guide for more details on using Spack testing support. Included is support for package.py files for virtual packages. This does not change the Spack interface, but is a major change in internals. Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov> Co-authored-by: wspear <wjspear@gmail.com> Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2020-11-11fix typo wrt target=graviton (#19865)Satish Balay2-2/+2
* fix typo wrt target=graviton This fixes spack build on aarch64 box * update archspec hash
2020-10-30Make archspec a vendored dependency (#19600)Massimiliano Culpo19-0/+3273
- Added archspec to the list of vendored dependencies - Removed every reference to llnl.util.cpu - Removed tests from Spack code base
2020-03-23Vendoring: remove dependency on Setuptools from vendored pytest (#15612)Todd Gamblin3-51/+17
If the Python used by Spack does not include Setuptools, then 'spack test' will fail because Spack's vendored pytest dependency imports and uses Setuptools in some of its functions. It turns out that Spack doesn't use the functionality those methods enable, so this PR removes those functions and thereby allows 'spack test' to run without Setuptools.
2020-03-16Buildcache: Install into non-default directory layouts (#13797)Patrick Gartung1-3/+6
* Buildcache: Install into non-default directory layouts Store a dictionary mapping of original dependency prefixes to dependency hashes Use the loaded spec to grab the new dependency prefixes in the new directory layout. Map the original dependency prefixes to the new dependency prefixes using the dependency hashes. Use the dependency prefixes map to replace original rpaths with new rpaths preserving the order. For mach-o binaries, use the dependency prefixes map to replace the dependency library entires for libraries and executables and the replace the library id for libraries. On Linux, patchelf is used to replace the rpaths of elf binaries. On macOS, install_name_tool is used to replace the rpaths and dependency libraries of mach-o binaries and the id of mach-o libraries. On Linux, macholib is used to replace the dependency libraries of mach-o binaries and the id of mach-o libraries. Binary text with padding replacement is attempted for all binaries for the following paths: spack layout root spack prefix sbang script location dependency prefixes package prefix Text replacement is attempted for all text files using the paths above. Symbolic links to the absolute path of the package install prefix are replaced, all others produce warnings.
2020-02-28Fix detection of redhat enterprise compute node (#15253)Adam J. Stewart1-0/+1
* Fix detection of redhat enterprise compute node * Add comma * Remove space
2019-12-30copyright: update copyright dates for 2020 (#14328)Todd Gamblin2-2/+2
2019-12-24tests: finish removing pyqver from the repository (#14294)Todd Gamblin2-2/+2
Remove a few remaining mentions of the pyqver package, which was removed in #14289.
2019-12-24tests: check min required python version with vermin (#14289)Massimiliano Culpo3-600/+0
This commit removes the `python_version.py` unit test module and the vendored dependencies `pyqver2.py` and `pyqver3.py`. It substitutes them with an equivalent check done using `vermin` that is run as a separate workflow via Github Actions. This allows us to delete 2 vendored dependencies that are unmaintained and substitutes them with a maintained tool. Also, updates the list of vendored dependencies.
2019-09-26External: add macholib and altgraph needed to relocate Mach-o binaries on ↵Patrick Gartung25-0/+5425
Linux (#12909)
2019-09-22externals: add note to jsonschema about modifications (#12895)Todd Gamblin1-1/+3
2019-09-21externals: avoid importing requests in jsonschemaTodd Gamblin1-4/+1
Spack doesn't need `requests`, and neither does `jsonschema`, but `jsonschema` tries to import it, and it'll succeed if `requests` is on your machine (which is likely, given how popular it is). This commit removes the import to improve Spack's startup time a bit. On a mac with SSD, the import of requests is ~28% of Spack's startup time when run as `spack --print-shell-vars sh,modules` (.069 / .25 seconds), which is what `setup-env.sh` runs. On a Linux cluster where Python is mounted from NFS, this reduces `setup-env.sh` source time from ~1s to .75s. Note: This issue will be eliminated if we upgrade to a newer `jsonschema` (we'd need to drop Python 2.6 for that). See https://github.com/Julian/jsonschema/pull/388.
2019-01-01copyright: update license headers for 2013-2019 copyright.Todd Gamblin2-2/+2
2018-11-09externals: bugfix in ruamel for ordereddict in Python 2.6Todd Gamblin1-2/+2
- args weren't being delegated properly from CommentedMap to OrderedDict
2018-10-17relicense: replace LGPL headers with Apache-2.0/MIT SPDX headersTodd Gamblin2-46/+8
- remove the old LGPL license headers from all files in Spack - add SPDX headers to all files - core and most packages are (Apache-2.0 OR MIT) - a very small number of remaining packages are LGPL-2.1-only
2018-08-20yaml: use ruamel.yaml instead of pyyamlTodd Gamblin56-8113/+5146
- ruamel.yaml allows round-tripping comments from/to files - ruamel.yaml is single-source, python2/python3 compatible
2018-06-20pytest: add _pytest/_version.py and LICENSETodd Gamblin4-1/+49
- pytest was not reporing the correct version from pytest.__version__. It reported 'unknown' - this fixes issues on some systems where system-installed pytest plugins would try to use the version and convert it to an int
2018-06-20externals: move spack.util.ordereddict to external/ordereddict_backportTodd Gamblin2-4/+41
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-05-15Capture source line number in CTest log parserZack Galbreath1-1/+1
2018-05-15Fix typo in commentZack Galbreath1-1/+1