install/install_tree: glob support (#18376)

* install/install_tree: glob support

* Add unit tests

* Update existing packages

* Raise error if glob finds no files, document function raises
This commit is contained in:
Adam J. Stewart
2020-09-03 12:47:19 -05:00
committed by GitHub
parent 098beee295
commit 741bb9bafe
48 changed files with 276 additions and 370 deletions

View File

@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
import os
import sys
@@ -34,9 +32,7 @@ def install(self, spec, prefix):
mkdirp(prefix.lib)
install(name, prefix.lib)
mkdirp(prefix.include)
headers = glob.glob('*.h')
for h in headers:
install(h, prefix.include)
install('*.h', prefix.include)
@run_after('install')
def fix_darwin_install(self):

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Amrvis(MakefilePackage):
"""Amrvis is a visualization package specifically designed to
@@ -198,6 +195,4 @@ def setup_build_environment(self, env):
def install(self, spec, prefix):
# Install exe manually
mkdirp(prefix.bin)
exes = glob.iglob('*.ex')
for exe in exes:
install(exe, prefix.bin)
install('*.ex', prefix.bin)

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Aspa(MakefilePackage):
"""A fundamental premise in ExMatEx is that scale-bridging performed in
@@ -52,5 +49,4 @@ def install(self, spec, prefix):
install('exec/kriging_model_centers.txt', prefix.input)
install('exec/point_data.txt', prefix.input)
install('exec/value_data.txt', prefix.input)
for files in glob.glob('doc/*.*'):
install(files, prefix.doc)
install('doc/*.*', prefix.doc)

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Bcftools(AutotoolsPackage):
"""BCFtools is a set of utilities that manipulate variant calls in the
@@ -99,8 +96,7 @@ def install(self, spec, prefix):
if spec.satisfies('@1.2'):
mkdirp(self.prefix.libexec.bcftools)
for files in glob.glob('plugins/*.so'):
install(files, self.prefix.libexec.bcftools)
install('plugins/*.so', self.prefix.libexec.bcftools)
@when('@1.2')
def setup_run_environment(self, env):

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from glob import glob
class Bib2xhtml(Package):
"""bib2xhtml is a program that converts BibTeX files into HTML."""
@@ -18,8 +15,7 @@ def install(self, spec, prefix):
# Add the bst include files to the install directory
bst_include = join_path(prefix.share, 'bib2xhtml')
mkdirp(bst_include)
for bstfile in glob('html-*bst'):
install(bstfile, bst_include)
install('html-*bst', bst_include)
# Install the script and point it at the user's favorite perl
# and the bst include directory.

View File

@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
import sys
@@ -115,9 +113,8 @@ def install_headers(self):
# grab the full binutils set of headers
install_tree('include', extradir)
# also grab the headers from the bfd directory
for current_file in glob.glob(join_path(self.build_directory,
'bfd', '*.h')):
install(current_file, extradir)
install(join_path(self.build_directory, 'bfd', '*.h'),
extradir)
def flag_handler(self, name, flags):
# To ignore the errors of narrowing conversions for

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from glob import glob
class Bowtie2(Package):
"""Bowtie 2 is an ultrafast and memory-efficient tool for aligning
@@ -71,14 +68,4 @@ def install(self, spec, prefix):
make_arg.append('POPCNT_CAPABILITY=0')
make(*make_arg)
mkdirp(prefix.bin)
for bow in glob("bowtie2*"):
install(bow, prefix.bin)
# install('bowtie2',prefix.bin)
# install('bowtie2-align-l',prefix.bin)
# install('bowtie2-align-s',prefix.bin)
# install('bowtie2-build',prefix.bin)
# install('bowtie2-build-l',prefix.bin)
# install('bowtie2-build-s',prefix.bin)
# install('bowtie2-inspect',prefix.bin)
# install('bowtie2-inspect-l',prefix.bin)
# install('bowtie2-inspect-s',prefix.bin)
install('bowtie2*', prefix.bin)

View File

@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import os
import glob
@@ -48,10 +46,7 @@ def install(self, spec, prefix):
install_tree('example', prefix.example)
with working_dir('scripts'):
install('helpMod.pm', prefix.lib)
files = glob.iglob('*.pl')
for file in files:
if os.path.isfile(file):
install(file, prefix.bin)
install('*.pl', prefix.bin)
@run_after('install')
def filter_sbang(self):

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Chombo(MakefilePackage):
"""The Chombo package provides a set of tools for implementing finite
@@ -109,9 +106,7 @@ def build(self, spec, prefix):
def install(self, spec, prefix):
with working_dir('lib'):
install_tree('include', prefix.include)
libfiles = glob.glob('lib*.a')
libfiles += glob.glob('lib*.so')
libfiles += glob.glob('lib*.dylib')
mkdirp(prefix.lib)
for lib in libfiles:
install(lib, prefix.lib)
install('lib*.a', prefix.lib)
install('lib*.so', prefix.lib)
install('lib*.dylib', prefix.lib)

View File

@@ -4,11 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import glob
from spack import *
class Cloverleaf(MakefilePackage):
"""Proxy Application. CloverLeaf is a miniapp that solves the
compressible Euler equations on a Cartesian grid,
@@ -95,7 +90,5 @@ def install(self, spec, prefix):
prefix.bin)
install('CloverLeaf_{0}/clover.in'.format(self.type_of_build),
prefix.bin)
for f in glob.glob(
'CloverLeaf_{0}/*.in'.format(self.type_of_build)):
install(f, prefix.doc.tests)
install('CloverLeaf_{0}/*.in'.format(self.type_of_build),
prefix.doc.tests)

View File

@@ -4,11 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import glob
from spack import *
class Cloverleaf3d(MakefilePackage):
"""Proxy Application. CloverLeaf3D is 3D version of the
CloverLeaf mini-app. CloverLeaf is a mini-app that solves
@@ -78,7 +73,5 @@ def install(self, spec, prefix):
prefix.bin)
install('CloverLeaf3D_{0}/clover.in'.format(self.type_of_build),
prefix.bin)
for f in glob.glob(
'CloverLeaf3D_{0}/*.in'.format(self.type_of_build)):
install(f, prefix.doc.samples)
install('CloverLeaf3D_{0}/*.in'.format(self.type_of_build),
prefix.doc.samples)

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Cohmm(MakefilePackage):
"""An anticipated important use-case for next-generation supercomputing
@@ -37,5 +34,4 @@ def install(self, spec, prefix):
install('cohmm', prefix.bin)
install('README.md', prefix.doc)
install('LICENSE.md', prefix.doc)
for files in glob.glob('input/*.*'):
install(files, prefix.input)
install('input/*.*', prefix.input)

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Efivar(MakefilePackage):
"""Tools and libraries to work with EFI variables"""
@@ -22,7 +19,5 @@ class Efivar(MakefilePackage):
def install(self, spec, prefix):
with working_dir(self.build_directory):
mkdirp(prefix.lib)
files = glob.glob('*.so*')
for f in files:
install(f, prefix.lib)
install('*.so*', prefix.lib)
install_tree('include/efivar', prefix.include)

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Exasp2(MakefilePackage):
"""ExaSP2 is a reference implementation of typical linear algebra algorithms
@@ -70,7 +67,6 @@ def build_targets(self):
def install(self, spec, prefix):
mkdir(prefix.bin)
mkdir(prefix.doc)
for files in glob.glob('bin/ExaSP2-*'):
install(files, prefix.bin)
install('bin/ExaSP2-*', prefix.bin)
install('LICENSE.md', prefix.doc)
install('README.md', prefix.doc)

View File

@@ -4,8 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import glob
from spack import *
class Gatk(Package):
@@ -61,8 +59,7 @@ def install(self, spec, prefix):
# For ver 3.x will install "GenomeAnalysisTK.jar"
# For ver 4.x will install both "gatk-package-<ver>-local.jar"
# and "gatk-package-<ver>-spark.jar"
for file in glob.glob("*.jar"):
install(file, prefix.bin)
install("*.jar", prefix.bin)
# Skip helper script for versions >4.0
if spec.satisfies("@4.0:"):

View File

@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from glob import glob
import os
@@ -39,5 +37,4 @@ def install(self, spec, prefix):
install('nanobenchmark_example', prefix.bin)
install('vector_test', prefix.bin)
install('sip_hash_test', prefix.bin)
for i in glob('highwayhash/*.h'):
install(i, prefix.include)
install('highwayhash/*.h', prefix.include)

View File

@@ -3,10 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
import os.path
class Hisat2(MakefilePackage):
"""HISAT2 is a fast and sensitive alignment program for mapping
@@ -40,10 +36,7 @@ def install(self, spec, prefix):
install('hisat2-inspect', prefix.bin)
install('hisat2-inspect-s', prefix.bin)
install('hisat2-inspect-l', prefix.bin)
files = glob.iglob('*.py')
for file in files:
if os.path.isfile(file):
install(file, prefix.bin)
install('*.py', prefix.bin)
def setup_run_environment(self, env):
env.prepend_path('PATH', self.spec.prefix)

View File

@@ -3,10 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
import os
class Hybpiper(Package):
"""HybPiper was designed for targeted sequence capture, in which DNA
@@ -36,7 +32,4 @@ def setup_run_environment(self, env):
def install(self, spec, prefix):
mkdirp(prefix.bin)
files = glob.iglob("*.py")
for file in files:
if os.path.isfile(file):
install(file, prefix.bin)
install('*.py', prefix.bin)

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Iniparser(MakefilePackage):
"""This modules offers parsing of ini files from the C level."""
@@ -20,9 +17,6 @@ class Iniparser(MakefilePackage):
def install(self, spec, prefix):
mkdirp(prefix.include)
with working_dir('src'):
for files in glob.glob('*.h'):
install(files, prefix.include)
mkdirp(prefix.lib)
for files in glob.glob('libiniparser.*'):
install(files, prefix.lib)
install('src/*.h', prefix.include)
install('libiniparser.*', prefix.lib)

View File

@@ -205,13 +205,11 @@ def install(self, spec, prefix):
for lib_name in tbb_lib_names:
# install release libs
fs = glob.glob(join_path("build", "*release", lib_name + ".*"))
for f in fs:
install(f, prefix.lib)
install(join_path("build", "*release", lib_name + ".*"),
prefix.lib)
# install debug libs if they exist
fs = glob.glob(join_path("build", "*debug", lib_name + "_debug.*"))
for f in fs:
install(f, prefix.lib)
install(join_path("build", "*debug", lib_name + "_debug.*"),
prefix.lib)
if spec.satisfies('@2017.8,2018.1:', strict=True):
# Generate and install the CMake Config file.

View File

@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
import os
@@ -87,23 +85,17 @@ def install(self, spec, prefix):
mkdirp(prefix.lib)
mkdirp(prefix.bin)
libs = glob.glob(join_path('obj', 'lib*.a'))
for lib in libs:
install(lib, prefix.lib)
install(join_path('obj', 'lib*.a'), prefix.lib)
# Build and install shared libxed.so and examples (to get the CLI).
mfile('--clean')
mfile('examples', '--shared', *args)
libs = glob.glob(join_path('obj', 'lib*.so'))
for lib in libs:
install(lib, prefix.lib)
install(join_path('obj', 'lib*.so'), prefix.lib)
# Install the xed program
install(join_path('obj', 'examples', 'xed'), prefix.bin)
# Install header files.
hdrs = glob.glob(join_path('include', 'public', 'xed', '*.h')) \
+ glob.glob(join_path('obj', '*.h'))
for hdr in hdrs:
install(hdr, prefix.include)
install(join_path('include', 'public', 'xed', '*.h'), prefix.include)
install(join_path('obj', '*.h'), prefix.include)

View File

@@ -3,11 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import glob
import os
from spack import *
class Ioapi(MakefilePackage):
"""Models-3/EDSS Input/Output Applications Programming Interface."""
@@ -34,11 +31,7 @@ def install(self, spec, prefix):
make('install')
# Install the header files.
mkdirp(prefix.include.fixed132)
headers = glob.glob('ioapi/*.EXT')
for header in headers:
install(header, prefix.include)
install('ioapi/*.EXT', prefix.include)
# Install the header files for CMAQ and SMOKE in the
# non-standard -ffixed-line-length-132 format.
headers_fixed132 = glob.glob('ioapi/fixed_src/*.EXT')
for header in headers_fixed132:
install(header, prefix.include.fixed132)
install('ioapi/fixed_src/*.EXT', prefix.include.fixed132)

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Keyutils(MakefilePackage):
"""These tools are used to control the key management system built
@@ -22,6 +19,4 @@ class Keyutils(MakefilePackage):
def install(self, spec, prefix):
install_tree('.', prefix)
mkdirp(prefix.include)
headers = glob.glob(join_path(prefix, '*.h'))
for h in headers:
install(h, prefix.include)
install(join_path(prefix, '*.h'), prefix.include)

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import glob
from spack import *
class Leveldb(CMakePackage):
"""LevelDB is a fast key-value storage library written at Google
@@ -52,13 +49,10 @@ def install(self, spec, prefix):
mkdirp(prefix.lib)
# Needed for version 1.20
libraries = glob.glob('out-shared/libleveldb.*')
libraries += glob.glob('out-static/libleveldb.*')
install('out-shared/libleveldb.*', prefix.lib)
install('out-static/libleveldb.*', prefix.lib)
# Needed for version 1.18
libraries += glob.glob('libleveldb.*')
for library in libraries:
install(library, prefix.lib)
install('libleveldb.*', prefix.lib)
install_tree('include', prefix.include)

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Librom(AutotoolsPackage):
"""libROM: library for computing large-scale reduced order models"""
@@ -42,16 +39,15 @@ def configure_args(self):
# TODO(oxberry1@llnl.gov): Submit PR upstream that implements
# install phase in autotools
def install(self, spec, prefix):
mkdirp(self.spec.prefix.lib)
install('libROM.a', join_path(self.spec.prefix.lib, 'libROM.a'))
mkdirp(prefix.lib)
install('libROM.a', join_path(prefix.lib, 'libROM.a'))
mkdirp(self.spec.prefix.include)
for f in glob.glob('*.h'):
install(f, join_path(self.spec.prefix.include, f))
mkdirp(prefix.include)
install('*.h', prefix.include)
mkdirp(self.spec.prefix.share)
mkdirp(prefix.share)
install('libROM_Design_and_Theory.pdf',
join_path(self.spec.prefix.share,
join_path(prefix.share,
'libROM_Design_and_Theory.pdf'))
install_tree('docs', self.spec.prefix.share.docs)
install_tree('docs', prefix.share.docs)

View File

@@ -113,10 +113,8 @@ def install(self, spec, prefix):
install_tree('bin', prefix.bin)
mkdirp(prefix.doc)
for doc_file in glob(join_path('documentation', '*.md')):
install(doc_file, prefix.doc)
for doc_file in glob(join_path('documentation', '*.pdf')):
install(doc_file, prefix.doc)
install(join_path('documentation', '*.md'), prefix.doc)
install(join_path('documentation', '*.pdf'), prefix.doc)
if '@1.8.2:' in spec:
install('LICENSE.md', prefix.doc)
else:

View File

@@ -5,7 +5,6 @@
from spack import *
import glob
import sys
import os
@@ -101,8 +100,7 @@ def install(self, spec, prefix):
install('libmetis.a', prefix.lib)
mkdir(prefix.include)
for h in glob.glob(join_path('Lib', '*.h')):
install(h, prefix.include)
install(join_path('Lib', '*.h'), prefix.include)
mkdir(prefix.share)
sharefiles = (('Graphs', '4elt.graph'), ('Graphs', 'metis.mesh'),
@@ -203,9 +201,7 @@ def install(self, spec, prefix):
# install GKlib headers, which will be needed for ParMETIS
gklib_dist = join_path(prefix.include, 'GKlib')
mkdirp(gklib_dist)
hfiles = glob.glob(join_path(source_directory, 'GKlib', '*.h'))
for hfile in hfiles:
install(hfile, gklib_dist)
install(join_path(source_directory, 'GKlib', '*.h'), gklib_dist)
if self.run_tests:
# FIXME: On some systems, the installed binaries for METIS cannot

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Minigmg(Package):
"""miniGMG is a compact benchmark for understanding the performance
@@ -43,6 +40,4 @@ def install(self, spec, prefix):
mkdir(prefix.bin)
install('run.miniGMG', prefix.bin)
mkdir(prefix.jobs)
files = glob.glob('job*')
for f in files:
install(f, prefix.jobs)
install('job*', prefix.jobs)

View File

@@ -3,12 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import glob
import tarfile
from spack import *
class Minimd(MakefilePackage):
"""Proxy Application. A simple proxy for the force computations
@@ -52,6 +48,4 @@ def install(self, spec, prefix):
install('miniMD_ref/miniMD_mpi', prefix.bin)
install('miniMD_ref/in.lj.miniMD', prefix.bin)
install('miniMD_ref/README', prefix.doc)
for f in glob.glob('miniMD_ref/in.*'):
install(f, prefix.doc)
install('miniMD_ref/in.*', prefix.doc)

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from glob import glob
class Motioncor2(Package):
"""MotionCor2 is a multi-GPU program that corrects beam-induced sample
@@ -34,7 +31,6 @@ class Motioncor2(Package):
def install(self, spec, prefix):
mkdirp(prefix.bin)
for files in glob("MotionCor2_*"):
install(files, prefix.bin)
install('MotionCor2_*', prefix.bin)
with working_dir(prefix.bin):
symlink('MotionCor2_{0}'.format(spec.version), 'MotionCor2')

View File

@@ -3,10 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import os
import sys
import glob
class Mumps(Package):
@@ -277,8 +275,7 @@ def install(self, spec, prefix):
lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so'
lib_suffix = lib_dsuffix if '+shared' in spec else '.a'
install('libseq/libmpiseq%s' % lib_suffix, prefix.lib)
for f in glob.glob(join_path('libseq', '*.h')):
install(f, prefix.include)
install(join_path('libseq', '*.h'), prefix.include)
# FIXME: extend the tests to mpirun -np 2 when build with MPI
# FIXME: use something like numdiff to compare output files

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Openmx(MakefilePackage):
"""OpenMX (Open source package for Material eXplorer) is a software
@@ -36,10 +33,7 @@ class Openmx(MakefilePackage):
def edit(self, spec, prefix):
# Move contents to source/
# http://www.openmx-square.org/bugfixed/18June12/README.txt
patch_files = []
patch_files = glob.glob('./patch/*')
for f in patch_files:
copy(f, './source')
copy_tree('patch', 'source')
makefile = FileFilter('./source/makefile')
makefile.filter('^DESTDIR.*$', 'DESTDIR = {0}/bin'.format(prefix))

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Opennurbs(Package):
"""OpenNURBS is an open-source NURBS-based geometric modeling library
@@ -49,6 +46,4 @@ def install(self, spec, prefix):
mkdir(prefix.include)
install('libopenNURBS.a', prefix.lib)
install_tree('zlib', join_path(prefix.include, 'zlib'))
headers = glob.glob(join_path('.', '*.h'))
for h in headers:
install(h, prefix.include)
install('*.h', prefix.include)

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from glob import glob
class PerlStarFusion(Package):
"""STAR-Fusion is a component of the Trinity Cancer Transcriptome Analysis
@@ -29,12 +26,7 @@ class PerlStarFusion(Package):
depends_on('perl-uri', type=('build', 'run'))
def install(self, spec, prefix):
mkdirp(prefix.bin)
install('STAR-Fusion', prefix.bin)
mkdirp(perl_lib_dir)
with working_dir('PerlLib'):
for pm in glob("*.pm"):
install(pm, perl_lib_dir)
with working_dir('util'):
for files in glob("*"):
install(files, prefix.bin)
install(join_path('PerlLib', '*.pm'), perl_lib_dir)
install_tree('util', prefix.bin)
install('STAR-Fusion', prefix.bin)

View File

@@ -4,11 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
# adapted from official quantum espresso package
import glob
import os.path
from spack import *
class QESirius(Package):
"""SIRIUS enabled fork of QuantumESPRESSO. """
@@ -266,7 +261,7 @@ def install(self, spec, prefix):
# Compute the include directory from there: versions
# of espresso prior to 6.1 requires -I in front of the directory
elpa_include = '' if '@6.1:' in spec else '-I'
elpa_include += os.path.join(
elpa_include += join_path(
elpa.headers.directories[0],
'modules'
)
@@ -310,7 +305,6 @@ def install(self, spec, prefix):
if 'platform=darwin' in spec:
mkdirp(prefix.bin)
for filename in glob.glob("bin/*.x"):
install(filename, prefix.bin)
install('bin/*.x', prefix.bin)
else:
make('install')

View File

@@ -3,11 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import glob
import os.path
from spack import *
class QuantumEspresso(Package):
"""Quantum ESPRESSO is an integrated suite of Open-Source computer codes
@@ -325,7 +320,7 @@ def install(self, spec, prefix):
# Compute the include directory from there: versions
# of espresso prior to 6.1 requires -I in front of the directory
elpa_include = '' if '@6.1:' in spec else '-I'
elpa_include += os.path.join(
elpa_include += join_path(
elpa.headers.directories[0],
'modules'
)
@@ -369,7 +364,6 @@ def install(self, spec, prefix):
if 'platform=darwin' in spec:
mkdirp(prefix.bin)
for filename in glob.glob("bin/*.x"):
install(filename, prefix.bin)
install('bin/*.x', prefix.bin)
else:
make('install')

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Redundans(Package):
"""Redundans pipeline assists an assembly of heterozygous genomes."""
@@ -38,7 +35,6 @@ def install(self, spec, prefix):
'redundans.py')
binfiles = ['redundans.py', 'bin/filterReads.py']
binfiles.extend(glob.glob('bin/fast?2*.py'))
# new internal dep with 0.14a
if spec.satisfies('@0.14a:'):
@@ -47,3 +43,5 @@ def install(self, spec, prefix):
mkdirp(prefix.bin)
for f in binfiles:
install(f, prefix.bin)
install('bin/fast?2*.py', prefix.bin)

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import glob
from spack import *
class Rhash(MakefilePackage):
"""RHash is a console utility for computing and verifying hash sums of
@@ -52,8 +49,6 @@ def install(self, spec, prefix):
make('install-lib-static', 'DESTDIR={0}'.format(prefix), 'PREFIX=')
if spec.satisfies('platform=darwin'):
libs = glob.glob('librhash/*.dylib')
for lib in libs:
install(lib, prefix.lib)
install('librhash/*.dylib', prefix.lib)
else:
make('install-lib-shared', 'DESTDIR={0}'.format(prefix), 'PREFIX=')

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class SnapKorf(MakefilePackage):
"""SNAP is a general purpose gene finding program suitable for both
@@ -30,9 +27,7 @@ def install(self, spec, prefix):
for p in progs:
install(p, prefix.bin)
files = glob.iglob('*.pl')
for file in files:
install(file, prefix.bin)
install('*.pl', prefix.bin)
install_tree('Zoe', prefix.Zoe)
install_tree('HMM', prefix.HMM)

View File

@@ -2,8 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Sparse(MakefilePackage):
@@ -36,9 +34,7 @@ def build(self, spec, prefix):
make()
def install(self, spec, prefix):
headers = glob.glob('src/*.h')
mkdir(prefix.include)
install_tree('lib', prefix.lib)
install_tree('bin', prefix.bin)
mkdir(prefix.include)
for h in headers:
install(h, prefix.include)
install('src/*.h', prefix.include)

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Sse2neon(Package):
"""A C/C++ header file that converts Intel SSE intrinsics to ARN NEON
@@ -18,6 +15,4 @@ class Sse2neon(Package):
def install(self, spec, prefix):
mkdirp(prefix.include)
headers = glob.glob('*.h')
for f in headers:
install(f, prefix.include)
install('*.h', prefix.include)

View File

@@ -3,10 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
import os
class Superlu(Package):
"""SuperLU is a general purpose library for the direct solution of large,
@@ -64,9 +60,9 @@ def install(self, spec, prefix):
'ARCH = ar',
'ARCHFLAGS = cr',
'RANLIB = {0}'.format('ranlib' if which('ranlib') else 'echo'),
'CC = {0}'.format(os.environ['CC']),
'FORTRAN = {0}'.format(os.environ['FC']),
'LOADER = {0}'.format(os.environ['CC']),
'CC = {0}'.format(env['CC']),
'FORTRAN = {0}'.format(env['FC']),
'LOADER = {0}'.format(env['CC']),
'CDEFS = -DAdd_'
])
@@ -95,7 +91,5 @@ def install(self, spec, prefix):
# Install manually
install_tree('lib', prefix.lib)
headers = glob.glob(join_path('SRC', '*.h'))
mkdir(prefix.include)
for h in headers:
install(h, prefix.include)
install(join_path('SRC', '*.h'), prefix.include)

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Sw4lite(MakefilePackage):
"""Sw4lite is a bare bone version of SW4 intended for testing
@@ -75,6 +72,5 @@ def build_targets(self):
def install(self, spec, prefix):
mkdir(prefix.bin)
exe_name = glob.glob('*/sw4lite')[0]
install(exe_name, prefix.bin)
install('*/sw4lite', prefix.bin)
install_tree('tests', prefix.tests)

View File

@@ -3,10 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import os
import platform
import glob
class Texlive(AutotoolsPackage):
@@ -152,8 +150,7 @@ def configure_args(self):
def setup_texlive(self):
if not self.spec.satisfies('@live'):
mkdirp(self.prefix.tlpkg.TeXLive)
for files in glob.glob('texk/tests/TeXLive/*'):
install(files, self.prefix.tlpkg.TeXLive)
install('texk/tests/TeXLive/*', self.prefix.tlpkg.TeXLive)
with working_dir('spack-build'):
make('texlinks')

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Vardictjava(Package):
"""VarDictJava is a variant discovery program written in Java.
@@ -23,6 +20,4 @@ def install(self, spec, prefix):
install('bin/VarDict', prefix.bin)
mkdirp(prefix.lib)
files = [x for x in glob.glob("lib/*jar")]
for f in files:
install(f, prefix.lib)
install('lib/*.jar', prefix.lib)

View File

@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
class Wireshark(CMakePackage):
"""Graphical network analyzer and capture tool"""
@@ -99,6 +96,5 @@ def install_headers(self):
folders = ['.', 'epan/crypt', 'epan/dfilter', 'epan/dissectors',
'epan/ftypes', 'epan/wmem', 'wiretap', 'wsutil']
for folder in folders:
headers = glob.glob(join_path(folder, '*.h'))
for h in headers:
install(h, join_path(prefix.include, 'wireshark', folder))
install(join_path(folder, '*.h'),
join_path(prefix.include.wireshark, folder))