Commit Graph

38 Commits

Author SHA1 Message Date
Tom Scogland
18c2f1a57a
refactor: packages import spack.package explicitly (#30404)
Explicitly import package utilities in all packages, and corresponding fallout.

This includes:

* rename `spack.package` to `spack.package_base`
* rename `spack.pkgkit` to `spack.package`
* update all packages in builtin, builtin_mock and tutorials to include `from spack.package import *`
* update spack style
  * ensure packages include the import
  * automatically add the new import and remove any/all imports of `spack` and `spack.pkgkit`
    from packages when using `--fix`
  * add support for type-checking packages with mypy when SPACK_MYPY_CHECK_PACKAGES
    is set in the environment
* fix all type checking errors in packages in spack upstream
* update spack create to include the new imports
* update spack repo to inject the new import, injection persists to allow for a deprecation period

Original message below:
 
As requested @adamjstewart, update all packages to use pkgkit.  I ended up using isort to do this,
so repro is easy:

```console
$ isort -a 'from spack.pkgkit import *' --rm 'spack' ./var/spack/repos/builtin/packages/*/package.py
$ spack style --fix
```

There were several line spacing fixups caused either by space manipulation in isort or by packages
that haven't been touched since we added requirements, but there are no functional changes in here.

* [x] add config to isort to make sure this is maintained going forward
2022-05-28 12:55:44 -04:00
Adam J. Stewart
5df10c04cd
Use stable URLs and ?full_index=1 for all github patches (#29239)
The number of commit characters in patch files fetched from GitHub can change,
so we should use `full_index=1` to enforce full commit hashes (and a stable
patch `sha256`).

Similarly, URLs for branches like `master` don't give us stable patch files,
because branches are moving targets. Use specific tags or commits for those.

- [x] update all github patch URLs to use `full_index=1`
- [x] don't use `master` or other branches for patches
- [x] add an audit check and a test for `?full_index=1`

Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2022-03-23 08:50:00 +01:00
Todd Gamblin
93377942d1 Update copyright year to 2022 2022-01-14 22:50:21 -08:00
Todd Gamblin
24c01d57cf
imports: sort imports everywhere in Spack (#24695)
* fix remaining flake8 errors

* imports: sort imports everywhere in Spack

We enabled import order checking in #23947, but fixing things manually drives
people crazy. This used `spack style --fix --all` from #24071 to automatically
sort everything in Spack so PR submitters won't have to deal with it.

This should go in after #24071, as it assumes we're using `isort`, not
`flake8-import-order` to order things. `isort` seems to be more flexible and
allows `llnl` mports to be in their own group before `spack` ones, so this
seems like a good switch.
2021-07-08 22:12:30 +00:00
Harmen Stoppels
fe46a1ce5f
Fixes to flex (#23408)
* Fixes to flex

- Prefer the version that doesn't need all the patches and extra build
tools
- Make dependency on gettext optional under the nls variant (off by
default)
- Drop the dependency on help2man if we don't have to regenerate the man
pages (when no patches are necessary)

* Bring back gettext dep as it is used during autoconf
2021-05-11 21:27:49 +02:00
Massimiliano Culpo
694d633a2c
spack external find: allow to search by tags (#21407)
This commit adds an option to the `external find`
command that allows it to search by tags. In this
way group of executables with common purposes can
be grouped under a single name and a simple command
can be used to detect all of them.

As an example introduce the 'build-tools' tag to
search for common development tools on a system
2021-02-04 13:17:32 +01:00
Todd Gamblin
a8ccb8e116 copyrights: update all files with license headers for 2021
- [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
2021-01-02 12:12:00 -08:00
Robert Blake
eb8ff0bc81
Adding externals for bison and flex (#18358)
* Adding externals for bison and flex

Added because bison actually pulls in a ton of stuff.

* Need to escape parentheses.

* Need to add re package.

* Adding re package.
2020-08-28 16:22:28 -05:00
Axel Huebl
2f7e940872
Fix: Flex Reconfigure (#16194)
* Fix: Flex Reconfigure

Learn the `flex` package how to reconfigure itself when needed.
Fix #11551

Co-authored-by: Andrew W Elble <aweits@rit.edu>

* Autoreconf: only when actually desired

Co-authored-by: Andrew W Elble <aweits@rit.edu>
2020-04-21 22:36:02 -05:00
Todd Gamblin
4af6303086
copyright: update copyright dates for 2020 (#14328) 2019-12-30 22:36:56 -08:00
sknigh
1ae824737e Add missing dependencies to flex. (#13692) 2019-11-12 12:01:15 -06:00
Todd Gamblin
62927654dd checksums: use sha256 checksums everywhere
We'd like to use a consistent checksum scheme everywhere so that we can:

    a) incorporate archive checksums into our specs and have a
       consistent hashing algorithm across all specs.

    b) index mirrors with a consistent type of checksum, and not one that
       is dependent on how spack packages are written.

- [x] convert existing md5, sha224, sha512, sha1 checksums to sha256
2019-10-12 07:19:43 -07:00
Michael Kuhn
9425075a23 flex: Apply 2.6.4 patch regardless of gcc version (#10841)
It seems that this is actually a glibc problem and while 2.6.4 builds
without the patch on newer versions of gcc (@8:), it still sometimes
segfaults (as observed during the doxygen build).
2019-03-11 15:12:28 -05:00
Michael Kuhn
3fb75e1206 flex package: patch for building 2.6.4 with gcc 7 (#10754)
Remove 2.6.3 as preferred version (but keep it available for
building). The latest version (currently 2.6.4) is now preferred
(according to Spack's defaults).
2019-03-07 13:15:47 -06:00
Todd Gamblin
6f50cd52ed copyright: update license headers for 2013-2019 copyright. 2019-01-01 00:44:28 -08:00
Todd Gamblin
eea786f4e8 relicense: replace LGPL headers with Apache-2.0/MIT SPDX headers
- 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-10-17 14:42:06 -07:00
Denis Davydov
d579231967 flex: use 2.6.3. by default (#8154)
Fixes #8152

Flex 2.6.4 doesn't build with gcc@7:. This sets Flex 2.6.3 as the
preferred version. The flex package had a conflict directive for
this but originally the recorded conflict was specific to ubuntu;
this appears to be an issue on multiple operating systems so this
also updates the conflict to be more general and adds a comment
which links to the relevant issues.
2018-05-17 13:58:29 -07:00
Todd Gamblin
54f97d1dec
Update copyright on LLNL files for 2018. (#7592) 2018-03-24 12:13:52 -07:00
Michael Kuhn
9f0e17a538 flex: restrict GCC conflict to newer Ubuntu releases (#6963)
flex 2.6.4 compiles fine with GCC 7 on (at least) Ubuntu 16.04 and Fedora 27.
2018-01-20 21:36:45 +01:00
stefanosoffia
2ed914aa1b Flex v2.6.4 conflicts with gcc@7.2.0 (#6819) 2018-01-03 09:46:57 -06:00
Todd Gamblin
05fa302655
Replace github.com/llnl/spack with github.com/spack/spack (#6142)
We moved to a new GitHub org! Now make the code and docs reflect that.
2017-11-04 17:08:04 -07:00
Michael Kuhn
84ae7872d3 Update copyright notices for 2017 (#5295) 2017-09-06 17:44:16 -10:00
Mark Olesen
767cdf98d3 Cleanup some depends_on flex for scotch and things depending on scotch (#4600) (#4601)
- The buggy flex-2.6.2 was blacklisted in the corresponding flex
  package, but now also removed the md5sum to avoid suggesting that
  this version should be revived.
  The 2.6.3 has similar problems (at least for scotch), but 2.6.4
  seems to work.

- Rejig flex restriction for scotch to exclude 2.6.2-2.6.3 only. Since
  flex-2.6.4 appears to be okay again, we can remove the flex version
  restriction that trickled through into the openfoam packages as a
  consequent of an spack spec bug.

- Make flex a build dependency for the openfoam packages
  (seems to have been an earlier oversight).
2017-06-26 09:58:02 -05:00
Todd Gamblin
cac4362f64 Make LICENSE recognizable by GitHub. (#4598) 2017-06-24 22:22:55 -07:00
Mark Olesen
b741809bb2 BUG: flex+lex fails with lib64/ installation (issue #4583) (#4584)
- new version 2.6.4 as well
2017-06-23 08:45:17 -05:00
Milton Woods
ca2755d532 flex: create variant +lex that creates symlinks for lex and libl.{a,so} (#3894)
* flex: create variant +lex that creates symlinks for lex and libl.{a,so}

* flex: enable variant +lex by default

* flex: use dso_suffix for portability; replace repetitive code with a loop
2017-05-21 08:33:34 -05:00
sknigh
24553c12bb Flex and Glib builds are dependent on m4 (#3022) 2017-02-03 17:19:23 -08:00
Massimiliano Culpo
81a5146b1d AutotoolsPackage: minor improvements (#2859)
* AutotoolsPackage: added configure_directory to permit build out of source. The configure script executable is now invoked with an absolute path. Modified a few packages accordingly.

* build_systems: functions returning directories are now properties

* build_systems: fixed issues with tcl and tk

* AutotoolsPackage: reworked recipe for autoreconf
2017-01-26 02:27:15 -08:00
Adam J. Stewart
268347ccbf Add latest version of flex (#2914) 2017-01-24 14:06:56 -07:00
Jean-Paul Pelteret
8816cdea9e Blacklist flex 2.6.2 by commenting out package version (#2571)
Fixes #2554
2016-12-14 14:34:55 -08:00
Adam J. Stewart
664939eeba Fix building latest version of flex (#2401)
* Fix building latest version of flex

* Don't need when clause

* Remove perl deps, shebang too long
2016-11-28 09:48:34 -08:00
Matthew Scott Krafczyk
1fbe67af3d Update flex package url's and versions (#2384)
* Update flex package url's and versions

The old sourceforge page for flex is now defunct. While version 2.6.0
still downloads fine, later versions are no longer hosted there.
Development continues on github. I've adjusted urls to point to this
new location.

In addition, from 2.6.0 onwards, a new naming scheme for releases seems
to have been adopted. I've created a url_for_version function to sort
this out.

* Change flex to an AutotoolsPackage

Also move the url_for_version function to the end of the package
definition.

* Implement the autoreconf function for flex
2016-11-22 14:30:25 -08:00
Erik Schnetter
71684cb071 Flex requires m4 2016-07-18 23:04:20 -04:00
Ben Boeckel
6fd45520da deptypes: mark deptypes in packages 2016-07-14 16:21:46 -04:00
Tom Scogland
62dd040a8f add GOPATH support
Also fixes flex to depend on bison for its yacc implementation.
2016-05-16 09:30:37 -07:00
Todd Gamblin
e7ced54369 Correct LLNL LGPL license template for clarity. 2016-05-11 21:22:25 -07:00
Erik Schnetter
27de2a42d9 Update Flex to 2.6.0 2016-05-04 20:27:58 -04:00
Todd Gamblin
89d5127900 New, cleaner package repository structure.
Package repositories now look like this:

    top-level-dir/
        repo.yaml
        packages/
            libelf/
                package.py
            mpich/
                package.py
            ...

This leaves room at the top level for additional metadata, source,
per-repo configs, indexes, etc., and it makes it easy to see that
something is a spack repo (just look for repo.yaml and packages).
2015-11-26 14:19:27 -08:00