flake8: fix flake8 issues with invalid escapes
- in many files, regular strings were used in places where raw strings should've been used. - convert these to raw strings and get rid of new flake8 errors
This commit is contained in:
parent
6f50cd52ed
commit
5425a3dad4
22 changed files with 161 additions and 148 deletions
|
@ -171,7 +171,7 @@ def __init__(self, root, **kwargs):
|
||||||
"${COMPILERNAME}-${COMPILERVER}/"
|
"${COMPILERNAME}-${COMPILERVER}/"
|
||||||
"${PACKAGE}-${VERSION}-${HASH}")
|
"${PACKAGE}-${VERSION}-${HASH}")
|
||||||
if self.hash_len is not None:
|
if self.hash_len is not None:
|
||||||
if re.search('\${HASH:\d+}', self.path_scheme):
|
if re.search(r'\${HASH:\d+}', self.path_scheme):
|
||||||
raise InvalidDirectoryLayoutParametersError(
|
raise InvalidDirectoryLayoutParametersError(
|
||||||
"Conflicting options for installation layout hash length")
|
"Conflicting options for installation layout hash length")
|
||||||
self.path_scheme = self.path_scheme.replace(
|
self.path_scheme = self.path_scheme.replace(
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
"""Functions for graphing DAGs of dependencies.
|
r"""Functions for graphing DAGs of dependencies.
|
||||||
|
|
||||||
This file contains code for graphing DAGs of software packages
|
This file contains code for graphing DAGs of software packages
|
||||||
(i.e. Spack specs). There are two main functions you probably care
|
(i.e. Spack specs). There are two main functions you probably care
|
||||||
|
|
|
@ -120,7 +120,7 @@ def macho_get_paths(path_name):
|
||||||
if match:
|
if match:
|
||||||
lhs = match.group(1).lstrip().rstrip()
|
lhs = match.group(1).lstrip().rstrip()
|
||||||
rhs = match.group(2)
|
rhs = match.group(2)
|
||||||
match2 = re.search('(.*) \(.*\)', rhs)
|
match2 = re.search(r'(.*) \(.*\)', rhs)
|
||||||
if match2:
|
if match2:
|
||||||
rhs = match2.group(1)
|
rhs = match2.group(1)
|
||||||
if lhs == 'cmd':
|
if lhs == 'cmd':
|
||||||
|
|
|
@ -61,8 +61,8 @@ def test_verify(tmpdir):
|
||||||
assert str(old_lgpl_header) in out
|
assert str(old_lgpl_header) in out
|
||||||
assert str(correct_header) not in out
|
assert str(correct_header) not in out
|
||||||
assert '3 improperly licensed files' in out
|
assert '3 improperly licensed files' in out
|
||||||
assert re.search('files with no SPDX-License-Identifier:\s*1', out)
|
assert re.search(r'files with no SPDX-License-Identifier:\s*1', out)
|
||||||
assert re.search('files with wrong SPDX-License-Identifier:\s*1', out)
|
assert re.search(r'files with wrong SPDX-License-Identifier:\s*1', out)
|
||||||
assert re.search('files with old license header:\s*1', out)
|
assert re.search(r'files with old license header:\s*1', out)
|
||||||
|
|
||||||
assert license.returncode == 1
|
assert license.returncode == 1
|
||||||
|
|
|
@ -15,10 +15,10 @@ class Base:
|
||||||
counter = 0
|
counter = 0
|
||||||
|
|
||||||
def add(self):
|
def add(self):
|
||||||
raise NotImplemented('add not implemented')
|
raise NotImplementedError('add not implemented')
|
||||||
|
|
||||||
def subtract(self):
|
def subtract(self):
|
||||||
raise NotImplemented('subtract not implemented')
|
raise NotImplementedError('subtract not implemented')
|
||||||
|
|
||||||
return Base
|
return Base
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
# "path" seemed like the most generic term.
|
# "path" seemed like the most generic term.
|
||||||
#
|
#
|
||||||
def find_list_url(url):
|
def find_list_url(url):
|
||||||
"""Finds a good list URL for the supplied URL.
|
r"""Finds a good list URL for the supplied URL.
|
||||||
|
|
||||||
By default, returns the dirname of the archive path.
|
By default, returns the dirname of the archive path.
|
||||||
|
|
||||||
|
@ -148,81 +148,81 @@ def strip_version_suffixes(path):
|
||||||
|
|
||||||
suffix_regexes = [
|
suffix_regexes = [
|
||||||
# Download type
|
# Download type
|
||||||
'[Ii]nstall',
|
r'[Ii]nstall',
|
||||||
'all',
|
r'all',
|
||||||
'code',
|
r'code',
|
||||||
'src(_0)?',
|
r'src(_0)?',
|
||||||
'[Ss]ources?',
|
r'[Ss]ources?',
|
||||||
'file',
|
r'file',
|
||||||
'full',
|
r'full',
|
||||||
'single',
|
r'single',
|
||||||
'public',
|
r'public',
|
||||||
'with[a-zA-Z_-]+',
|
r'with[a-zA-Z_-]+',
|
||||||
'bin',
|
r'bin',
|
||||||
'binary',
|
r'binary',
|
||||||
'run',
|
r'run',
|
||||||
'[Uu]niversal',
|
r'[Uu]niversal',
|
||||||
'jar',
|
r'jar',
|
||||||
'complete',
|
r'complete',
|
||||||
'dynamic',
|
r'dynamic',
|
||||||
'oss',
|
r'oss',
|
||||||
'gem',
|
r'gem',
|
||||||
'tar',
|
r'tar',
|
||||||
'sh',
|
r'sh',
|
||||||
|
|
||||||
# Download version
|
# Download version
|
||||||
'release',
|
r'release',
|
||||||
'stable',
|
r'stable',
|
||||||
'[Ff]inal',
|
r'[Ff]inal',
|
||||||
'rel',
|
r'rel',
|
||||||
'orig',
|
r'orig',
|
||||||
'dist',
|
r'dist',
|
||||||
'\+',
|
r'\+',
|
||||||
|
|
||||||
# License
|
# License
|
||||||
'gpl',
|
r'gpl',
|
||||||
|
|
||||||
# Arch
|
# Arch
|
||||||
# Needs to come before and after OS, appears in both orders
|
# Needs to come before and after OS, appears in both orders
|
||||||
'ia32',
|
r'ia32',
|
||||||
'intel',
|
r'intel',
|
||||||
'amd64',
|
r'amd64',
|
||||||
'x64',
|
r'x64',
|
||||||
'x86[_-]64',
|
r'x86[_-]64',
|
||||||
'x86',
|
r'x86',
|
||||||
'i[36]86',
|
r'i[36]86',
|
||||||
'ppc64(le)?',
|
r'ppc64(le)?',
|
||||||
'armv?(7l|6l|64)',
|
r'armv?(7l|6l|64)',
|
||||||
|
|
||||||
# OS
|
# OS
|
||||||
'[Ll]inux(_64)?',
|
r'[Ll]inux(_64)?',
|
||||||
'[Uu]ni?x',
|
r'[Uu]ni?x',
|
||||||
'[Ss]un[Oo][Ss]',
|
r'[Ss]un[Oo][Ss]',
|
||||||
'[Mm]ac[Oo][Ss][Xx]?',
|
r'[Mm]ac[Oo][Ss][Xx]?',
|
||||||
'[Oo][Ss][Xx]',
|
r'[Oo][Ss][Xx]',
|
||||||
'[Dd]arwin(64)?',
|
r'[Dd]arwin(64)?',
|
||||||
'[Aa]pple',
|
r'[Aa]pple',
|
||||||
'[Ww]indows',
|
r'[Ww]indows',
|
||||||
'[Ww]in(64|32)?',
|
r'[Ww]in(64|32)?',
|
||||||
'[Cc]ygwin(64|32)?',
|
r'[Cc]ygwin(64|32)?',
|
||||||
'[Mm]ingw',
|
r'[Mm]ingw',
|
||||||
|
|
||||||
# Arch
|
# Arch
|
||||||
# Needs to come before and after OS, appears in both orders
|
# Needs to come before and after OS, appears in both orders
|
||||||
'ia32',
|
r'ia32',
|
||||||
'intel',
|
r'intel',
|
||||||
'amd64',
|
r'amd64',
|
||||||
'x64',
|
r'x64',
|
||||||
'x86[_-]64',
|
r'x86[_-]64',
|
||||||
'x86',
|
r'x86',
|
||||||
'i[36]86',
|
r'i[36]86',
|
||||||
'ppc64(le)?',
|
r'ppc64(le)?',
|
||||||
'armv?(7l|6l|64)?',
|
r'armv?(7l|6l|64)?',
|
||||||
|
|
||||||
# PyPI
|
# PyPI
|
||||||
'[._-]py[23].*\.whl',
|
r'[._-]py[23].*\.whl',
|
||||||
'[._-]cp[23].*\.whl',
|
r'[._-]cp[23].*\.whl',
|
||||||
'[._-]win.*\.exe',
|
r'[._-]win.*\.exe',
|
||||||
]
|
]
|
||||||
|
|
||||||
for regex in suffix_regexes:
|
for regex in suffix_regexes:
|
||||||
|
@ -274,22 +274,22 @@ def strip_name_suffixes(path, version):
|
||||||
str(version) + '.*',
|
str(version) + '.*',
|
||||||
|
|
||||||
# Download type
|
# Download type
|
||||||
'install',
|
r'install',
|
||||||
'src',
|
r'src',
|
||||||
'(open)?[Ss]ources?',
|
r'(open)?[Ss]ources?',
|
||||||
'[._-]archive',
|
r'[._-]archive',
|
||||||
'[._-]std',
|
r'[._-]std',
|
||||||
|
|
||||||
# Download version
|
# Download version
|
||||||
'release',
|
r'release',
|
||||||
'snapshot',
|
r'snapshot',
|
||||||
'distrib',
|
r'distrib',
|
||||||
|
|
||||||
# VCS
|
# VCS
|
||||||
'0\+bzr',
|
r'0\+bzr',
|
||||||
|
|
||||||
# License
|
# License
|
||||||
'gpl',
|
r'gpl',
|
||||||
]
|
]
|
||||||
|
|
||||||
for regex in suffix_regexes:
|
for regex in suffix_regexes:
|
||||||
|
@ -799,7 +799,7 @@ def wildcard_version(path):
|
||||||
|
|
||||||
# Replace each version with a generic capture group to find versions
|
# Replace each version with a generic capture group to find versions
|
||||||
# and escape everything else so it's not interpreted as a regex
|
# and escape everything else so it's not interpreted as a regex
|
||||||
result = '(\d.*)'.join(re.escape(vp) for vp in vparts)
|
result = r'(\d.*)'.join(re.escape(vp) for vp in vparts)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ def edit(self, spec, prefix):
|
||||||
|
|
||||||
# Set fortran name mangling in Make.defs
|
# Set fortran name mangling in Make.defs
|
||||||
defs_file = FileFilter('./lib/mk/Make.defs')
|
defs_file = FileFilter('./lib/mk/Make.defs')
|
||||||
defs_file.filter('^\s*#\s*cppcallsfort\s*=\s*',
|
defs_file.filter(r'^\s*#\s*cppcallsfort\s*=\s*',
|
||||||
'cppcallsfort = -DCH_FORT_UNDERSCORE')
|
'cppcallsfort = -DCH_FORT_UNDERSCORE')
|
||||||
|
|
||||||
# Set remaining variables in Make.defs.local
|
# Set remaining variables in Make.defs.local
|
||||||
|
@ -57,53 +57,53 @@ def edit(self, spec, prefix):
|
||||||
defs_file = FileFilter('./lib/mk/Make.defs.local')
|
defs_file = FileFilter('./lib/mk/Make.defs.local')
|
||||||
|
|
||||||
# Unconditional settings
|
# Unconditional settings
|
||||||
defs_file.filter('^\s*#\s*DEBUG\s*=\s*', 'DEBUG = FALSE')
|
defs_file.filter(r'^\s*#\s*DEBUG\s*=\s*', 'DEBUG = FALSE')
|
||||||
defs_file.filter('^\s*#\s*OPT\s*=\s*', 'OPT = TRUE')
|
defs_file.filter(r'^\s*#\s*OPT\s*=\s*', 'OPT = TRUE')
|
||||||
defs_file.filter('^\s*#\s*PIC\s*=\s*', 'PIC = TRUE')
|
defs_file.filter(r'^\s*#\s*PIC\s*=\s*', 'PIC = TRUE')
|
||||||
# timer code frequently fails compiles. So disable it.
|
# timer code frequently fails compiles. So disable it.
|
||||||
defs_file.filter('^\s*#\s*USE_TIMER\s*=\s*', 'USE_TIMER = FALSE')
|
defs_file.filter(r'^\s*#\s*USE_TIMER\s*=\s*', 'USE_TIMER = FALSE')
|
||||||
|
|
||||||
# LAPACK setup
|
# LAPACK setup
|
||||||
lapack_blas = spec['lapack'].libs + spec['blas'].libs
|
lapack_blas = spec['lapack'].libs + spec['blas'].libs
|
||||||
defs_file.filter('^\s*#\s*USE_LAPACK\s*=\s*', 'USE_LAPACK = TRUE')
|
defs_file.filter(r'^\s*#\s*USE_LAPACK\s*=\s*', 'USE_LAPACK = TRUE')
|
||||||
defs_file.filter(
|
defs_file.filter(
|
||||||
'^\s*#\s*lapackincflags\s*=\s*',
|
r'^\s*#\s*lapackincflags\s*=\s*',
|
||||||
'lapackincflags = -I%s' % spec['lapack'].prefix.include)
|
'lapackincflags = -I%s' % spec['lapack'].prefix.include)
|
||||||
defs_file.filter(
|
defs_file.filter(
|
||||||
'^\s*#\s*syslibflags\s*=\s*',
|
r'^\s*#\s*syslibflags\s*=\s*',
|
||||||
'syslibflags = %s' % lapack_blas.ld_flags)
|
'syslibflags = %s' % lapack_blas.ld_flags)
|
||||||
|
|
||||||
# Compilers and Compiler flags
|
# Compilers and Compiler flags
|
||||||
defs_file.filter('^\s*#\s*CXX\s*=\s*', 'CXX = %s' % spack_cxx)
|
defs_file.filter(r'^\s*#\s*CXX\s*=\s*', 'CXX = %s' % spack_cxx)
|
||||||
defs_file.filter('^\s*#\s*FC\s*=\s*', 'FC = %s' % spack_fc)
|
defs_file.filter(r'^\s*#\s*FC\s*=\s*', 'FC = %s' % spack_fc)
|
||||||
if '+mpi' in spec:
|
if '+mpi' in spec:
|
||||||
defs_file.filter(
|
defs_file.filter(
|
||||||
'^\s*#\s*MPICXX\s*=\s*',
|
r'^\s*#\s*MPICXX\s*=\s*',
|
||||||
'MPICXX = %s' % self.spec['mpi'].mpicxx)
|
'MPICXX = %s' % self.spec['mpi'].mpicxx)
|
||||||
|
|
||||||
# Conditionally determined settings
|
# Conditionally determined settings
|
||||||
defs_file.filter(
|
defs_file.filter(
|
||||||
'^\s*#\s*MPI\s*=\s*',
|
r'^\s*#\s*MPI\s*=\s*',
|
||||||
'MPI = %s' % ('TRUE' if '+mpi' in spec else 'FALSE'))
|
'MPI = %s' % ('TRUE' if '+mpi' in spec else 'FALSE'))
|
||||||
defs_file.filter(
|
defs_file.filter(
|
||||||
'^\s*#\s*DIM\s*=\s*',
|
r'^\s*#\s*DIM\s*=\s*',
|
||||||
'DIM = %s' % spec.variants['dims'].value)
|
'DIM = %s' % spec.variants['dims'].value)
|
||||||
|
|
||||||
# HDF5 settings
|
# HDF5 settings
|
||||||
if '+hdf5' in spec:
|
if '+hdf5' in spec:
|
||||||
defs_file.filter('^\s*#\s*USE_HDF5\s*=\s*', 'USE_HDF5 = TRUE')
|
defs_file.filter(r'^\s*#\s*USE_HDF5\s*=\s*', 'USE_HDF5 = TRUE')
|
||||||
defs_file.filter(
|
defs_file.filter(
|
||||||
'^\s*#\s*HDFINCFLAGS\s*=.*',
|
r'^\s*#\s*HDFINCFLAGS\s*=.*',
|
||||||
'HDFINCFLAGS = -I%s' % spec['hdf5'].prefix.include)
|
'HDFINCFLAGS = -I%s' % spec['hdf5'].prefix.include)
|
||||||
defs_file.filter(
|
defs_file.filter(
|
||||||
'^\s*#\s*HDFLIBFLAGS\s*=.*',
|
r'^\s*#\s*HDFLIBFLAGS\s*=.*',
|
||||||
'HDFLIBFLAGS = %s' % spec['hdf5'].libs.ld_flags)
|
'HDFLIBFLAGS = %s' % spec['hdf5'].libs.ld_flags)
|
||||||
if '+mpi' in spec:
|
if '+mpi' in spec:
|
||||||
defs_file.filter(
|
defs_file.filter(
|
||||||
'^\s*#\s*HDFMPIINCFLAGS\s*=.*',
|
r'^\s*#\s*HDFMPIINCFLAGS\s*=.*',
|
||||||
'HDFMPIINCFLAGS = -I%s' % spec['hdf5'].prefix.include)
|
'HDFMPIINCFLAGS = -I%s' % spec['hdf5'].prefix.include)
|
||||||
defs_file.filter(
|
defs_file.filter(
|
||||||
'^\s*#\s*HDFMPILIBFLAGS\s*=.*',
|
r'^\s*#\s*HDFMPILIBFLAGS\s*=.*',
|
||||||
'HDFMPILIBFLAGS = %s' % spec['hdf5'].libs.ld_flags)
|
'HDFMPILIBFLAGS = %s' % spec['hdf5'].libs.ld_flags)
|
||||||
|
|
||||||
def build(self, spec, prefix):
|
def build(self, spec, prefix):
|
||||||
|
|
|
@ -59,7 +59,7 @@ def add_rpath_to_conf(self):
|
||||||
|
|
||||||
config_file = join_path(self.prefix.etc, 'ldc2.conf')
|
config_file = join_path(self.prefix.etc, 'ldc2.conf')
|
||||||
|
|
||||||
search_for = 'switches = \['
|
search_for = r'switches = \['
|
||||||
substitute_with = 'switches = [\n' + \
|
substitute_with = 'switches = [\n' + \
|
||||||
' "-L-rpath={0}",'.format(self.prefix.lib)
|
' "-L-rpath={0}",'.format(self.prefix.lib)
|
||||||
|
|
||||||
|
|
|
@ -51,10 +51,11 @@ def install(self, spec, prefix):
|
||||||
install('ceed.h', prefix.include)
|
install('ceed.h', prefix.include)
|
||||||
mkdirp(prefix.lib)
|
mkdirp(prefix.lib)
|
||||||
install('libceed.%s' % dso_suffix, prefix.lib)
|
install('libceed.%s' % dso_suffix, prefix.lib)
|
||||||
filter_file('^prefix=.*$', 'prefix=%s' % prefix, 'ceed.pc')
|
filter_file(r'^prefix=.*$', 'prefix=%s' % prefix, 'ceed.pc')
|
||||||
filter_file('^includedir=\$\{prefix\}$',
|
filter_file(r'^includedir=\$\{prefix\}$',
|
||||||
'includedir=${prefix}/include', 'ceed.pc')
|
'includedir=${prefix}/include', 'ceed.pc')
|
||||||
filter_file('^libdir=\$\{prefix\}$', 'libdir=${prefix}/lib', 'ceed.pc')
|
filter_file(r'^libdir=\$\{prefix\}$',
|
||||||
filter_file('Version:.*$', 'Version: 0.1', 'ceed.pc')
|
'libdir=${prefix}/lib', 'ceed.pc')
|
||||||
|
filter_file(r'Version:.*$', 'Version: 0.1', 'ceed.pc')
|
||||||
mkdirp(prefix.lib.pkgconfig)
|
mkdirp(prefix.lib.pkgconfig)
|
||||||
install('ceed.pc', prefix.lib.pkgconfig)
|
install('ceed.pc', prefix.lib.pkgconfig)
|
||||||
|
|
|
@ -26,7 +26,7 @@ class Meraculous(CMakePackage):
|
||||||
|
|
||||||
def patch(self):
|
def patch(self):
|
||||||
edit = FileFilter('CMakeLists.txt')
|
edit = FileFilter('CMakeLists.txt')
|
||||||
edit.filter("-static-libstdc\+\+", "")
|
edit.filter(r"-static-libstdc\+\+", "")
|
||||||
|
|
||||||
def setup_environment(self, spack_env, run_env):
|
def setup_environment(self, spack_env, run_env):
|
||||||
run_env.set('MERACULOUS_ROOT', self.prefix)
|
run_env.set('MERACULOUS_ROOT', self.prefix)
|
||||||
|
|
|
@ -33,11 +33,11 @@ def edit(self, spec, prefix):
|
||||||
|
|
||||||
nc_include_flags = spec['ncurses'].headers.include_flags
|
nc_include_flags = spec['ncurses'].headers.include_flags
|
||||||
nc_ld_flags = spec['ncurses'].libs.ld_flags
|
nc_ld_flags = spec['ncurses'].libs.ld_flags
|
||||||
makefile.filter('CFLAGS\+=', 'CFLAGS+={0} '.format(nc_include_flags))
|
makefile.filter(r'CFLAGS\+=', 'CFLAGS+={0} '.format(nc_include_flags))
|
||||||
makefile.filter('LDFLAGS\+=', 'LDFLAGS+={0} '.format(nc_ld_flags))
|
makefile.filter(r'LDFLAGS\+=', 'LDFLAGS+={0} '.format(nc_ld_flags))
|
||||||
|
|
||||||
# Copy the conf file directly into place (don't worry about
|
# Copy the conf file directly into place (don't worry about
|
||||||
# overwriting an existing file...)
|
# overwriting an existing file...)
|
||||||
kwargs = {'ignore_absent': False, 'backup': False, 'string': True}
|
kwargs = {'ignore_absent': False, 'backup': False, 'string': True}
|
||||||
makefile.filter('cp multitail.conf $(CONFIG_FILE).new',
|
makefile.filter(r'cp multitail.conf $(CONFIG_FILE).new',
|
||||||
'cp multitail.conf $(CONFIG_FILE)', **kwargs)
|
'cp multitail.conf $(CONFIG_FILE)', **kwargs)
|
||||||
|
|
|
@ -233,8 +233,8 @@ def write_makefile_inc(self):
|
||||||
# When building libpord, read AR from Makefile.inc instead of
|
# When building libpord, read AR from Makefile.inc instead of
|
||||||
# going through the make command line - this prevents various
|
# going through the make command line - this prevents various
|
||||||
# problems with the substring "$$@".
|
# problems with the substring "$$@".
|
||||||
filter_file(' AR="\$\(AR\)"', '', 'Makefile')
|
filter_file(r' AR="\$\(AR\)"', '', 'Makefile')
|
||||||
filter_file('^(INCLUDES = -I../include)',
|
filter_file(r'^(INCLUDES = -I../include)',
|
||||||
'\\1\ninclude ../../Makefile.inc',
|
'\\1\ninclude ../../Makefile.inc',
|
||||||
join_path('PORD', 'lib', 'Makefile'))
|
join_path('PORD', 'lib', 'Makefile'))
|
||||||
|
|
||||||
|
|
|
@ -158,7 +158,7 @@ def install(self, spec, prefix):
|
||||||
|
|
||||||
if self.compiler.name in ['xl', 'xl_r']:
|
if self.compiler.name in ['xl', 'xl_r']:
|
||||||
# Use '-qextname' when compiling mxm.f
|
# Use '-qextname' when compiling mxm.f
|
||||||
filter_file('\$\(OLAGS\)', '-qextname $(OLAGS)',
|
filter_file(r'\$\(OLAGS\)', '-qextname $(OLAGS)',
|
||||||
join_path('postnek', 'makefile'))
|
join_path('postnek', 'makefile'))
|
||||||
# Define 'rename_' function that calls 'rename'
|
# Define 'rename_' function that calls 'rename'
|
||||||
with open(join_path('postnek', 'xdriver.c'), 'a') as xdriver:
|
with open(join_path('postnek', 'xdriver.c'), 'a') as xdriver:
|
||||||
|
|
|
@ -21,7 +21,7 @@ class PacbioDaligner(MakefilePackage):
|
||||||
def edit(self, spec, prefix):
|
def edit(self, spec, prefix):
|
||||||
mkdir(prefix.bin)
|
mkdir(prefix.bin)
|
||||||
makefile = FileFilter('Makefile')
|
makefile = FileFilter('Makefile')
|
||||||
makefile.filter('DEST_DIR\s*=\s*~/bin', 'DEST_DIR = ' + prefix.bin)
|
makefile.filter(r'DEST_DIR\s*=\s*~/bin', 'DEST_DIR = ' + prefix.bin)
|
||||||
gmf = FileFilter('GNUmakefile')
|
gmf = FileFilter('GNUmakefile')
|
||||||
gmf.filter('rsync\s*-av\s*\$\{ALL\}\s*\$\{PREFIX\}/bin',
|
gmf.filter(r'rsync\s*-av\s*\$\{ALL\}\s*\$\{PREFIX\}/bin',
|
||||||
'cp ${ALL} ' + prefix.bin)
|
'cp ${ALL} ' + prefix.bin)
|
||||||
|
|
|
@ -20,7 +20,7 @@ class PacbioDamasker(MakefilePackage):
|
||||||
def edit(self, spec, prefix):
|
def edit(self, spec, prefix):
|
||||||
mkdirp(prefix.bin)
|
mkdirp(prefix.bin)
|
||||||
makefile = FileFilter('Makefile')
|
makefile = FileFilter('Makefile')
|
||||||
makefile.filter('DEST_DIR\s*=\s*~/bin', 'DEST_DIR = ' + prefix.bin)
|
makefile.filter(r'DEST_DIR\s*=\s*~/bin', 'DEST_DIR = ' + prefix.bin)
|
||||||
gmf = FileFilter('GNUmakefile')
|
gmf = FileFilter('GNUmakefile')
|
||||||
gmf.filter('rsync\s*-av\s*\$\{ALL\}\s*\$\{PREFIX\}/bin',
|
gmf.filter(r'rsync\s*-av\s*\$\{ALL\}\s*\$\{PREFIX\}/bin',
|
||||||
'cp ${ALL} ' + prefix.bin)
|
'cp ${ALL} ' + prefix.bin)
|
||||||
|
|
|
@ -23,12 +23,12 @@ def edit(self, spec, prefix):
|
||||||
mkdirp(prefix.lib)
|
mkdirp(prefix.lib)
|
||||||
mkdirp(prefix.include)
|
mkdirp(prefix.include)
|
||||||
makefile = FileFilter('Makefile')
|
makefile = FileFilter('Makefile')
|
||||||
makefile.filter('DEST_DIR\s*=\s*~/bin', 'DEST_DIR = ' + prefix.bin)
|
makefile.filter(r'DEST_DIR\s*=\s*~/bin', 'DEST_DIR = ' + prefix.bin)
|
||||||
gmf = FileFilter('GNUmakefile')
|
gmf = FileFilter('GNUmakefile')
|
||||||
gmf.filter('rsync\s*-av\s*\$\{ALL\}\s*\$\{PREFIX\}/bin',
|
gmf.filter(r'rsync\s*-av\s*\$\{ALL\}\s*\$\{PREFIX\}/bin',
|
||||||
'cp ${ALL} ' + prefix.bin)
|
'cp ${ALL} ' + prefix.bin)
|
||||||
gmf.filter('rsync\s*-av\s*libdazzdb.*\s*\$\{PREFIX\}/lib',
|
gmf.filter(r'rsync\s*-av\s*libdazzdb.*\s*\$\{PREFIX\}/lib',
|
||||||
'cp libdazzdb.* ' + prefix.lib)
|
'cp libdazzdb.* ' + prefix.lib)
|
||||||
gmf.filter(('rsync\s*-av\s*\$\(wildcard\s*\$\{THISDIR\}/\*.h'
|
gmf.filter((r'rsync\s*-av\s*\$\(wildcard\s*\$\{THISDIR\}/\*.h'
|
||||||
'\)\s*\$\{PREFIX\}/include'),
|
r'\)\s*\$\{PREFIX\}/include'),
|
||||||
'cp *.h ' + prefix.include)
|
'cp *.h ' + prefix.include)
|
||||||
|
|
|
@ -21,10 +21,10 @@ class PacbioDextractor(MakefilePackage):
|
||||||
def edit(self, spec, prefix):
|
def edit(self, spec, prefix):
|
||||||
mkdirp(prefix.bin)
|
mkdirp(prefix.bin)
|
||||||
makefile = FileFilter('Makefile')
|
makefile = FileFilter('Makefile')
|
||||||
makefile.filter('PATH_HDF5\s*=\s*/sw/apps/hdf5/current',
|
makefile.filter(r'PATH_HDF5\s*=\s*/sw/apps/hdf5/current',
|
||||||
'PATH_HDF5 = ' + spec['hdf5'].prefix)
|
'PATH_HDF5 = ' + spec['hdf5'].prefix)
|
||||||
makefile.filter('PATH_HDF5\*s=\s*/usr/local/hdf5', '')
|
makefile.filter(r'PATH_HDF5\*s=\s*/usr/local/hdf5', '')
|
||||||
makefile.filter('DEST_DIR\s*=\s*~/bin', 'DEST_DIR = ' + prefix.bin)
|
makefile.filter(r'DEST_DIR\s*=\s*~/bin', 'DEST_DIR = ' + prefix.bin)
|
||||||
gmf = FileFilter('GNUmakefile')
|
gmf = FileFilter('GNUmakefile')
|
||||||
gmf.filter('rsync\s*-av\s*\$\{ALL\}\s*\$\{PREFIX\}/bin',
|
gmf.filter(r'rsync\s*-av\s*\$\{ALL\}\s*\$\{PREFIX\}/bin',
|
||||||
'cp ${ALL} ' + prefix.bin)
|
'cp ${ALL} ' + prefix.bin)
|
||||||
|
|
|
@ -42,7 +42,7 @@ def patch_config_h_for_intel(self):
|
||||||
#
|
#
|
||||||
if '%intel' in self.spec:
|
if '%intel' in self.spec:
|
||||||
filter_file(
|
filter_file(
|
||||||
'#define HAVE_GCC_VECTOR_EXTENSIONS /\*\*/',
|
r'#define HAVE_GCC_VECTOR_EXTENSIONS /\*\*/',
|
||||||
'/* #undef HAVE_GCC_VECTOR_EXTENSIONS */',
|
'/* #undef HAVE_GCC_VECTOR_EXTENSIONS */',
|
||||||
config_h
|
config_h
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,26 +7,38 @@
|
||||||
|
|
||||||
|
|
||||||
class RGtools(RPackage):
|
class RGtools(RPackage):
|
||||||
"""Functions to assist in R programming, including: - assist in developing,
|
"""Functions to assist in R programming.
|
||||||
updating, and maintaining R and R packages ('ask', 'checkRVersion',
|
|
||||||
'getDependencies', 'keywords', 'scat'), - calculate the logit and inverse
|
Including:
|
||||||
logit transformations ('logit', 'inv.logit'), - test if a value is missing,
|
- assist in developing, updating, and maintaining R and R packages
|
||||||
empty or contains only NA and NULL values ('invalid'), - manipulate R's
|
('ask', 'checkRVersion', 'getDependencies', 'keywords', 'scat')
|
||||||
.Last function ('addLast'), - define macros ('defmacro'), - detect odd and
|
- calculate the logit and inverse logit transformations
|
||||||
even integers ('odd', 'even'), - convert strings containing non-ASCII
|
('logit', 'inv.logit')
|
||||||
characters (like single quotes) to plain ASCII ('ASCIIfy'), - perform a
|
- test if a value is missing, empty or contains only NA and NULL values
|
||||||
binary search ('binsearch'), - sort strings containing both numeric and
|
('invalid')
|
||||||
character components ('mixedsort'), - create a factor variable from the
|
- manipulate R's .Last function ('addLast')
|
||||||
quantiles of a continuous variable ('quantcut'), - enumerate permutations
|
- define macros ('defmacro')
|
||||||
and combinations ('combinations', 'permutation'), - calculate and convert
|
- detect odd and even integers ('odd', 'even')
|
||||||
between fold-change and log-ratio ('foldchange', 'logratio2foldchange',
|
- convert strings containing non-ASCII characters (like single
|
||||||
'foldchange2logratio'), - calculate probabilities and generate random
|
quotes) to plain ASCII ('ASCIIfy')
|
||||||
numbers from Dirichlet distributions ('rdirichlet', 'ddirichlet'), - apply
|
- perform a binary search ('binsearch')
|
||||||
a function over adjacent subsets of a vector ('running'), - modify the
|
- sort strings containing both numeric and character components
|
||||||
TCP\_NODELAY ('de-Nagle') flag for socket objects, - efficient 'rbind' of
|
('mixedsort')
|
||||||
data frames, even if the column names don't match ('smartbind'), - generate
|
- create a factor variable from the quantiles of a continuous variable
|
||||||
significance stars from p-values ('stars.pval'), - convert characters
|
('quantcut')
|
||||||
to/from ASCII codes."""
|
- enumerate permutations and combinations ('combinations', 'permutation')
|
||||||
|
- calculate and convert between fold-change and log-ratio
|
||||||
|
('foldchange', 'logratio2foldchange', 'foldchange2logratio')
|
||||||
|
- calculate probabilities and generate random numbers from Dirichlet
|
||||||
|
distributions ('rdirichlet', 'ddirichlet')
|
||||||
|
- apply a function over adjacent subsets of a vector ('running')
|
||||||
|
- modify the TCP_NODELAY ('de-Nagle') flag for socket objects
|
||||||
|
- efficient 'rbind' of data frames, even if the column names don't
|
||||||
|
match ('smartbind')
|
||||||
|
- generate significance stars from p-values ('stars.pval')
|
||||||
|
- convert characters to/from ASCII codes.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
homepage = "https://cran.r-project.org/package=gtools"
|
homepage = "https://cran.r-project.org/package=gtools"
|
||||||
url = "https://cran.r-project.org/src/contrib/gtools_3.5.0.tar.gz"
|
url = "https://cran.r-project.org/src/contrib/gtools_3.5.0.tar.gz"
|
||||||
|
|
|
@ -54,6 +54,6 @@ def setup_environment(self, spack_env, run_env):
|
||||||
|
|
||||||
# Remove whitespaces, as they can compromise syntax in
|
# Remove whitespaces, as they can compromise syntax in
|
||||||
# module files
|
# module files
|
||||||
hadoop_classpath = re.sub('[\s+]', '', hadoop_classpath)
|
hadoop_classpath = re.sub(r'[\s+]', '', hadoop_classpath)
|
||||||
|
|
||||||
run_env.set('SPARK_DIST_CLASSPATH', hadoop_classpath)
|
run_env.set('SPARK_DIST_CLASSPATH', hadoop_classpath)
|
||||||
|
|
|
@ -14,7 +14,7 @@ class Yorick(Package):
|
||||||
files of numbers. Yorick includes an interactive graphics package, and a
|
files of numbers. Yorick includes an interactive graphics package, and a
|
||||||
binary file package capable of translating to and from the raw numeric
|
binary file package capable of translating to and from the raw numeric
|
||||||
formats of all modern computers. Yorick is written in ANSI C and runs on
|
formats of all modern computers. Yorick is written in ANSI C and runs on
|
||||||
most operating systems (\*nix systems, MacOS X, Windows).
|
most operating systems (*nix systems, MacOS X, Windows).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
homepage = "http://dhmunro.github.io/yorick-doc/"
|
homepage = "http://dhmunro.github.io/yorick-doc/"
|
||||||
|
|
|
@ -32,7 +32,7 @@ class Zfp(MakefilePackage):
|
||||||
def edit(self, spec, prefix):
|
def edit(self, spec, prefix):
|
||||||
config_file = FileFilter('Config')
|
config_file = FileFilter('Config')
|
||||||
config_file.filter(
|
config_file.filter(
|
||||||
'^\s*#\s*DEFS\s*\+=\s*-DBIT_STREAM_WORD_TYPE\s*=\s*uint8',
|
r'^\s*#\s*DEFS\s*\+=\s*-DBIT_STREAM_WORD_TYPE\s*=\s*uint8',
|
||||||
'DEFS += -DBIT_STREAM_WORD_TYPE=uint%s' %
|
'DEFS += -DBIT_STREAM_WORD_TYPE=uint%s' %
|
||||||
spec.variants['bsws'].value)
|
spec.variants['bsws'].value)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue