Commit graph

35 commits

Author SHA1 Message Date
Tom Scogland
87e456d59c
spack setup-env.sh: make zsh loading async compatible, and ~10x faster (in some cases) (#26120)
Currently spack is a bit of a bad actor as a zsh plugin, and it was my
fault.  The autoload and compinit should really be handled by the user,
as was made abundantly clear when I found spack was doing completion
initialization for *all* of my plugins due to a deferred setup that was
getting messed up by it.

Making this conditional took spack load time from 1.5 seconds (with
module loading disabled) to 0.029 seconds. I can actually afford to load
spack by default with this change in.

Hopefully someday we'll do proper zsh completion support, but for now
this helps a lot.

* use zsh hist expansion in place of dirname
* only run (bash)compinit if compdef/complete missing
* add zsh compiled files to .gitignore
* move changes to .in file, because spack
2021-10-28 11:32:59 -07:00
Todd Gamblin
472638f025 .gitignore needs to be below env and ENV for case-insensitive FS 2021-10-04 18:30:19 -07:00
Jordan Galby
97ea57e59f
Add ld.gold and ld.lld compiler wrapper (#25626)
The gcc compiler can be configured to use `ld.gold` by default. It will
then call `ld.gold` explicitly when linking. When so, spack need to have
a ld.gold wrapper in PATH to inject rpaths link flags etc...

Also I wouldn't be surprised to see some package calling `ld.gold`
directly.

As for ld.gold, the argument could be made that we want to support any
package that could call ld.lld.
2021-08-27 13:16:26 +02:00
loulawrence
4da0561496
Add config option to use urllib to fetch if curl missing (#21398)
* Use Python module urllib to fetch in the case that curl is missing
2021-06-22 13:38:37 -07:00
Massimiliano Culpo
ca69e7cd43
Add .idea folder to the list of ignored files (#21685) 2021-02-16 07:32:27 -06:00
Adam J. Stewart
e341a76543
Clean up .gitignore, add Python.gitignore (#20613)
* Clean up .gitignore, add Python.gitignore

* Ignore `spack debug create-db-tarball` logs

* lib/ and var/ need to be tracked

* Add editor- and OS-specific ignores

* Add PyCharm ignores

* Add JetBrains editors like PyCharm
2021-02-09 20:55:03 +00:00
Adam J. Stewart
a02fc8ae58
Ignore __pycache__ directory (#16836) 2020-06-03 22:09:06 -05:00
Jeffrey Salmond
95a03f6759
Add vscode files to gitignore (#16270) 2020-04-24 09:31:03 +02:00
Adam J. Stewart
d1bf433d19
gitignore: pytest cache directory (#15476) 2020-03-13 09:39:34 +01:00
Tim Haines
65b131f373
Ignore Eclipse files and folders (#15413) 2020-03-10 09:58:40 +01:00
Gregory Becker
754ef8796e Ignore git *.orig files and emacs backup files 2019-09-18 23:51:27 -07:00
Peter Josef Scheibel
31cb2041c3 env: add spack env command, along with env.yaml schema and tests
Co-authored-by: Elizabeth Fischer <rpf2116@columbia.edu>
2018-11-09 00:31:24 -08:00
Todd Gamblin
fe0fe1caa1 tests: add lib/spack/spack/test/.cache to gitignore for pytest
- this shoudl have been moved when we moved pytest.ini to lib/spack/spack/test
2018-07-12 19:59:53 +02:00
Scott Wittenburg
6628b6ca01 Ignore log files that appear in root dir with "spack -d install ..." (#6670) 2017-12-13 08:35:39 +01:00
Adam J. Stewart
2a03585de6 gitignore everything in /etc/spack except /etc/spack/defaults (#4459)
* gitignore everything in /etc/spack except /etc/spack/defaults

* Don't ignore subsubdirectories of /etc/spack/defaults
2017-08-05 13:18:19 -05:00
Massimiliano Culpo
7ea10e768e unit tests: replace nose with pytest (#2502)
* Porting: substitute nose with ytest

This huge commit substitutes nose with pytest as a testing system. Things done here:

* deleted external/nose as it is no longer used
* moved mock resources in their own directory 'test/mock/'
* ported two tests (cmd/find, build_system) to pytest native syntax as an example
* build_environment, log: used monkeypatch instead of try/catch
* moved global mocking of fetch_cache to an auto-used fixture
* moved global mocking from test/__init__.py to conftest.py
* made `spack test` a wrapper around pytest
* run-unit-tests: avoid running python 2.6 tests under coverage to speed them up
* use `pytest --cov` instead of coverage run to cut down testing time

* mock/packages_test: moved mock yaml configuration to files instead of leaving it in the code as string literals

* concretize.py: ported tests to native pytest, reverted multiprocessing in pytest.ini as it was creating the wrong report for coveralls

* conftest.py, fixtures: added docstrings

* concretize_preferences.py: uses fixtures instead of subclassing MockPackagesTest

* directory_layout.py: uses fixtures instead of subclassing MockPackagesTest

* install.py: uses fixtures instead of subclassing MockPackagesTest

* optional_deps.py: uses fixtures instead of subclassing MockPackagesTest

optional_deps.py: uses fixtures instead of subclassing MockPackagesTest

* packages.py: uses fixtures instead of subclassing MockPackagesTest

* provider_index.py: uses fixtures instead of subclassing MockPackagesTest

* spec_yaml.py: uses fixtures instead of subclassing MockPackagesTest

* multimethod.py: uses fixtures instead of subclassing MockPackagesTest

* install.py: now uses mock_archive_url

* git_fetch.py: uses fixtures instead of subclassing MockPackagesTest

* hg_fetch.py: uses fixtures instead of subclassing MockPackagesTest

* svn_fetch.py, mirror.py: uses fixtures instead of subclassing MockPackagesTest
repo.py: deleted

* test_compiler_cmd.py: uses fixtures instead of subclassing MockPackagesTest

* cmd/module.py, cmd/uninstall.py: uses fixtures instead of subclassing MockDatabase

* database.py: uses fixtures instead of subclassing MockDatabase, removed mock/database

* pytest: uncluttering fixture implementations

* database: changing the scope to 'module'

* config.py: uses fixtures instead of subclassing MockPackagesTest

* spec_dag.py, spec_semantics.py: uses fixtures instead of subclassing MockPackagesTest

* stage.py: uses fixtures instead of subclassing MockPackagesTest. Removed mock directory

* pytest: added docstrings to all the fixtures

* pytest: final cleanup

* build_system_guess.py: fixed naming and docstrings as suggested by @scheibelp

* spec_syntax.py: added expected failure on parsing multiple specs closes #1976

* Add pytest and pytest-cov to Spack externals.

* Make `spack flake8` ignore externals.

* run-unit-tests runs spack test and not pytest.

* Remove all the special stuff for `spack test`

- Remove `conftest.py` magic and all the special case stuff in `bin/spack`

- Spack commands can optionally take unknown arguments, if they want to
  handle them.

- `spack test` is now a command like the others.

- `spack test` now just delegates its arguments to `pytest`, but it does
  it by receiving unknown arguments and NOT taking an explicit
  help argument.

* Fix error in fixtures.

* Improve `spack test` command a bit.

- Now supports an approximation of the old simple interface
- Also supports full pytest options if you want them.

* Use external coverage instead of pytest-cov

* Make coverage use parallel-mode.

* change __init__.py docs to include pytest
2016-12-29 07:48:48 -08:00
gmatteo
949766d92e Abinit: Added package(s) (#1995)
* First version of Abinit package

* Ignore *.swp files

* Add libxc, etsf_io packages

* AtomPaw package

* Make Abinit depend on mpi@2: and external version of libxc, netcdf, hdf5, etsf_io

* etsf_io: install Fortran modules in prefix.include

* Remove etsf_io from abinit requirements

* Add libxc2.2.1 (required by Abinit and atompaw)

* Cleanup

* Run make check

* Cleanup

* Use ld_flags instead of hard-coded libs, fix pep8, add copyright

* Put scalapack before lapackblas
2016-10-11 15:22:46 -07:00
Elizabeth Fischer
015e29efe1 Documentation Improvements for SC16 (#1676)
* Transferred pending changes from efischer/develop

* 1. Rewrite of "Getting Started": everything you need to set up Spack, even on old/ornery systems.  This is not a reference manual section; items covered here are covered more systematically elsewhere in the manual.  Some sections were moved here from elsewhere.

2. Beginning to write three methods of application developer support.  Two methods were moved from elsewhere.

* Edits...

* Moved sections in preparation for additional text to be added from old efischer/docs branch.

* Moved 2 more sections.

* Avoid accid

* Applied proofreading edits from @adamjstewart

* Fixed non-standard section characters.

* Moved section on profiling to the developer's guide.

* Still working on Spack workflows...

* Finished draft of packaging_guide.rst

* Renamed sample projects.

* Updates to docstrings

* Added documentation to resolve #638 (content taken from #846)

* Added section on resolving inconsistent run dependencies.  Addresses #645

* Showed how to build Python extensions only compatible with certain versions of Python.

* Added examples of getting the right behavior from depends_on().  See #1035

* Added section on Intel compilers and their GCC masquerading feature.  Addresses #638, #1687.

* Fixed formatting

* Added fixes to filesystem views.  Added a caveats section to ``spack setup``.

* Updated section on Intel compiler configuration because compiler flags currently do not work (see #1687)

* Defined trusted downloads, and updated text based on them. (See #1696)

* Added workflow to deal with buggy upstream software.  See #1683

* Added proper separation between Spack Docs vs. Reference Manual

* Renamed spack_workflows to workflows.  Resolves a conflict with the .gitignore file.

* Removed repeated section.

* Created new "Vendor Specific Compiler Configuration" section and organized existing Intel section into it.  Added new PGI and NAG sections; but they need to be expanded  / rewritten based on the existing text plus research through Spack issues on GitHub.

* Fixed text on `spack load --dependencies` to conform to reality.  See #1662

* Added patching as option for upstream bugfixes.

* Added section on using licensed compilers.

* Added section on non-downloadable tarballs.

* Wrote sections on NAG and PGI.  Arranged compilers in alphabetical order.

* Fix indent.

* Fixed typos.

* Clarified dependency types.

* Applied edits from Adam J. Stewart.  Spellchecked workflows and getting_started.

* Removed spurious header

* Fixed Sphinx errors

* Fixed erroneous symbol in docstring.

* Fix many typos and formatting problems.

* Spacing changes

* Added section on fixing Git problems.  See #1779

* Fixed signature of install() method.

* Addressed system packages in greater detail.  See #1794 #1795

* Fixed typos

* Fixed quotes

* Duplicate section on Spack profiling removed from configuration.rst.  It had earlier been moved to developer_guide.rst, where it fits better.

* Minor edits

- Tweak supported platform language.
- Various small changes to the new getting started guide.

* Fixed bug with quotes.
2016-10-05 13:00:27 -07:00
Todd Gamblin
05d52752ff Make graph_ascii support deptypes.
- fix deptype support
- by default, graph command omits build depedencies
- update docs to use deptype args
2016-09-27 23:49:41 -04:00
Massimiliano Culpo
ea446c0f0e lmod : added support for the creation of hierarchical lua module files (#1723)
Includes :
- treatment of a generic hierarchy (i.e. lapack + mpi + compiler)
- possibility to specify which compilers are to be considered Core
- correct treatment of the 'family' directive
- unit tests for most new features
2016-09-20 02:26:25 -07:00
Todd Gamblin
faa0a0e4c3 Add a ProviderIndex cache.
- Spack will check if the index needs updating, and will only parse
  all package files if it does.

- Spack tries to parse as few package files as necessary.
2016-08-08 21:04:23 -07:00
Adam J. Stewart
83330d2b59 Re-ignore licenses directory 2016-07-20 08:50:32 -05:00
Todd Gamblin
26480f14f9 Add "default" configuration scope.
- Default scope is versioned with spack and can be overridden by site
  or user config.

- Default scope provides sensible default concretization preferences
  for all of Spack.

- per-platform concretization scope can be added later (to force a
  particular MPI on, e.g., Cray systems)
2016-07-19 17:10:17 -07:00
Ben Boeckel
2b4d2b8748 gitignore: don't require opt to be a directory
I use a symlink to make it easy to swap out.
2016-07-18 11:39:26 -04:00
Todd Gamblin
c996632113 Add spack purge --cache to purge local archive cache. 2016-06-29 01:41:55 -07:00
alalazo
f3d62f1d3b code checking : added pep8 and coveralls 2016-01-19 18:29:39 +01:00
Todd Gamblin
34401cf0c3 Rework Spack config: keep user & site config in memory.
- User and site config are now kept separately in memory.
- Merging is done on demand when client code requests the configuration.
- Allows user/site config to be updated independently of each other by commands.
- simplifies config logic (no more tracking merged files)
2015-12-25 14:00:33 -08:00
Matthew LeGendre
46b91ddf57 YAML config files for compilers and mirrors 2015-05-18 16:01:21 -07:00
Todd Gamblin
22bec329c1 Bugfixes, more consolidation of modules code.
- specific module classes use __metaclass__ to register themselves.
- bugfixes in module writing.
2014-08-16 22:22:53 -07:00
Todd Gamblin
295ffd8c50 Adding dotkit support to TAU.
- New spack.hooks package
  - contains modules with pre and post install hooks

- New dotkit hook module
  - generates/removes dotkits on install/uninstall

- New spack use, spack unuse commands
  - use same syntax as install/uninstall

- New setup-env.bash script
  - Sets up path, dotkit support

- new spack dotkit command
  - used by script to parse specs, generate
    specs of installed pckages for dotkit file names
2014-07-08 01:58:20 -07:00
Todd Gamblin
c8414a8a40 Add support for configuration files. Fix SPACK-24. 2014-06-22 12:50:13 -07:00
Todd Gamblin
3bbca9bd05 Better version wildcard handling, better spidering
- Allow version wildcards to match [_-.] instead of the exact separators
  the version was constructed with.
  - Handles the fact that boost versions are written both 1.55.0 and 1_55_0.

- Update spidering to handle parse errors and warn that Python < 2.7.3 has
  less robust HTML parsing abilities.
2014-04-25 14:41:37 -07:00
Todd Gamblin
0cd5866eea Some fixes recommended by PyCharm 2013-12-25 15:40:32 -08:00
Todd Gamblin
7575f99bea Documentation skeleton 2013-12-09 20:17:08 -08:00
Todd Gamblin
cc76c0f5f9 Initial version of spack with one package: cmake 2013-02-13 17:50:44 -08:00