spack/var/spack/repos/builtin/packages/texinfo/package.py
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

51 lines
2.0 KiB
Python

# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import re
from spack import *
class Texinfo(AutotoolsPackage, GNUMirrorPackage):
"""Texinfo is the official documentation format of the GNU project.
It was invented by Richard Stallman and Bob Chassell many years ago,
loosely based on Brian Reid's Scribe and other formatting languages
of the time. It is used by many non-GNU projects as well."""
homepage = "https://www.gnu.org/software/texinfo/"
gnu_mirror_path = "texinfo/texinfo-6.0.tar.gz"
executables = ['^info$']
version('6.5', sha256='d34272e4042c46186ddcd66bd5d980c0ca14ff734444686ccf8131f6ec8b1427')
version('6.3', sha256='300a6ba4958c2dd4a6d5ce60f0a335daf7e379f5374f276f6ba31a221f02f606')
version('6.0', sha256='83d3183290f34e7f958d209d0b20022c6fe9e921eb6fe94c27d988827d4878d2')
version('5.2', sha256='6b8ca30e9b6f093b54fe04439e5545e564c63698a806a48065c0bba16994cf74')
version('5.1', sha256='50e8067f9758bb2bf175b69600082ac4a27c464cb4bcd48a578edd3127216600')
version('5.0', sha256='2c579345a39a2a0bb4b8c28533f0b61356504a202da6a25d17d4d866af7f5803')
depends_on('perl')
# Fix unescaped braces in regexps.
# Ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898994
patch('fix_unescaped_braces.patch', when='@6.3:')
patch('fix_unescaped_braces_2.patch', when='@5.1:6.0')
patch('fix_unescaped_braces_3.patch', when='@5.0')
# Apply this fix to perform thread-safe processing in code
# that uses the global locale.
# Ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=902771
patch('update_locale_handling.patch', when='@6.3:')
patch('nvhpc.patch', when='%nvhpc')
@classmethod
def determine_version(cls, exe):
output = Executable(exe)('--version', output=str, error=str)
match = re.search(r'info \(GNU texinfo\)\s+(\S+)', output)
return match.group(1) if match else None