summaryrefslogtreecommitdiff
path: root/lib/spack/external
AgeCommit message (Collapse)AuthorFilesLines
2022-11-07archspec: update version, translate renamed uarchs (#33556)Massimiliano Culpo3-24/+275
* Update archspec version * Add a translation table from old names
2022-08-26Use threading.TIMEOUT_MAX when available (#32399)Betsy McPhail1-1/+8
This value was introduced in Python 3.2. Specifying a timeout greater than this value will raise an OverflowError.
2022-08-26Update archspec to latest commit (#32368)Massimiliano Culpo3-6/+105
Modifications: - [x] Add graviton3 - [x] Optimize __eq__ for microarchitectures
2022-06-07archspec: bump to v0.1.4 (#30856)Massimiliano Culpo2-10/+49
Fixes compiler flags for oneapi and dpcpp
2022-05-23archspec: add oneapi and dpcpp flag support (#30783)Massimiliano Culpo2-1/+323
2022-05-18vendored externals: update archspec (#30683)Massimiliano Culpo4-38/+109
- Better support for 164fx - Better support for Apple M1(pro)
2022-03-17Windows Support: Testing Suite integrationJohn Parent3-16/+5
Broaden support for execution of the test suite on Windows. General bug and review fixups
2022-03-17Update tests support for WindowsBetsy McPhail1-1/+8
Fixup common tests * Remove requirement for Python 2.6 * Skip new failing test Windows: Update url util to handle Windows paths (#27959) * update url util to handle windows paths * Update tests to handle fixed url handling * canonicalize path only when the path type matches the host platform * Skip some url tests on Windows Co-authored-by: Omar Padron <omar.padron@kitware.com> Use threading.TIMEOUT_MAX when available (#24246) This value was introduced in Python 3.2. Specifying a timeout greater than this value will raise an OverflowError. Co-authored-by: Lou Lawrence <lou.lawrence@kitware.com> Co-authored-by: John Parent <john.parent@kitware.com> Co-authored-by: Betsy McPhail <betsy.mcphail@kitware.com>
2022-03-17Windows: Symlink supportBetsy McPhail2-4/+8
To provide Windows-compatible functionality, spack code should use llnl.util.symlink instead of os.symlink. On non-Windows platforms and on Windows where supported, os.symlink will still be used. Use junctions when symlinks aren't supported on Windows (#22583) Support islink for junctions (#24182) Windows: Update llnl/util/filesystem * Use '/' as path separator on Windows. * Recognizing that Windows paths start with '<Letter>:/' instead of '/' Co-authored-by: lou.lawrence@kitware.com <lou.lawrence@kitware.com> Co-authored-by: John Parent <john.parent@kitware.com>
2022-02-11move typing_extensions.py back into typing.py =\ (#28549)Danny McClanahan2-27/+22
2022-01-28macholib, altgraph: update vendored dependency (#28664)Massimiliano Culpo25-1253/+1345
2022-01-21introduce `llnl.util.compat` to remove sys.version_info checks (#21720)Danny McClanahan2-71/+95
- also split typing.py into typing_extensions and add py2 shims
2022-01-14Update copyright year to 2022Todd Gamblin1-1/+1
2022-01-12unparser: implement operator precedence algorithm for unparserTodd Gamblin4-1045/+16
Backport operator precedence algorithm from here: https://github.com/python/cpython/commit/397b96f6d7a89f778ebc0591e32216a8183fe667 This eliminates unnecessary parentheses from our unparsed output and makes Spack's unparser consistent with the one in upstream Python 3.9+, with one exception. Our parser normalizes argument order when `py_ver_consistent` is set, so that star arguments in function calls come last. We have to do this because Python 2's AST doesn't have information about their actual order. If we ever support only Python 3.9 and higher, we can easily switch over to `ast.unparse`, as the unparsing is consistent except for this detail (modulo future changes to `ast.unparse`)
2022-01-12unparser: refactor delimiting with context managers in ast.unparseTodd Gamblin1-190/+177
Backport of https://github.com/python/cpython/commit/4b3b1226e86df6cd45e921c8f2ad23c3639c43b2
2022-01-12unparser: add block() context manager for indentationTodd Gamblin1-63/+63
This is a backport of a refactor from cpython 3.9
2022-01-12unparse: Make unparsing consistent for 2.7 and 3.5-3.10Todd Gamblin2-13/+71
Previously, there were differences in the unparsed code for Python 2.7 and for 3.5-3.10. This makes unparsed code the same across these Python versions by: 1. Ensuring there are no spaces between unary operators and their operands. 2. Ensuring that *args and **kwargs are always the last arguments, regardless of the python version. 3. Always unparsing print as a function. 4. Not putting an extra comma after Python 2 class definitions. Without these changes, the same source can generate different code for different Python versions, depending on subtle AST differences. One place where single source will generate an inconsistent AST is with multi-argument print statements, e.g.: ``` print("foo", "bar", "baz") ``` In Python 2, this prints a tuple; in Python 3, it is the print function with multiple arguments. Use `from __future__ import print_function` to avoid this inconsistency.
2022-01-12externals: add astunparseTodd Gamblin4-11/+1011
Add `astunparse` as `spack_astunparse`. This library unparses Python ASTs and we're adding it under our own name so that we can make modifications to it. Ultimately this will be used to make `package_hash` consistent across Python versions.
2021-12-19externals: Upgrade `jsonschema` to `v3.2.0`Todd Gamblin23-2200/+1979
Our `jsonschema` external won't support Python 3.10, so we need to upgrade it. It currently generates this warning: lib/spack/external/jsonschema/compat.py:6: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working This upgrades `jsonschema` to 3.2.0, the latest version with support for Python 2.7. The next version after this (4.0.0) drops support for 2.7 and 3.6, so we'll have to wait to upgrade to it. Dependencies have been added in prior commits.
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