repo_name
stringlengths 6
97
| path
stringlengths 3
341
| text
stringlengths 8
1.02M
|
|---|---|---|
player1537-forks/spack
|
var/spack/repos/builtin/packages/net-snmp/package.py
|
<reponame>player1537-forks/spack
# Copyright 2013-2022 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)
from spack import *
class NetSnmp(AutotoolsPackage):
"""A SNMP application library, tools and daemon."""
homepage = "http://www.net-snmp.org/"
url = "https://sourceforge.net/projects/net-snmp/files/net-snmp/5.9.1/net-snmp-5.9.1.tar.gz/download"
version('5.9.1', sha256='eb7fd4a44de6cddbffd9a92a85ad1309e5c1054fb9d5a7dd93079c8953f48c3f')
version('5.9', sha256='04303a66f85d6d8b16d3cc53bde50428877c82ab524e17591dfceaeb94df6071')
depends_on('perl-extutils-makemaker')
depends_on('ncurses')
def configure_args(self):
args = ['--with-defaults', 'LIBS=-ltinfo']
return args
def install(self, spec, prefix):
make('install', parallel=False)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-irdisplay/package.py
|
<reponame>player1537-forks/spack<filename>var/spack/repos/builtin/packages/r-irdisplay/package.py<gh_stars>10-100
# Copyright 2013-2022 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)
from spack import *
class RIrdisplay(RPackage):
"""'Jupyter' Display Machinery.
An interface to the rich display capabilities of 'Jupyter' front-ends (e.g.
'Jupyter Notebook') <https://jupyter.org>. Designed to be used from a
running 'IRkernel' session <https://irkernel.github.io>."""
cran = "IRdisplay"
version('1.1', sha256='83eb030ff91f546cb647899f8aa3f5dc9fe163a89a981696447ea49cc98e8d2b')
version('0.7.0', sha256='91eac9acdb92ed0fdc58e5da284aa4bb957ada5eef504fd89bec136747999089')
version('0.4.4', sha256='e83a0bc52800618bf9a3ac5ef3d432512e00f392b7216fd515fca319377584a6')
depends_on('r@3.0.1:', type=('build', 'run'))
depends_on('r-repr', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/ctffind/package.py
|
# Copyright 2013-2022 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)
from spack import *
class Ctffind(AutotoolsPackage):
"""Fast and accurate defocus estimation from electron micrographs."""
homepage = "https://grigoriefflab.umassmed.edu/ctf_estimation_ctffind_ctftilt"
url = "https://grigoriefflab.umassmed.edu/system/tdf?path=ctffind-4.1.8.tar.gz&file=1&type=node&id=26"
version('4.1.8', sha256='bec43c0b8d32878c740d6284ef6d9d22718c80dc62270be18d1d44e8b84b2729', extension='tar.gz')
depends_on('wxwidgets')
depends_on('fftw@3:')
|
player1537-forks/spack
|
lib/spack/external/macholib/macho_dump.py
|
#!/usr/bin/env python
from __future__ import print_function
import sys
from macholib._cmdline import main as _main
from macholib.mach_o import CPU_TYPE_NAMES, MH_CIGAM_64, MH_MAGIC_64, get_cpu_subtype
from macholib.MachO import MachO
ARCH_MAP = {
("<", "64-bit"): "x86_64",
("<", "32-bit"): "i386",
(">", "64-bit"): "ppc64",
(">", "32-bit"): "ppc",
}
def print_file(fp, path):
print(path, file=fp)
m = MachO(path)
for header in m.headers:
seen = set()
if header.MH_MAGIC == MH_MAGIC_64 or header.MH_MAGIC == MH_CIGAM_64:
sz = "64-bit"
else:
sz = "32-bit"
arch = CPU_TYPE_NAMES.get(header.header.cputype, header.header.cputype)
subarch = get_cpu_subtype(header.header.cputype, header.header.cpusubtype)
print(
" [%s endian=%r size=%r arch=%r subarch=%r]"
% (header.__class__.__name__, header.endian, sz, arch, subarch),
file=fp,
)
for _idx, _name, other in header.walkRelocatables():
if other not in seen:
seen.add(other)
print("\t" + other, file=fp)
print("", file=fp)
def main():
print(
"WARNING: 'macho_dump' is deprecated, use 'python -mmacholib dump' " "instead"
)
_main(print_file)
if __name__ == "__main__":
try:
sys.exit(main())
except KeyboardInterrupt:
pass
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-tensorflow-metadata/package.py
|
<reponame>player1537-forks/spack<filename>var/spack/repos/builtin/packages/py-tensorflow-metadata/package.py<gh_stars>10-100
# Copyright 2013-2022 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 tempfile
from spack import *
class PyTensorflowMetadata(PythonPackage):
"""Library and standards for schema and statistics.
TensorFlow Metadata provides standard representations for metadata that are
useful when training machine learning models with TensorFlow."""
homepage = "https://pypi.org/project/tensorflow-metadata/"
# Only available as a wheel on PyPI
url = "https://github.com/tensorflow/metadata/archive/refs/tags/v1.5.0.tar.gz"
version(
"1.5.0",
sha256="f0ec8aaf62fd772ef908efe4ee5ea3bc0d67dcbf10ae118415b7b206a1d61745",
)
depends_on("bazel@0.24.1:", type="build")
depends_on("python@3.7:3", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-absl-py@0.9:0.12", type=("build", "run"))
depends_on("py-googleapis-common-protos@1.52.0:1", type=("build", "run"))
depends_on("py-protobuf@3.13:3", type=("build", "run"))
def setup_build_environment(self, env):
tmp_path = tempfile.mkdtemp(prefix="spack")
env.set("TEST_TMPDIR", tmp_path)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/recola-sm/package.py
|
<gh_stars>10-100
# Copyright 2013-2022 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)
from spack import *
class RecolaSm(CMakePackage):
"""Standard Model files for the Recola generator."""
tags = ['hep']
homepage = "https://recola.gitlab.io/recola2/modelfiles/modelfiles.html"
url = "https://recola.hepforge.org/downloads/?f=SM_2.2.3.tar.gz"
maintainers = ['vvolkl']
version('2.2.3', sha256='9ebdc4fd8ca48789de0b6bbb2ab7e4845c92d19dfe0c3f67866cbf114d6242a5')
depends_on('collier')
def cmake_args(self):
args = [self.define('static', True),
self.define('collier_path', self.spec['collier'].prefix.lib.cmake)]
return args
|
player1537-forks/spack
|
lib/spack/spack/cmd/modules/tcl.py
|
<reponame>player1537-forks/spack<gh_stars>10-100
# Copyright 2013-2022 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 functools
import spack.cmd.common.arguments
import spack.cmd.modules
import spack.config
import spack.modules.tcl
def add_command(parser, command_dict):
tcl_parser = parser.add_parser(
'tcl', help='manipulate non-hierarchical module files'
)
sp = spack.cmd.modules.setup_parser(tcl_parser)
# Set default module file for a package
setdefault_parser = sp.add_parser(
'setdefault', help='set the default module file for a package'
)
spack.cmd.common.arguments.add_common_arguments(
setdefault_parser, ['constraint']
)
callbacks = dict(spack.cmd.modules.callbacks.items())
callbacks['setdefault'] = setdefault
command_dict['tcl'] = functools.partial(
spack.cmd.modules.modules_cmd, module_type='tcl', callbacks=callbacks
)
def setdefault(module_type, specs, args):
"""Set the default module file, when multiple are present"""
# Currently, accepts only a single matching spec
spack.cmd.modules.one_spec_or_raise(specs)
spec = specs[0]
data = {
'modules': {
args.module_set_name: {
'tcl': {
'defaults': [str(spec)]
}
}
}
}
spack.modules.tcl.configuration_registry = {}
scope = spack.config.InternalConfigScope('tcl-setdefault', data)
with spack.config.override(scope):
writer = spack.modules.module_types['tcl'](spec, args.module_set_name)
writer.update_module_defaults()
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/units/package.py
|
<reponame>player1537-forks/spack
# Copyright 2013-2022 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)
from spack import *
class Units(AutotoolsPackage, GNUMirrorPackage):
"""GNU units converts between different systems of units"""
homepage = "https://www.gnu.org/software/units/"
gnu_mirror_path = "units/units-2.13.tar.gz"
version('2.13', sha256='0ba5403111f8e5ea22be7d51ab74c8ccb576dc30ddfbf18a46cb51f9139790ab')
depends_on('python', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-aiohttp-cors/package.py
|
# Copyright 2013-2022 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)
class PyAiohttpCors(PythonPackage):
"""aiohttp_cors library implements Cross Origin Resource Sharing (CORS)
support for aiohttp asyncio-powered asynchronous HTTP server."""
homepage = "https://github.com/aio-libs/aiohttp-cors"
pypi = "aiohttp_cors/aiohttp-cors-0.7.0.tar.gz"
version('0.7.0', sha256='4d39c6d7100fd9764ed1caf8cebf0eb01bf5e3f24e2e073fda6234bc48b19f5d')
depends_on('python@3.4.1:', type=('build', 'run'))
depends_on('py-setuptools@20.8.1:', type='build')
depends_on('py-aiohttp@1.1:', type=('build', 'run'))
depends_on('py-typing', when='^python@:3.4', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/gpgme/package.py
|
# Copyright 2013-2022 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)
from spack import *
class Gpgme(AutotoolsPackage):
"""GPGME is the standard library to access GnuPG
functions from programming languages."""
homepage = "https://www.gnupg.org/software/gpgme/index.html"
url = "https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-1.16.0.tar.bz2"
executables = ['^gpgme-config$']
version('1.16.0', sha256='6c8cc4aedb10d5d4c905894ba1d850544619ee765606ac43df7405865de29ed0')
version('1.12.0', sha256='b4dc951c3743a60e2e120a77892e9e864fb936b2e58e7c77e8581f4d050e8cd8')
# https://dev.gnupg.org/T5509 - New test t-edit-sign test crashes with GCC 11.1.0
patch(
'https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commitdiff_plain;h=81a33ea5e1b86d586b956e893a5b25c4cd41c969;hp=e8e055e682f8994d62012574e1c8d862ca72a35d',
sha256='b934e3cb0b3408ad27990d97b594c89801a4748294e2eb5804a455a312821411',
when='@1.16.0',
)
depends_on('gnupg', type='build')
depends_on('libgpg-error', type='build')
depends_on('libassuan', type='build')
@classmethod
def determine_version(cls, exe):
return Executable(exe)('--version', output=str, error=str).rstrip()
def configure_args(self):
"""Fix the build when incompatible Qt libraries are installed on the host"""
return ['--enable-languages=cpp']
def setup_build_environment(self, env):
"""Build tests create a public keyring in ~/.gnupg if $HOME is not redirected"""
if self.run_tests:
env.set('HOME', self.build_directory)
env.prepend_path('LD_LIBRARY_PATH', self.spec['libgpg-error'].prefix.lib)
@property
def make_tests(self):
"""Use the Makefile's tests variable to control if the build tests shall run"""
return 'tests=tests' if self.run_tests else 'tests='
def build(self, spec, prefix):
make(self.make_tests)
def install(self, spec, prefix):
make(self.make_tests, 'install')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/eccodes/package.py
|
<filename>var/spack/repos/builtin/packages/eccodes/package.py
# Copyright 2013-2022 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)
_definitions = {
# German Meteorological Service (Deutscher Wetterdienst, DWD):
'edzw': {
'conflicts': {'when': '@:2.19.1,2.22.0,2.24.0:'},
'resources': [
{
'when': '@2.20.0',
'url': 'http://opendata.dwd.de/weather/lib/grib/eccodes_definitions.edzw-2.20.0-1.tar.gz',
'sha256': 'a92932f8a13c33cba65d3a33aa06c7fb4a37ed12a78e9abe2c5e966402b99af4'
},
{
'when': '@2.21.0',
'url': 'http://opendata.dwd.de/weather/lib/grib/eccodes_definitions.edzw-2.21.0-3.tar.bz2',
'sha256': '046f1f6450abb3b44c31dee6229f4aab06ca0d3576e27e93e05ccb7cd6e2d9d9'
},
{
'when': '@2.22.1',
'url': 'http://opendata.dwd.de/weather/lib/grib/eccodes_definitions.edzw-2.22.1-1.tar.bz2',
'sha256': 'be73102a0dcabb236bacd2a70c7b5475f673fda91b49e34df61bef0fa5ad3389'
},
{
'when': '@2.23.0',
'url': 'http://opendata.dwd.de/weather/lib/grib/eccodes_definitions.edzw-2.23.0-4.tar.bz2',
'sha256': 'c5db32861c7d23410aed466ffef3ca661410d252870a3949442d3ecb176aa338'
}
]
}
}
class Eccodes(CMakePackage):
"""ecCodes is a package developed by ECMWF for processing meteorological
data in GRIB (1/2), BUFR (3/4) and GTS header formats."""
homepage = 'https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home'
url = 'https://confluence.ecmwf.int/download/attachments/45757960/eccodes-2.2.0-Source.tar.gz?api=v2'
list_url = 'https://confluence.ecmwf.int/display/ECC/Releases'
maintainers = ['skosukhin']
version('2.24.2', sha256='c60ad0fd89e11918ace0d84c01489f21222b11d6cad3ff7495856a0add610403')
version('2.23.0', sha256='cbdc8532537e9682f1a93ddb03440416b66906a4cc25dec3cbd73940d194bf0c')
version('2.22.1', sha256='75c7ee96469bb30b0c8f7edbdc4429ece4415897969f75c36173545242bc9e85')
version('2.21.0', sha256='da0a0bf184bb436052e3eae582defafecdb7c08cdaab7216780476e49b509755')
version('2.20.0', sha256='207a3d7966e75d85920569b55a19824673e8cd0b50db4c4dac2d3d52eacd7985')
version('2.19.1', sha256='9964bed5058e873d514bd4920951122a95963128b12f55aa199d9afbafdd5d4b')
version('2.18.0', sha256='d88943df0f246843a1a062796edbf709ef911de7269648eef864be259e9704e3')
version('2.13.0', sha256='c5ce1183b5257929fc1f1c8496239e52650707cfab24f4e0e1f1a471135b8272')
version('2.5.0', sha256='18ab44bc444168fd324d07f7dea94f89e056f5c5cd973e818c8783f952702e4e')
version('2.2.0', sha256='1a4112196497b8421480e2a0a1164071221e467853486577c4f07627a702f4c3')
variant('tools', default=False, description='Build the command line tools')
variant('netcdf', default=False,
description='Enable GRIB to NetCDF conversion tool')
variant('jp2k', default='openjpeg', values=('openjpeg', 'jasper', 'none'),
description='Specify JPEG2000 decoding/encoding backend')
variant('png', default=False,
description='Enable PNG support for decoding/encoding')
variant('aec', default=False,
description='Enable Adaptive Entropy Coding for decoding/encoding')
variant('pthreads', default=False,
description='Enable POSIX threads')
variant('openmp', default=False,
description='Enable OpenMP threads')
variant('memfs', default=False,
description='Enable memory based access to definitions/samples')
variant('python', default=False,
description='Enable the Python 2 interface')
variant('fortran', default=False, description='Enable the Fortran support')
variant('shared', default=True,
description='Build shared versions of the libraries')
variant('definitions',
values=disjoint_sets(
('auto',),
('default',) + tuple(_definitions.keys()),
).with_default('auto'),
description="List of definitions to install")
variant('samples',
values=disjoint_sets(
('auto',), ('default',),
).with_default('auto'),
description="List of samples to install")
depends_on('netcdf-c', when='+netcdf')
# Cannot be built with openjpeg@2.0.x.
depends_on('openjpeg@1.5.0:1.5,2.1.0:2.3', when='jp2k=openjpeg')
# Additional constraint for older versions.
depends_on('openjpeg@:2.1', when='@:2.16 jp2k=openjpeg')
depends_on('jasper', when='jp2k=jasper')
depends_on('libpng', when='+png')
depends_on('libaec', when='+aec')
# Can be built with Python 2 or Python 3.
depends_on('python', when='+memfs', type='build')
# The interface is available only for Python 2.
# Python 3 interface is available as a separate packages:
# https://confluence.ecmwf.int/display/ECC/Python+3+interface+for+ecCodes
depends_on('python@2.6:2', when='+python',
type=('build', 'link', 'run'))
depends_on('py-numpy', when='+python', type=('build', 'run'))
extends('python', when='+python')
depends_on('cmake@3.6:', type='build')
depends_on('cmake@3.12:', when='@2.19:', type='build')
conflicts('+openmp', when='+pthreads',
msg='Cannot enable both POSIX threads and OMP')
conflicts('+netcdf', when='~tools',
msg='Cannot enable the NetCDF conversion tool '
'when the command line tools are disabled')
conflicts('~tools', when='@:2.18.0',
msg='The command line tools can be disabled '
'only starting version 2.19.0')
for center, definitions in _definitions.items():
kwargs = definitions.get('conflicts', None)
if kwargs:
conflicts('definitions={0}'.format(center), **kwargs)
for kwargs in definitions.get('resources', []):
resource(name=center, destination='spack-definitions',
placement='definitions.{0}'.format(center), **kwargs)
# Enforce linking against the specified JPEG2000 backend, see also
# https://github.com/ecmwf/eccodes/commit/2c10828495900ff3d80d1e570fe96c1df16d97fb
patch('openjpeg_jasper.patch', when='@:2.16')
# CMAKE_INSTALL_RPATH must be a semicolon-separated list.
patch('cmake_install_rpath.patch', when='@:2.10')
# Fix a bug preventing cmake from finding NetCDF:
patch('https://github.com/ecmwf/ecbuild/commit/3916c7d22575c45166fcc89edcbe02a6e9b81aa2.patch',
sha256='857454528b666c52eb36ef3aa5d40ae018981b44e129bb8df3c2d3d560e3fa03',
when='@:2.4.0+netcdf')
@when('%nag+fortran')
def patch(self):
# A number of Fortran source files assume that the kinds of integer and
# real variables are specified in bytes. However, the NAG compiler
# accepts such code only with an additional compiler flag -kind=byte.
# We do not simply add the flag because all user applications would
# have to be compiled with this flag too, which goes against one of the
# purposes of using the NAG compiler: make sure the code does not
# contradict the Fortran standards. The following logic could have been
# implemented as regular patch files, which would, however, be quite
# large. We would also have to introduce several versions of each patch
# file to support different versions of the package.
patch_kind_files = ['fortran/eccodes_f90_head.f90',
'fortran/eccodes_f90_tail.f90',
'fortran/grib_f90_head.f90',
'fortran/grib_f90_tail.f90',
'fortran/grib_types.f90']
patch_unix_ext_files = []
if self.run_tests:
patch_kind_files.extend([
'examples/F90/grib_print_data.f90',
'examples/F90/grib_print_data_static.f90',
# Files that need patching only when the extended regression
# tests are enabled, which we disable unconditionally:
# 'examples/F90/bufr_attributes.f90',
# 'examples/F90/bufr_expanded.f90',
# 'examples/F90/bufr_get_keys.f90',
# 'examples/F90/bufr_read_scatterometer.f90',
# 'examples/F90/bufr_read_synop.f90',
# 'examples/F90/bufr_read_temp.f90',
# 'examples/F90/bufr_read_tempf.f90',
# 'examples/F90/bufr_read_tropical_cyclone.f90',
# 'examples/F90/grib_clone.f90',
# 'examples/F90/grib_get_data.f90',
# 'examples/F90/grib_nearest.f90',
# 'examples/F90/grib_precision.f90',
# 'examples/F90/grib_read_from_file.f90',
# 'examples/F90/grib_samples.f90',
# 'examples/F90/grib_set_keys.f90'
])
patch_unix_ext_files.extend([
'examples/F90/bufr_ecc-1284.f90',
'examples/F90/grib_set_data.f90',
'examples/F90/grib_set_packing.f90',
# Files that need patching only when the extended regression
# tests are enabled, which we disable unconditionally:
# 'examples/F90/bufr_copy_data.f90',
# 'examples/F90/bufr_get_string_array.f90',
# 'examples/F90/bufr_keys_iterator.f90',
# 'examples/F90/get_product_kind.f90',
# 'examples/F90/grib_count_messages_multi.f90'
])
kwargs = {'string': False, 'backup': False, 'ignore_absent': True}
# Return the kind and not the size:
filter_file(r'(^\s*kind_of_double\s*=\s*)(\d{1,2})(\s*$)',
'\\1kind(real\\2)\\3',
'fortran/grib_types.f90', **kwargs)
filter_file(r'(^\s*kind_of_\w+\s*=\s*)(\d{1,2})(\s*$)',
'\\1kind(x\\2)\\3',
'fortran/grib_types.f90', **kwargs)
# Replace integer kinds:
for size, r in [(2, 4), (4, 9), (8, 18)]:
filter_file(r'(^\s*integer\((?:kind=)?){0}(\).*)'.format(size),
'\\1selected_int_kind({0})\\2'.format(r),
*patch_kind_files, **kwargs)
# Replace real kinds:
for size, p, r in [(4, 6, 37), (8, 15, 307)]:
filter_file(r'(^\s*real\((?:kind=)?){0}(\).*)'.format(size),
'\\1selected_real_kind({0}, {1})\\2'.format(p, r),
*patch_kind_files, **kwargs)
# Enable getarg and exit subroutines:
filter_file(r'(^\s*program\s+\w+)(\s*$)',
'\\1; use f90_unix_env; use f90_unix_proc\\2',
*patch_unix_ext_files, **kwargs)
@property
def libs(self):
libraries = []
query_parameters = self.spec.last_query.extra_parameters
if 'shared' in query_parameters:
shared = True
elif 'static' in query_parameters:
shared = False
else:
shared = '+shared' in self.spec
# Return Fortran library if requested:
return_fortran = 'fortran' in query_parameters
# Return C library if either requested or the Fortran library is not
# requested (to avoid overlinking) or the static libraries are
# requested:
return_c = 'c' in query_parameters or not (return_fortran and shared)
# Return MEMFS library only if enabled and the static libraries are
# requested:
return_memfs = '+memfs' in self.spec and not shared
if return_fortran:
libraries.append('libeccodes_f90')
if return_c:
libraries.append('libeccodes')
if return_memfs:
libraries.append('libeccodes_memfs')
libs = find_libraries(
libraries, root=self.prefix, shared=shared, recursive=True
)
if libs and len(libs) == len(libraries):
return libs
msg = 'Unable to recursively locate {0} {1} libraries in {2}'
raise spack.error.NoLibrariesError(
msg.format('shared' if shared else 'static',
self.spec.name,
self.spec.prefix))
@run_before('cmake')
def check_fortran(self):
if '+fortran' in self.spec and self.compiler.fc is None:
raise InstallError(
'Fortran interface requires a Fortran compiler!')
def cmake_args(self):
jp2k = self.spec.variants['jp2k'].value
args = [
self.define_from_variant('ENABLE_BUILD_TOOLS', 'tools'),
self.define_from_variant('ENABLE_NETCDF', 'netcdf'),
self.define('ENABLE_JPG', jp2k != 'none'),
self.define('ENABLE_JPG_LIBJASPER', jp2k == 'jasper'),
self.define('ENABLE_JPG_LIBOPENJPEG', jp2k == 'openjpeg'),
self.define_from_variant('ENABLE_PNG', 'png'),
self.define_from_variant('ENABLE_AEC', 'aec'),
self.define_from_variant('ENABLE_ECCODES_THREADS', 'pthreads'),
self.define_from_variant('ENABLE_ECCODES_OMP_THREADS', 'openmp'),
self.define_from_variant('ENABLE_MEMFS', 'memfs'),
self.define_from_variant(
'ENABLE_PYTHON{0}'.format(
'2' if self.spec.satisfies('@2.20.0:') else ''),
'python'),
self.define_from_variant('ENABLE_FORTRAN', 'fortran'),
self.define('BUILD_SHARED_LIBS',
'BOTH' if '+shared' in self.spec else 'OFF'),
self.define('ENABLE_TESTS', self.run_tests),
# Examples are not installed and are just part of the test suite:
self.define('ENABLE_EXAMPLES', self.run_tests),
# Unconditionally disable the extended regression tests, since they
# download additional data (~134MB):
self.define('ENABLE_EXTRA_TESTS', False)
]
if '+netcdf' in self.spec:
args.extend([
# Prevent possible overriding by environment variables
# NETCDF_ROOT, NETCDF_DIR, and NETCDF_PATH:
self.define('NETCDF_PATH', self.spec['netcdf-c'].prefix),
# Prevent overriding by environment variable HDF5_ROOT:
self.define('HDF5_ROOT', self.spec['hdf5'].prefix)])
if jp2k == 'openjpeg':
args.append(self.define('OPENJPEG_PATH',
self.spec['openjpeg'].prefix))
if '+png' in self.spec:
args.append(self.define('ZLIB_ROOT', self.spec['zlib'].prefix))
if '+aec' in self.spec:
# Prevent overriding by environment variables AEC_DIR and AEC_PATH:
args.append(self.define('AEC_DIR', self.spec['libaec'].prefix))
if '^python' in self.spec:
args.append(self.define('PYTHON_EXECUTABLE', python.path))
definitions = self.spec.variants['definitions'].value
if 'auto' not in definitions:
args.append(self.define('ENABLE_INSTALL_ECCODES_DEFINITIONS',
'default' in definitions))
samples = self.spec.variants['samples'].value
if 'auto' not in samples:
args.append(self.define('ENABLE_INSTALL_ECCODES_SAMPLES',
'default' in samples))
return args
@run_after('install')
def install_extra_definitions(self):
noop = set(['auto', 'none', 'default'])
for center in self.spec.variants['definitions'].value:
if center not in noop:
center_dir = 'definitions.{0}'.format(center)
install_tree(
join_path(self.stage.source_path,
'spack-definitions', center_dir),
join_path(self.prefix.share.eccodes, center_dir))
def check(self):
# https://confluence.ecmwf.int/display/ECC/ecCodes+installation
with working_dir(self.build_directory):
ctest()
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-diptest/package.py
|
# Copyright 2013-2022 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)
from spack import *
class RDiptest(RPackage):
"""Hartigan's Dip Test Statistic for Unimodality - Corrected.
Compute Hartigan's dip test statistic for unimodality /; multimodality and
provide a test with simulation based p-values, where; the original public
code has been corrected."""
cran = "diptest"
version('0.76-0', sha256='508a5ebb161519cd0fcd156dc047b51becb216d545d62c6522496463f94ec280')
version('0.75-7', sha256='462900100ca598ef21dbe566bf1ab2ce7c49cdeab6b7a600a50489b05f61b61b')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-pythran/package.py
|
<filename>var/spack/repos/builtin/packages/py-pythran/package.py
# Copyright 2013-2022 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 sys
from spack import *
class PyPythran(PythonPackage):
"""Ahead of Time compiler for numeric kernels."""
homepage = "https://github.com/serge-sans-paille/pythran"
pypi = "pythran/pythran-0.9.11.tar.gz"
version('0.10.0', sha256='9dac8e1d50f33d4676003e350b1f0c878ce113e6f907920e92dc103352cac5bf')
version('0.9.12', sha256='5d50dc74dca1d3f902941865acbae981fc24cceeb9d54673d68d6b5c8c1b0001')
version('0.9.11', sha256='a317f91e2aade9f6550dc3bf40b5caeb45b7e012daf27e2b3e4ad928edb01667')
version('0.9.10', sha256='8fa1d19624cb2950e5a18974fdcb0dffc57e1a821049dc95df09563edd673915')
version('0.9.9', sha256='aaabc97f30ad46d1d62303323de6697d2933779afa4666c15b0f433cb50825b1')
version('0.9.8', sha256='81c10a16fce9ed41211fb70e82fda6984e93f4602a164934648db8cbb08156b3')
version('0.9.7', sha256='ac36a94bd862e3c80dae585158b90d3e7c5c05fd252819f3ca7d880a1c7c1012')
version('0.9.6', sha256='2d102a55d9d53f77cf0f4a904eeb5cbaa8fe76e4892319a859fc618401e2f6ba')
version('0.9.5', sha256='815a778d6889593c0b8ddf08052cff36a504ce4cc8bd8d7bfb856a212f91486e')
version('0.9.4', sha256='ec9c91f5331454263b064027292556a184a9f55a50f8615e09b08f57a4909855')
version('0.9.3', sha256='217427a8225a331fdc8f3efe57871aed775cdf2c6e847a0a83df0aaae4b02493')
depends_on('python@3:', when='@0.9.6:', type=('build', 'run'))
depends_on('python@2.7:', when='@:0.9.5', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('py-pytest-runner', type='build', when='@:0.9')
depends_on('py-ply@3.4:', type=('build', 'run'))
depends_on('py-networkx@2:', when='@:0.9.11', type=('build', 'run'))
depends_on('py-decorator', when='@:0.9.11', type=('build', 'run'))
depends_on('py-gast@0.5.0:0.5', when='@0.9.12:', type=('build', 'run'))
depends_on('py-gast@0.4.0:0.4', when='@0.9.7:0.9.11', type=('build', 'run'))
depends_on('py-gast@0.3.3:0.3', when='@0.9.6', type=('build', 'run'))
depends_on('py-gast@0.3.0:', when='@0.9.4:0.9.5', type=('build', 'run'))
depends_on('py-gast', when='@:0.9.3', type=('build', 'run'))
depends_on('py-six', when='@:0.9.11', type=('build', 'run'))
depends_on('py-numpy', type=('build', 'run'))
depends_on('py-beniget@0.4.0:0.4', when='@0.9.12:', type=('build', 'run'))
depends_on('py-beniget@0.3.0:0.3', when='@0.9.7:0.9.11', type=('build', 'run'))
depends_on('py-beniget@0.2.1:0.2', when='@0.9.6', type=('build', 'run'))
depends_on('py-beniget@0.2.0:', when='@0.9.4:0.9.5', type=('build', 'run'))
depends_on('py-beniget', when='@:0.9.3', type=('build', 'run'))
depends_on('llvm-openmp', when='%apple-clang', type=('build', 'run'))
# https://github.com/serge-sans-paille/pythran/pull/1856
patch('omp.patch', when='@0.9.10:0.9.12')
def patch(self):
# Compiler is used at run-time to determine name of OpenMP library to search for
cfg_file = join_path('pythran', 'pythran-{0}.cfg'.format(sys.platform))
filter_file('CXX=', 'CXX=' + self.compiler.cxx, cfg_file)
def setup_build_environment(self, env):
# Needed for `spack install --test=root py-pythran`
if self.spec.satisfies('%apple-clang'):
env.prepend_path(
'DYLD_FALLBACK_LIBRARY_PATH',
self.spec['llvm-openmp'].libs.directories[0]
)
def setup_run_environment(self, env):
# Needed for `spack test run py-pythran`
self.setup_build_environment(env)
def setup_dependent_build_environment(self, env, dependent_spec):
# Needed for `spack install py-scipy`
self.setup_build_environment(env)
def setup_dependent_run_environment(self, env, dependent_spec):
# Probably needed for something?
self.setup_build_environment(env)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-hepdata-lib/package.py
|
# Copyright 2013-2022 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)
from spack import *
class PyHepdataLib(PythonPackage):
"""Library for getting your data into HEPData"""
homepage = "https://github.com/HEPData/hepdata_lib"
pypi = "hepdata_lib/hepdata_lib-0.9.0.tar.gz"
version('0.9.0', sha256='b7b194b8af0428f34094ac403f8794a672c82d85e33154161d6b3744cc2b9896')
depends_on('py-setuptools', type='build')
depends_on('root+python', type=('build', 'run'))
depends_on('py-numpy', type=('build', 'run'))
depends_on('py-pyyaml@4:', type=('build', 'run'))
depends_on('py-future', type=('build', 'run'))
depends_on('py-six', type=('build', 'run'))
depends_on('py-pytest-runner', type='build')
depends_on('py-pytest-cov', type='build')
|
player1537-forks/spack
|
lib/spack/spack/user_environment.py
|
<filename>lib/spack/spack/user_environment.py<gh_stars>10-100
# Copyright 2013-2022 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 os
import sys
import spack.build_environment
import spack.config
import spack.util.environment as environment
import spack.util.prefix as prefix
#: Environment variable name Spack uses to track individually loaded packages
spack_loaded_hashes_var = 'SPACK_LOADED_HASHES'
def prefix_inspections(platform):
"""Get list of prefix inspections for platform
Arguments:
platform (str): the name of the platform to consider. The platform
determines what environment variables Spack will use for some
inspections.
Returns:
A dictionary mapping subdirectory names to lists of environment
variables to modify with that directory if it exists.
"""
inspections = spack.config.get('modules:prefix_inspections', {})
if inspections:
return inspections
inspections = {
'bin': ['PATH'],
'lib': ['LD_LIBRARY_PATH', 'LIBRARY_PATH'],
'lib64': ['LD_LIBRARY_PATH', 'LIBRARY_PATH'],
'man': ['MANPATH'],
'share/man': ['MANPATH'],
'share/aclocal': ['ACLOCAL_PATH'],
'include': ['CPATH'],
'lib/pkgconfig': ['PKG_CONFIG_PATH'],
'lib64/pkgconfig': ['PKG_CONFIG_PATH'],
'share/pkgconfig': ['PKG_CONFIG_PATH'],
'': ['CMAKE_PREFIX_PATH']
}
if platform == 'darwin':
for subdir in ('lib', 'lib64'):
inspections[subdir].append('DYLD_FALLBACK_LIBRARY_PATH')
return inspections
def unconditional_environment_modifications(view):
"""List of environment (shell) modifications to be processed for view.
This list does not depend on the specs in this environment"""
env = environment.EnvironmentModifications()
for subdir, vars in prefix_inspections(sys.platform).items():
full_subdir = os.path.join(view.root, subdir)
for var in vars:
env.prepend_path(var, full_subdir)
return env
def environment_modifications_for_spec(spec, view=None, set_package_py_globals=True):
"""List of environment (shell) modifications to be processed for spec.
This list is specific to the location of the spec or its projection in
the view.
Args:
spec (spack.spec.Spec): spec for which to list the environment modifications
view: view associated with the spec passed as first argument
set_package_py_globals (bool): whether or not to set the global variables in the
package.py files (this may be problematic when using buildcaches that have
been built on a different but compatible OS)
"""
spec = spec.copy()
if view and not spec.external:
spec.prefix = prefix.Prefix(view.get_projection_for_spec(spec))
# generic environment modifications determined by inspecting the spec
# prefix
env = environment.inspect_path(
spec.prefix,
prefix_inspections(spec.platform),
exclude=environment.is_system_path
)
# Let the extendee/dependency modify their extensions/dependents
# before asking for package-specific modifications
env.extend(
spack.build_environment.modifications_from_dependencies(
spec, context='run', set_package_py_globals=set_package_py_globals
)
)
if set_package_py_globals:
spack.build_environment.set_module_variables_for_package(spec.package)
spec.package.setup_run_environment(env)
return env
|
player1537-forks/spack
|
var/spack/repos/builtin.mock/packages/dep-diamond-patch-mid2/package.py
|
<reponame>player1537-forks/spack<gh_stars>10-100
# Copyright 2013-2022 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)
from spack import *
class DepDiamondPatchMid2(Package):
r"""Package that requires a patch on a dependency
W
/ \
X Y
\ /
Z
This is package Y
"""
homepage = "http://www.example.com"
url = "http://www.example.com/patch-a-dependency-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')
# single patch file in repo
depends_on('patch', patches=[
patch('http://example.com/urlpatch.patch',
sha256='mid21234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234'), # noqa: E501
])
|
player1537-forks/spack
|
lib/spack/external/macholib/MachO.py
|
<reponame>player1537-forks/spack<gh_stars>10-100
"""
Utilities for reading and writing Mach-O headers
"""
from __future__ import print_function
import os
import struct
import sys
from macholib.util import fileview
from .mach_o import (
FAT_MAGIC,
FAT_MAGIC_64,
LC_DYSYMTAB,
LC_ID_DYLIB,
LC_LOAD_DYLIB,
LC_LOAD_UPWARD_DYLIB,
LC_LOAD_WEAK_DYLIB,
LC_PREBOUND_DYLIB,
LC_REEXPORT_DYLIB,
LC_REGISTRY,
LC_SEGMENT,
LC_SEGMENT_64,
LC_SYMTAB,
MH_CIGAM,
MH_CIGAM_64,
MH_FILETYPE_SHORTNAMES,
MH_MAGIC,
MH_MAGIC_64,
S_ZEROFILL,
fat_arch,
fat_arch64,
fat_header,
load_command,
mach_header,
mach_header_64,
section,
section_64,
)
from .ptypes import sizeof
try:
from macholib.compat import bytes
except ImportError:
pass
try:
unicode
except NameError:
unicode = str
if sys.version_info[0] == 2:
range = xrange # noqa: F821
__all__ = ["MachO"]
_RELOCATABLE = {
# relocatable commands that should be used for dependency walking
LC_LOAD_DYLIB,
LC_LOAD_UPWARD_DYLIB,
LC_LOAD_WEAK_DYLIB,
LC_PREBOUND_DYLIB,
LC_REEXPORT_DYLIB,
}
_RELOCATABLE_NAMES = {
LC_LOAD_DYLIB: "load_dylib",
LC_LOAD_UPWARD_DYLIB: "load_upward_dylib",
LC_LOAD_WEAK_DYLIB: "load_weak_dylib",
LC_PREBOUND_DYLIB: "prebound_dylib",
LC_REEXPORT_DYLIB: "reexport_dylib",
}
def _shouldRelocateCommand(cmd):
"""
Should this command id be investigated for relocation?
"""
return cmd in _RELOCATABLE
def lc_str_value(offset, cmd_info):
"""
Fetch the actual value of a field of type "lc_str"
"""
cmd_load, cmd_cmd, cmd_data = cmd_info
offset -= sizeof(cmd_load) + sizeof(cmd_cmd)
return cmd_data[offset:].strip(b"\x00")
class MachO(object):
"""
Provides reading/writing the Mach-O header of a specific existing file
"""
# filename - the original filename of this mach-o
# sizediff - the current deviation from the initial mach-o size
# header - the mach-o header
# commands - a list of (load_command, somecommand, data)
# data is either a str, or a list of segment structures
# total_size - the current mach-o header size (including header)
# low_offset - essentially, the maximum mach-o header size
# id_cmd - the index of my id command, or None
def __init__(self, filename):
# supports the ObjectGraph protocol
self.graphident = filename
self.filename = filename
self.loader_path = os.path.dirname(filename)
# initialized by load
self.fat = None
self.headers = []
with open(filename, "rb") as fp:
self.load(fp)
def __repr__(self):
return "<MachO filename=%r>" % (self.filename,)
def load(self, fh):
assert fh.tell() == 0
header = struct.unpack(">I", fh.read(4))[0]
fh.seek(0)
if header in (FAT_MAGIC, FAT_MAGIC_64):
self.load_fat(fh)
else:
fh.seek(0, 2)
size = fh.tell()
fh.seek(0)
self.load_header(fh, 0, size)
def load_fat(self, fh):
self.fat = fat_header.from_fileobj(fh)
if self.fat.magic == FAT_MAGIC:
archs = [fat_arch.from_fileobj(fh) for i in range(self.fat.nfat_arch)]
elif self.fat.magic == FAT_MAGIC_64:
archs = [fat_arch64.from_fileobj(fh) for i in range(self.fat.nfat_arch)]
else:
raise ValueError("Unknown fat header magic: %r" % (self.fat.magic))
for arch in archs:
self.load_header(fh, arch.offset, arch.size)
def rewriteLoadCommands(self, *args, **kw):
changed = False
for header in self.headers:
if header.rewriteLoadCommands(*args, **kw):
changed = True
return changed
def load_header(self, fh, offset, size):
fh.seek(offset)
header = struct.unpack(">I", fh.read(4))[0]
fh.seek(offset)
if header == MH_MAGIC:
magic, hdr, endian = MH_MAGIC, mach_header, ">"
elif header == MH_CIGAM:
magic, hdr, endian = MH_CIGAM, mach_header, "<"
elif header == MH_MAGIC_64:
magic, hdr, endian = MH_MAGIC_64, mach_header_64, ">"
elif header == MH_CIGAM_64:
magic, hdr, endian = MH_CIGAM_64, mach_header_64, "<"
else:
raise ValueError("Unknown Mach-O header: 0x%08x in %r" % (header, fh))
hdr = MachOHeader(self, fh, offset, size, magic, hdr, endian)
self.headers.append(hdr)
def write(self, f):
for header in self.headers:
header.write(f)
class MachOHeader(object):
"""
Provides reading/writing the Mach-O header of a specific existing file
"""
# filename - the original filename of this mach-o
# sizediff - the current deviation from the initial mach-o size
# header - the mach-o header
# commands - a list of (load_command, somecommand, data)
# data is either a str, or a list of segment structures
# total_size - the current mach-o header size (including header)
# low_offset - essentially, the maximum mach-o header size
# id_cmd - the index of my id command, or None
def __init__(self, parent, fh, offset, size, magic, hdr, endian):
self.MH_MAGIC = magic
self.mach_header = hdr
# These are all initialized by self.load()
self.parent = parent
self.offset = offset
self.size = size
self.endian = endian
self.header = None
self.commands = None
self.id_cmd = None
self.sizediff = None
self.total_size = None
self.low_offset = None
self.filetype = None
self.headers = []
self.load(fh)
def __repr__(self):
return "<%s filename=%r offset=%d size=%d endian=%r>" % (
type(self).__name__,
self.parent.filename,
self.offset,
self.size,
self.endian,
)
def load(self, fh):
fh = fileview(fh, self.offset, self.size)
fh.seek(0)
self.sizediff = 0
kw = {"_endian_": self.endian}
header = self.mach_header.from_fileobj(fh, **kw)
self.header = header
# if header.magic != self.MH_MAGIC:
# raise ValueError("header has magic %08x, expecting %08x" % (
# header.magic, self.MH_MAGIC))
cmd = self.commands = []
self.filetype = self.get_filetype_shortname(header.filetype)
read_bytes = 0
low_offset = sys.maxsize
for i in range(header.ncmds):
# read the load command
cmd_load = load_command.from_fileobj(fh, **kw)
# read the specific command
klass = LC_REGISTRY.get(cmd_load.cmd, None)
if klass is None:
raise ValueError("Unknown load command: %d" % (cmd_load.cmd,))
cmd_cmd = klass.from_fileobj(fh, **kw)
if cmd_load.cmd == LC_ID_DYLIB:
# remember where this command was
if self.id_cmd is not None:
raise ValueError("This dylib already has an id")
self.id_cmd = i
if cmd_load.cmd in (LC_SEGMENT, LC_SEGMENT_64):
# for segment commands, read the list of segments
segs = []
# assert that the size makes sense
if cmd_load.cmd == LC_SEGMENT:
section_cls = section
else: # LC_SEGMENT_64
section_cls = section_64
expected_size = (
sizeof(klass)
+ sizeof(load_command)
+ (sizeof(section_cls) * cmd_cmd.nsects)
)
if cmd_load.cmdsize != expected_size:
raise ValueError("Segment size mismatch")
# this is a zero block or something
# so the beginning is wherever the fileoff of this command is
if cmd_cmd.nsects == 0:
if cmd_cmd.filesize != 0:
low_offset = min(low_offset, cmd_cmd.fileoff)
else:
# this one has multiple segments
for _j in range(cmd_cmd.nsects):
# read the segment
seg = section_cls.from_fileobj(fh, **kw)
# if the segment has a size and is not zero filled
# then its beginning is the offset of this segment
not_zerofill = (seg.flags & S_ZEROFILL) != S_ZEROFILL
if seg.offset > 0 and seg.size > 0 and not_zerofill:
low_offset = min(low_offset, seg.offset)
if not_zerofill:
c = fh.tell()
fh.seek(seg.offset)
sd = fh.read(seg.size)
seg.add_section_data(sd)
fh.seek(c)
segs.append(seg)
# data is a list of segments
cmd_data = segs
# These are disabled for now because writing back doesn't work
# elif cmd_load.cmd == LC_CODE_SIGNATURE:
# c = fh.tell()
# fh.seek(cmd_cmd.dataoff)
# cmd_data = fh.read(cmd_cmd.datasize)
# fh.seek(c)
# elif cmd_load.cmd == LC_SYMTAB:
# c = fh.tell()
# fh.seek(cmd_cmd.stroff)
# cmd_data = fh.read(cmd_cmd.strsize)
# fh.seek(c)
else:
# data is a raw str
data_size = cmd_load.cmdsize - sizeof(klass) - sizeof(load_command)
cmd_data = fh.read(data_size)
cmd.append((cmd_load, cmd_cmd, cmd_data))
read_bytes += cmd_load.cmdsize
# make sure the header made sense
if read_bytes != header.sizeofcmds:
raise ValueError(
"Read %d bytes, header reports %d bytes"
% (read_bytes, header.sizeofcmds)
)
self.total_size = sizeof(self.mach_header) + read_bytes
self.low_offset = low_offset
def walkRelocatables(self, shouldRelocateCommand=_shouldRelocateCommand):
"""
for all relocatable commands
yield (command_index, command_name, filename)
"""
for (idx, (lc, cmd, data)) in enumerate(self.commands):
if shouldRelocateCommand(lc.cmd):
name = _RELOCATABLE_NAMES[lc.cmd]
ofs = cmd.name - sizeof(lc.__class__) - sizeof(cmd.__class__)
yield idx, name, data[
ofs : data.find(b"\x00", ofs) # noqa: E203
].decode(sys.getfilesystemencoding())
def rewriteInstallNameCommand(self, loadcmd):
"""Rewrite the load command of this dylib"""
if self.id_cmd is not None:
self.rewriteDataForCommand(self.id_cmd, loadcmd)
return True
return False
def changedHeaderSizeBy(self, bytes):
self.sizediff += bytes
if (self.total_size + self.sizediff) > self.low_offset:
print(
"WARNING: Mach-O header in %r may be too large to relocate"
% (self.parent.filename,)
)
def rewriteLoadCommands(self, changefunc):
"""
Rewrite the load commands based upon a change dictionary
"""
data = changefunc(self.parent.filename)
changed = False
if data is not None:
if self.rewriteInstallNameCommand(data.encode(sys.getfilesystemencoding())):
changed = True
for idx, _name, filename in self.walkRelocatables():
data = changefunc(filename)
if data is not None:
if self.rewriteDataForCommand(
idx, data.encode(sys.getfilesystemencoding())
):
changed = True
return changed
def rewriteDataForCommand(self, idx, data):
lc, cmd, old_data = self.commands[idx]
hdrsize = sizeof(lc.__class__) + sizeof(cmd.__class__)
align = struct.calcsize("Q")
data = data + (b"\x00" * (align - (len(data) % align)))
newsize = hdrsize + len(data)
self.commands[idx] = (lc, cmd, data)
self.changedHeaderSizeBy(newsize - lc.cmdsize)
lc.cmdsize, cmd.name = newsize, hdrsize
return True
def synchronize_size(self):
if (self.total_size + self.sizediff) > self.low_offset:
raise ValueError(
(
"New Mach-O header is too large to relocate in %r "
"(new size=%r, max size=%r, delta=%r)"
)
% (
self.parent.filename,
self.total_size + self.sizediff,
self.low_offset,
self.sizediff,
)
)
self.header.sizeofcmds += self.sizediff
self.total_size = sizeof(self.mach_header) + self.header.sizeofcmds
self.sizediff = 0
def write(self, fileobj):
fileobj = fileview(fileobj, self.offset, self.size)
fileobj.seek(0)
# serialize all the mach-o commands
self.synchronize_size()
self.header.to_fileobj(fileobj)
for lc, cmd, data in self.commands:
lc.to_fileobj(fileobj)
cmd.to_fileobj(fileobj)
if sys.version_info[0] == 2:
if isinstance(data, unicode):
fileobj.write(data.encode(sys.getfilesystemencoding()))
elif isinstance(data, (bytes, str)):
fileobj.write(data)
else:
# segments..
for obj in data:
obj.to_fileobj(fileobj)
else:
if isinstance(data, str):
fileobj.write(data.encode(sys.getfilesystemencoding()))
elif isinstance(data, bytes):
fileobj.write(data)
else:
# segments..
for obj in data:
obj.to_fileobj(fileobj)
# zero out the unused space, doubt this is strictly necessary
# and is generally probably already the case
fileobj.write(b"\x00" * (self.low_offset - fileobj.tell()))
def getSymbolTableCommand(self):
for lc, cmd, _data in self.commands:
if lc.cmd == LC_SYMTAB:
return cmd
return None
def getDynamicSymbolTableCommand(self):
for lc, cmd, _data in self.commands:
if lc.cmd == LC_DYSYMTAB:
return cmd
return None
def get_filetype_shortname(self, filetype):
if filetype in MH_FILETYPE_SHORTNAMES:
return MH_FILETYPE_SHORTNAMES[filetype]
else:
return "unknown"
def main(fn):
m = MachO(fn)
seen = set()
for header in m.headers:
for _idx, name, other in header.walkRelocatables():
if other not in seen:
seen.add(other)
print("\t" + name + ": " + other)
if __name__ == "__main__":
import sys
files = sys.argv[1:] or ["/bin/ls"]
for fn in files:
print(fn)
main(fn)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-rjson/package.py
|
<gh_stars>10-100
# Copyright 2013-2022 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)
from spack import *
class RRjson(RPackage):
"""JSON for R.
Converts R object into JSON objects and vice-versa."""
cran = "rjson"
version('0.2.21', sha256='982b56d35ccc0c7db0b20c1d3eab5f5f47c620309646fdc278ff1cc3433ea2e2')
version('0.2.20', sha256='3a287c1e5ee7c333ed8385913c0a307daf99335fbdf803e9dcca6e3d5adb3f6c')
version('0.2.19', sha256='5c2672461986f2b715416cab92ed262abe9875f31299bc8a1a072ef7c6dd49bc')
version('0.2.15', sha256='77d00d8f6a1c936329b46f3b8b0be79a165f8c5f1989497f942ecc53dcf6f2ef')
depends_on('r@3.1.0:', type=('build', 'run'))
depends_on('r@4.0.0:', type=('build', 'run'), when='@0.2.21:')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-gargle/package.py
|
# Copyright 2013-2022 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)
from spack import *
class RGargle(RPackage):
"""Utilities for Working with Google APIs.
Provides utilities for working with Google APIs
<https://developers.google.com/apis-explorer>. This includes functions and
classes for handling common credential types and for preparing, executing,
and processing HTTP requests."""
cran = "gargle"
version('1.2.0', sha256='4d46ca2933f19429ca5a2cfe47b4130a75c7cd9931c7758ade55bac0c091d73b')
depends_on('r@3.3:', type=('build', 'run'))
depends_on('r-cli@3.0.0:', type=('build', 'run'))
depends_on('r-fs@1.3.1:', type=('build', 'run'))
depends_on('r-glue@1.3.0:', type=('build', 'run'))
depends_on('r-httr@1.4.0:', type=('build', 'run'))
depends_on('r-jsonlite', type=('build', 'run'))
depends_on('r-rappdirs', type=('build', 'run'))
depends_on('r-rlang@0.4.9:', type=('build', 'run'))
depends_on('r-rstudioapi', type=('build', 'run'))
depends_on('r-withr', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/sysget/package.py
|
<reponame>player1537-forks/spack<filename>var/spack/repos/builtin/packages/sysget/package.py
# Copyright 2013-2022 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 os
from spack import *
class Sysget(MakefilePackage):
"""sysget is a bridge that lets you use one syntax to every
package manager on every unix-based operating system."""
homepage = "https://github.com/emilengler/sysget"
url = "https://github.com/emilengler/sysget/archive/v2.3.tar.gz"
version('2.3', sha256='bba647bfd7093d18ee2b471a79f0cc50d84846aa3a04d790244acfefded79477')
version('2.2', sha256='8f55ee8402d6de3cc16fa0577148b484e35da6688ad5f3ee3e9c1be04c88863a')
version('2.1', sha256='0590aaae10494ca76c6749264925feb0e40b6e4b3822a8a4d148761addcb66c1')
def edit(self, spec, prefix):
if os.path.exists('Makefile'):
makefile = FileFilter('Makefile')
elif os.path.exists('makefile'):
makefile = FileFilter('makefile')
makefile.filter(r'/usr/local/bin', self.prefix.bin)
makefile.filter(r'/usr/local/man', self.prefix.man)
makefile.filter(r'/etc', self.prefix.etc)
@run_before('install')
def create_install_directory(self):
mkdirp(join_path(self.prefix, 'bin'))
mkdirp(join_path(self.prefix, 'man'))
mkdirp(join_path(self.prefix, 'etc', 'bash_completion.d'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-fiscalyear/package.py
|
<filename>var/spack/repos/builtin/packages/py-fiscalyear/package.py
# Copyright 2013-2022 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)
from spack import *
class PyFiscalyear(PythonPackage):
"""fiscalyear is a small, lightweight Python module providing helpful
utilities for managing the fiscal calendar.
It is designed as an extension of the built-in datetime and calendar
modules, adding the ability to query the fiscal year, fiscal quarter,
fiscal month, and fiscal day of a date or datetime object."""
homepage = "https://github.com/adamjstewart/fiscalyear"
pypi = "fiscalyear/fiscalyear-0.2.0.tar.gz"
git = "https://github.com/adamjstewart/fiscalyear.git"
maintainers = ['adamjstewart']
version('master', branch='master')
version('0.4.0', sha256='12857a48bd7b97bda78d833b29e81f30ec5aa018241f690e714b472b25fa1b47')
version('0.3.2', sha256='0697b2af4ab2d4c6188fac33d340f31dea9b0e1f0d3666d6752faeedd744f019')
version('0.3.1', sha256='5964b4be71453c1fa5da804343cea866e0299aff874aa59ae186a8a9b9ff62d0')
version('0.3.0', sha256='64f97b3a0ab6b2857d09f0016bd3aae37646a454a5c2c66e907fef03ae54a816')
version('0.2.0', sha256='f513616aeb03046406c56d7c69cd9e26f6a12963c71c1410cc3d4532a5bfee71')
version('0.1.0', sha256='3fde4a12eeb72da446beb487e078adf1223a92d130520e589b82d7d1509701a2')
depends_on('python@3.6:', when='@0.4:', type=('build', 'run'))
depends_on('python@2.5:', type=('build', 'run'))
depends_on('py-setuptools@42:', when='@0.4:', type='build')
depends_on('py-setuptools', type='build')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-emmli/package.py
|
<filename>var/spack/repos/builtin/packages/r-emmli/package.py
# Copyright 2013-2022 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)
from spack import *
class REmmli(RPackage):
"""A Maximum Likelihood Approach to the Analysis of Modularity.
Fit models of modularity to morphological landmarks. Perform model
selection on results. Fit models with a single within-module correlation or
with separate within-module correlations fitted to each module."""
cran = "EMMLi"
version('0.0.3', sha256='57c04953200d2253bc90b0035dc590179d1b959768bfa7fdac92b6bcbf9f66ac')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/libwebsockets/package.py
|
<filename>var/spack/repos/builtin/packages/libwebsockets/package.py
# Copyright 2013-2022 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)
from spack import *
class Libwebsockets(CMakePackage):
"""C library for lightweight websocket clients and servers."""
homepage = "https://github.com/warmcat/libwebsockets"
url = "https://github.com/warmcat/libwebsockets/archive/v2.1.0.tar.gz"
maintainers = ['ax3l']
version('2.2.1', sha256='e7f9eaef258e003c9ada0803a9a5636757a5bc0a58927858834fb38a87d18ad2')
version('2.1.1', sha256='96183cbdfcd6e6a3d9465e854a924b7bfde6c8c6d3384d6159ad797c2e823b4d')
version('2.1.0', sha256='bcc96aaa609daae4d3f7ab1ee480126709ef4f6a8bf9c85de40aae48e38cce66')
version('2.0.3', sha256='cf0e91b564c879ab98844385c98e7c9e298cbb969dbc251a3f18a47feb94342c')
version('1.7.9', sha256='86a5105881ea2cb206f8795483d294e9509055decf60436bcc1e746262416438')
depends_on('zlib')
depends_on('openssl')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-fury/package.py
|
# Copyright 2013-2022 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)
from spack import *
class PyFury(PythonPackage):
"""Free Unified Rendering in Python."""
homepage = "https://github.com/fury-gl/fury"
pypi = "fury/fury-0.7.1.tar.gz"
version('0.7.1', sha256='bc7bdbdf1632f317f40c717c2f34a6b8424ce5abda3ebda31a058c0b725a316a')
depends_on('python@2.7:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('py-numpy@1.7.1:', type=('build', 'run'))
depends_on('py-scipy@1.2:', type=('build', 'run')) # from requirements/default.txt
depends_on('vtk+python@8.1.2:8,9.0.1:', type=('build', 'run'))
depends_on('pil@5.4.1:', type=('build', 'run'))
depends_on('py-codecov', type='test')
depends_on('py-coverage', type='test')
depends_on('py-flake8', type='test')
depends_on('py-pytest', type='test')
@run_after('install')
@on_package_attributes(run_tests=True)
def install_test(self):
with working_dir('spack-test', create=True):
pytest = which('pytest')
pytest(join_path(python_purelib, 'fury'),
# 'Some warning' is not propagated to __warningregistry__ so
# that the test fails, disable it for now
# running all tests manually after the package is installed
# works
'-k', 'not test_clear_and_catch_warnings')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-rgl/package.py
|
# Copyright 2013-2022 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)
from spack import *
class RRgl(RPackage):
"""3D Visualization Using OpenGL.
Provides medium to high level functions for 3D interactive graphics,
including functions modelled on base graphics (plot3d(), etc.) as well as
functions for constructing representations of geometric objects (cube3d(),
etc.). Output may be on screen using OpenGL, or to various standard 3D file
formats including WebGL, PLY, OBJ, STL as well as 2D image formats,
including PNG, Postscript, SVG, PGF."""
cran = "rgl"
version('0.108.3', sha256='89f96eb462cacfcc796ad351d7dac0480a7eb9f80e9bd75e58c5a79f0ee8133b')
version('0.104.16', sha256='b82d2e2b965e76d6cc55bbd15ee0f79c36913ab09ce5436d2104551563462a99')
version('0.100.26', sha256='e1889c2723ad458b39fdf9366fdaf590d7657d3762748f8534a8491ef754e740')
version('0.100.24', sha256='1233a7bdc5a2b908fc64d5f56e92a0e123e8f7c0b9bac93dfd005608b78fa35a')
version('0.100.19', sha256='50630702554e422e0603f27d499aad3b6f822de5a73da7fdf70404ac50df7025')
version('0.99.16', sha256='692a545ed2ff0f5e15289338736f0e3c092667574c43ac358d8004901d7a1a61')
version('0.98.1', sha256='5f49bed9e092e672f73c8a1a5365cdffcda06db0315ac087e95ab9c9c71a6986')
depends_on('r+X', type=('build', 'run'))
depends_on('r@3.2.0:', type=('build', 'run'))
depends_on('r@3.3.0:', type=('build', 'run'), when='@0.108.3:')
depends_on('r-htmlwidgets', type=('build', 'run'))
depends_on('r-htmltools', type=('build', 'run'))
depends_on('r-knitr', type=('build', 'run'))
depends_on('r-knitr@1.33:', type=('build', 'run'), when='@0.108.3:')
depends_on('r-jsonlite@0.9.20:', type=('build', 'run'))
depends_on('r-magrittr', type=('build', 'run'))
depends_on('r-r6', type=('build', 'run'), when='@0.108.3:')
depends_on('libx11')
depends_on('gl')
depends_on('glu')
depends_on('zlib', type='link')
depends_on('libpng@1.2.9:', type='link')
depends_on('freetype', type='link')
depends_on('pandoc@1.14:', type='build')
depends_on('r-shiny', type=('build', 'run'), when='@:0.104.16')
depends_on('r-crosstalk', type=('build', 'run'), when='@0.99.16:0.104.16')
depends_on('r-manipulatewidget@0.9.0:', type=('build', 'run'), when='@0.99.16:0.104.16')
def configure_args(self):
args = ['--x-includes=%s' % self.spec['libx11'].prefix.include,
'--x-libraries=%s' % self.spec['libx11'].prefix.lib,
'--with-gl-includes=%s' % self.spec['gl'].prefix.include,
'--with-gl-libraries=%s' % self.spec['gl'].prefix.lib,
'--with-gl-prefix=%s' % self.spec['gl'].prefix]
return args
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/modeltest-ng/package.py
|
# Copyright 2013-2022 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)
from spack import *
class ModeltestNg(CMakePackage):
"""Best-fit model selection"""
homepage = "https://github.com/ddarriba/modeltest"
url = "https://github.com/ddarriba/modeltest/archive/refs/tags/v0.1.7.tar.gz"
git = "https://github.com/ddarriba/modeltest.git"
maintainers = ['dorton21']
version('0.1.7', commit="<PASSWORD>", submodules=True)
variant('mpi', default=False, description="Enable MPI")
depends_on('glib')
depends_on('bison', type='build')
depends_on('flex', type='build')
depends_on('openmpi', when='+mpi')
def cmake_args(self):
return [
self.define_from_variant('ENABLE_MPI', 'mpi')]
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-delayedarray/package.py
|
# Copyright 2013-2022 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)
from spack import *
class RDelayedarray(RPackage):
"""A unified framework for working transparently with on-disk and in-memory
array-like datasets.
Wrapping an array-like object (typically an on-disk object) in a
DelayedArray object allows one to perform common array operations on it
without loading the object in memory. In order to reduce memory usage
and optimize performance, operations on the object are either delayed or
executed using a block processing mechanism. Note that this also works
on in-memory array-like objects like DataFrame objects (typically with
Rle columns), Matrix objects, and ordinary arrays and data frames."""
bioc = "DelayedArray"
version('0.20.0', commit='<KEY>')
version('0.16.1', commit='c95eba771ad3fee1b49ec38c51cd8fd1486feadc')
version('0.10.0', commit='<KEY>')
version('0.8.0', commit='7c23cf46558de9dbe7a42fba516a9bb660a0f19f')
version('0.6.6', commit='bdb0ac0eee71edd40ccca4808f618fa77f595a64')
version('0.4.1', commit='<PASSWORD>')
version('0.2.7', commit='<PASSWORD>ae2543172ead50abbe10bd42bc4')
depends_on('r@3.4:', type=('build', 'run'))
depends_on('r@4.0.0:', type=('build', 'run'), when='@0.20.0:')
depends_on('r-matrix', type=('build', 'run'), when='@0.10.0:')
depends_on('r-biocgenerics', type=('build', 'run'))
depends_on('r-biocgenerics@0.25.1:', type=('build', 'run'), when='@0.6.6:')
depends_on('r-biocgenerics@0.27.1:', type=('build', 'run'), when='@0.8.0:')
depends_on('r-biocgenerics@0.31.5:', type=('build', 'run'), when='@0.16.1:')
depends_on('r-biocgenerics@0.37.0:', type=('build', 'run'), when='@0.20.1:')
depends_on('r-matrixgenerics@1.1.3:', type=('build', 'run'), when='@0.16.1:')
depends_on('r-s4vectors@0.14.3:', type=('build', 'run'))
depends_on('r-s4vectors@0.15.3:', type=('build', 'run'), when='@0.4.1:')
depends_on('r-s4vectors@0.17.43:', type=('build', 'run'), when='@0.6.6:')
depends_on('r-s4vectors@0.19.15:', type=('build', 'run'), when='@0.8.0:')
depends_on('r-s4vectors@0.21.7:', type=('build', 'run'), when='@0.10.0:')
depends_on('r-s4vectors@0.27.2:', type=('build', 'run'), when='@0.16.1:')
depends_on('r-iranges', type=('build', 'run'))
depends_on('r-iranges@2.11.17:', type=('build', 'run'), when='@0.4.1:')
depends_on('r-iranges@2.17.3:', type=('build', 'run'), when='@0.10.0:')
depends_on('r-matrixstats', type=('build', 'run'), when='@:0.10.0')
depends_on('r-biocparallel', type=('build', 'run'), when='@0.6.6:0.10.0')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-diffobj/package.py
|
<reponame>player1537-forks/spack
# Copyright 2013-2022 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)
from spack import *
class RDiffobj(RPackage):
"""Diffs for R Objects.
Generate a colorized diff of two R objects for an intuitive visualization
of their differences."""
cran = "diffobj"
version('0.3.5', sha256='d860a79b1d4c9e369282d7391b539fe89228954854a65ba47181407c53e3cf60')
version('0.3.3', sha256='414e5573470b9565b9149a0a61c7e8344fb37f889d23dc4e131acc8aa62e6df4')
depends_on('r@3.1.0:', type=('build', 'run'))
depends_on('r-crayon@1.3.2:', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/ea-utils/package.py
|
# Copyright 2013-2022 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)
from spack import *
class EaUtils(MakefilePackage):
"""Command-line tools for processing biological sequencing data. Barcode
demultiplexing, adapter trimming, etc. Primarily written to support an
Illumina based pipeline - but should work with any FASTQs."""
homepage = "https://expressionanalysis.github.io/ea-utils/"
url = "https://github.com/ExpressionAnalysis/ea-utils/archive/1.04.807.tar.gz"
version('1.04.807', sha256='aa09d25e6aa7ae71d2ce4198a98e58d563f151f8ff248e4602fa437f12b8d05f')
depends_on('subversion')
depends_on('zlib')
depends_on('gsl')
depends_on('bamtools')
# perl module required for make check, which is included in the default
# target
depends_on('perl', type='build')
build_directory = 'clipper'
def edit(self, spec, prefix):
with working_dir('clipper'):
makefile = FileFilter('Makefile')
makefile.filter('/usr', prefix)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-dicekriging/package.py
|
# Copyright 2013-2022 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)
from spack import *
class RDicekriging(RPackage):
"""Kriging Methods for Computer Experiments.
Estimation, validation and prediction of kriging models. Important
functions: km, print.km, plot.km, predict.km."""
cran = "DiceKriging"
version('1.6.0', sha256='ab5d1332809f2bb16d156ed234b102eb9fbd6de792e4291f9f6ea4652215cb49')
version('1.5.8', sha256='11d02b894cb509dbb8887ae27b6d08ba25aa52ac3ece134c3759c2b3b1bf4d77')
version('1.5.6', sha256='25466d2db9f17083d1c7b9545e5ec88f630be934f9373c2f7b36c38de4e64e92')
version('1.5.5', sha256='55fe161f867a0c3772023c3047041b877aa54d29cb474ec87293ec31cc5cb30c')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-upsetr/package.py
|
<reponame>player1537-forks/spack
# Copyright 2013-2022 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)
from spack import *
class RUpsetr(RPackage):
"""A More Scalable Alternative to Venn and Euler Diagrams for Visualizing
Intersecting Sets.
Creates visualizations of intersecting sets using a novel matrix design,
along with visualizations of several common set, element and attribute
related tasks (Conway 2017) <doi:10.1093/bioinformatics/btx364>."""
cran = "UpSetR"
version('1.4.0', sha256='351e5fee64204cf77fd378cf2a2c0456cc19d4d98a2fd5f3dac74b69a505f100')
depends_on('r@3.0:', type=('build', 'run'))
depends_on('r-ggplot2', type=('build', 'run'))
depends_on('r-gridextra', type=('build', 'run'))
depends_on('r-plyr', type=('build', 'run'))
depends_on('r-scales', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/dialign/package.py
|
# Copyright 2013-2022 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)
from spack import *
class Dialign(MakefilePackage):
"""DIALIGN is a software program for multiple sequence alignment developed
by <NAME> et al.."""
homepage = "https://bibiserv.cebitec.uni-bielefeld.de/dialign"
url = "https://bibiserv.cebitec.uni-bielefeld.de/applications/dialign/resources/downloads/dialign-2.2.1-src.tar.gz"
version('2.2.1', sha256='046361bb4ca6e4ab2ac5e634cfcd673f964a887006c09c1b8bd3310fac86f519')
build_directory = 'src'
def install(self, spec, prefix):
mkdirp(prefix.bin)
install(join_path('src', 'dialign2-2'), prefix.bin)
mkdirp(prefix.share)
install_tree('dialign2_dir', prefix.share)
def setup_run_environment(self, env):
env.set('DIALIGN2_DIR', self.prefix.share)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-labeling/package.py
|
# Copyright 2013-2022 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)
from spack import *
class RLabeling(RPackage):
"""Axis Labeling.
Provides a range of axis labeling algorithms."""
cran = "labeling"
version('0.4.2', sha256='e022d79276173e0d62bf9e37d7574db65ab439eb2ae1833e460b1cff529bd165')
version('0.3', sha256='0d8069eb48e91f6f6d6a9148f4e2dc5026cabead15dd15fc343eff9cf33f538f')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/athena/package.py
|
# Copyright 2013-2022 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)
from spack import *
class Athena(AutotoolsPackage):
"""Athena is a grid-based code for astrophysical magnetohydrodynamics
(MHD). It was developed primarily for studies of the interstellar medium,
star formation, and accretion flows."""
homepage = "https://princetonuniversity.github.io/Athena-Cversion/"
url = "https://github.com/PrincetonUniversity/Athena-Cversion/archive/version-4.2.tar.gz"
git = "https://github.com/PrincetonUniversity/Athena-Cversion.git"
version('master', branch='master')
version('4.2', sha256='6334848d7f1325aa44859418feac8ce223b56793ae8907103000af5b27f50e7e')
# PHYSICS "packages":
variant('problem', default='linear_wave', description='Problem generator',
values=[
'blast',
'carbuncle',
'collapse3d',
'cpaw',
'cshock1d',
'current_sheet',
'cyladvect',
'cylblast',
'cylbphi',
'cylbr',
'cylcvmri',
'cyldiff',
'cylfieldloop',
'cylnewtmri',
'cylrayleigh',
'cylspiral',
'cylwind',
'cylwindrot',
'cylwindrotb',
'dmr',
'fft_test',
'field_loop',
'firehose',
'hall_drift',
'hb3',
'hgb',
'hkdisk',
'jeans',
'jet',
'kh',
'linear_wave',
'lw_implode',
'msa',
'noh',
'orszag-tang',
'par_collision',
'par_epicycle',
'par_strat2d',
'par_strat3d',
'pgflow',
'rotor',
'rt',
'shk_cloud',
'shkset1d',
'shkset2d',
'shkset3d',
'shu-osher',
'strat',
'streaming2d_multi',
'streaming2d_single',
'streaming3d_multi',
'streaming3d_single',
'twoibw'
])
variant('gas', default='mhd', description='Gas properties',
values=['mhd', 'hydro'])
variant('eos', default='adiabatic', description='Equation of state',
values=['adiabatic', 'isothermal'])
variant('nscalars', default=0, description='Number of advected scalars')
variant('gravity', default='none', description='Algorithm for self gravity',
values=['fft', 'fft_disk', 'fft_obc', 'multigrid', 'none'])
variant('particles', default='none',
description='Dust particle integration algorithm',
values=['feedback', 'passive', 'none'])
variant('coord', default='cartesian', description='Coordinate System',
values=['cartesian', 'cylindrical'])
# PHYSICS "features":
variant('conduction', default=False, description='Enable thermal conduction')
variant('resistivity', default=False, description='Enable resistivity')
variant('special_relativity', default=False, description='Enable special relativistic hydro or MHD')
variant('viscosity', default=False, description='Enable viscosity')
# ALGORITHM "packages":
variant('order', default='2',
description='Order and type of spatial reconstruction',
values=['1', '2', '3', '2p', '3p'])
variant('flux', default='roe', description='Flux function', values=[
'roe', 'hllc', 'hlld', 'hlle', 'force', 'exact', 'two-shock'
])
variant('integrator', default='ctu',
description='Unsplit integration algorithm',
values=['ctu', 'vl'])
variant('cflags', default='opt', description='Compiler flags',
values=['opt', 'debug', 'profile'])
# ALGORITHM "features":
variant('fargo', default=False, description='Enable FARGO algorithm')
variant('fft', default=False, description='Use FFTW block decomposition')
variant('fofc', default=False, description='Enable first-order flux correction')
variant('ghost', default=False, description='Write ghost zones')
variant('h_correction', default=False, description='Turn on H-correction')
variant('mpi', default=True, description='Enable MPI parallelization')
variant('shearing_box', default=False, description='Turn on shearing-box')
variant('single', default=False, description='Use single-precision instead of double-precision')
variant('sts', default=False, description='Turn on super timestepping')
variant('smr', default=False, description='Use static mesh refinement')
variant('rotating_frame', default=False, description='Turn on rotating_frame')
variant('l1_inflow', default=False, description='Enable inflow from L1 point')
depends_on('autoconf', type='build')
depends_on('automake', type='build')
depends_on('libtool', type='build')
depends_on('m4', type='build')
depends_on('mpi', when='+mpi')
depends_on('fftw', when='+fft')
conflicts('flux=hllc', when='gas=mhd')
conflicts('flux=exact', when='gas=mhd')
conflicts('flux=two-shock', when='gas=mhd')
conflicts('+h_correction', when='flux=hllc')
conflicts('+h_correction', when='flux=hlld')
conflicts('+h_correction', when='flux=hlle')
conflicts('+h_correction', when='flux=force')
conflicts('+h_correction', when='flux=exact')
conflicts('+h_correction', when='flux=two-shock')
conflicts('coord=cylindrical', when='gravity=none')
conflicts('coord=cylindrical', when='particles=none')
conflicts('integrator=vl', when='order=3')
conflicts('integrator=vl', when='order=2')
build_targets = ['all']
patch('missing-separator.patch')
def setup_build_environment(self, env):
spec = self.spec
env.set('OPT', '-O3')
if '+mpi' in spec:
env.set('CC', spec['mpi'].mpicc)
env.set('LDR', spec['mpi'].mpicc)
env.set('MPILIB', spec['mpi'].libs.ld_flags)
env.set('MPIINC', spec['mpi'].headers.include_flags)
else:
env.set('CC', spack_cc)
env.set('LDR', spack_cc)
if '+fft' in spec:
env.set('FFTWLIB', spec['fftw'].libs.ld_flags)
env.set('FFTWINC', spec['fftw'].headers.include_flags)
def configure_args(self):
spec = self.spec
args = []
if '+conduction' in spec:
args.append('--enable-conduction')
else:
args.append('--disable-conduction')
if '+resistivity' in spec:
args.append('--enable-resistivity')
else:
args.append('--disable-resistivity')
if '+special_relativity' in spec:
args.append('--enable-special-relativity')
else:
args.append('--disable-special-relativity')
if '+viscosity' in spec:
args.append('--enable-viscosity')
else:
args.append('--disable-viscosity')
if '+single' in spec:
args.append('--enable-single')
else:
args.append('--disable-single')
if '+ghost' in spec:
args.append('--enable-ghost')
else:
args.append('--disable-ghost')
if '+mpi' in spec:
args.append('--enable-mpi')
else:
args.append('--disable-mpi')
if '+h_correction' in spec:
args.append('--enable-h-correction')
else:
args.append('--disable-h-correction')
if '+fft' in spec:
args.append('--enable-fft')
else:
args.append('--disable-fft')
if '+shearing_box' in spec:
args.append('--enable-shearing-box')
else:
args.append('--disable-shearing-box')
if '+fargo' in spec:
args.append('--enable-fargo')
else:
args.append('--disable-fargo')
if '+sts' in spec:
args.append('--enable-sts')
else:
args.append('--disable-sts')
if '+smr' in spec:
args.append('--enable-smr')
else:
args.append('--disable-smr')
if '+fofc' in spec:
args.append('--enable-fofc')
else:
args.append('--disable-fofc')
if '+rotating_frame' in spec:
args.append('--enable-rotating_frame')
else:
args.append('--disable-rotating_frame')
if '+l1_inflow' in spec:
args.append('--enable-l1_inflow')
else:
args.append('--disable-l1_inflow')
args.extend([
'--with-problem=' + spec.variants['problem'].value,
'--with-gas=' + spec.variants['gas'].value,
'--with-eos=' + spec.variants['eos'].value,
'--with-nscalars=' + spec.variants['nscalars'].value,
'--with-gravity=' + spec.variants['gravity'].value,
'--with-particles=' + spec.variants['particles'].value,
'--with-coord=' + spec.variants['coord'].value,
'--with-order=' + spec.variants['order'].value,
'--with-flux=' + spec.variants['flux'].value,
'--with-integrator=' + spec.variants['integrator'].value,
'--with-cflags=' + spec.variants['cflags'].value,
])
return args
def install(self, spec, prefix):
mkdir(prefix.bin)
install('bin/athena', prefix.bin)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-rcppblaze/package.py
|
# Copyright 2013-2022 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)
from spack import *
class RRcppblaze(RPackage):
"""'Blaze' is an open-source, high-performance C++ math library for dense
and sparse arithmetic.
With its state-of-the-art Smart Expression Template implementation 'Blaze'
combines the elegance and ease of use of a domain-specific language with
'HPC'-grade performance, making it one of the most intuitive and fastest
C++ math libraries available. The 'Blaze' library offers: - high
performance through the integration of 'BLAS' libraries and manually tuned
'HPC' math kernels - vectorization by 'SSE', 'SSE2', 'SSE3', 'SSSE3',
'SSE4', 'AVX', 'AVX2', 'AVX-512', 'FMA', and 'SVML' - parallel execution by
'OpenMP', C++11 threads and 'Boost' threads ('Boost' threads are disabled
in 'RcppBlaze') - the intuitive and easy to use API of a domain specific
language - unified arithmetic with dense and sparse vectors and matrices -
thoroughly tested matrix and vector arithmetic - completely portable, high
quality C++ source code. The 'RcppBlaze' package includes the header files
from the 'Blaze' library with disabling some functionalities related to
link to the thread and system libraries which make 'RcppBlaze' be a
header-only library. Therefore, users do not need to install 'Blaze' and
the dependency 'Boost'. 'Blaze' is licensed under the New (Revised) BSD
license, while 'RcppBlaze' (the 'Rcpp' bindings/bridge to 'Blaze') is
licensed under the GNU GPL version 2 or later, as is the rest of 'Rcpp'.
Note that since 'Blaze' has committed to 'C++14' commit to 'C++14' which
does not used by most R users from version 3.0, we will use the version 2.6
of 'Blaze' which is 'C++98' compatible to support the most compilers and
system."""
cran = "RcppBlaze"
version('0.2.2', sha256='67550ed8aea12a219047af61b41e5b9f991608a21ce9a8fbf7ac55da0f7c2742')
depends_on('r@3.0.2:', type=('build', 'run'))
depends_on('r-rcpp@0.11.0:', type=('build', 'run'))
depends_on('r-matrix@1.1-0:', type=('build', 'run'))
depends_on('r-bh@1.54.0-2:', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-fitdistrplus/package.py
|
# Copyright 2013-2022 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)
from spack import *
class RFitdistrplus(RPackage):
"""Help to Fit of a Parametric Distribution to Non-Censored or Censored
Data.
Extends the fitdistr() function (of the MASS package) with several
functions to help the fit of a parametric distribution to non-censored or
censored data. Censored data may contain left censored, right censored and
interval censored values, with several lower and upper bounds. In addition
to maximum likelihood estimation (MLE), the package provides moment
matching (MME), quantile matching (QME) and maximum goodness-of-fit
estimation (MGE) methods (available only for non-censored data). Weighted
versions of MLE, MME and QME are available. See e.g. Casella & Berger
(2002). Statistical inference. Pacific Grove."""
cran = "fitdistrplus"
version('1.1-6', sha256='17c2990041a3bb7479f3c3a6d13d96c989db8eaddab17eff7e1fbe172a5b96be')
version('1.1-3', sha256='776d5456e14398e44b78b3d7db526559bb7a3537e546a29c88aa192141c756de')
version('1.0-14', sha256='85082590f62aa08d99048ea3414c5cc1e5b780d97b3779d2397c6cb435470083')
depends_on('r@3.2.0:', type=('build', 'run'))
depends_on('r@3.5.0:', type=('build', 'run'), when='@1.1-6:')
depends_on('r-mass', type=('build', 'run'))
depends_on('r-survival', type=('build', 'run'))
depends_on('r-npsurv', type=('build', 'run'), when='@:1.0-14')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-spectral/package.py
|
# Copyright 2013-2022 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)
from spack import *
class PySpectral(PythonPackage):
"""Spectral Python (SPy) is a pure Python module for processing
hyperspectral image data (imaging spectroscopy data). It has functions for
reading, displaying, manipulating, and classifying hyperspectral imagery.
SPy is Free, Open Source Software (FOSS) distributed under the MIT
License."""
homepage = "http://www.spectralpython.net/"
pypi = "spectral/spectral-0.22.4.tar.gz"
version('0.22.4', sha256='b208ffd1042e32fd2276a35e098e3df26a5f6ff1310b829e97d222c66645a9af')
depends_on('py-setuptools', type='build')
depends_on('py-numpy', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-ca/package.py
|
<gh_stars>10-100
# Copyright 2013-2022 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)
# ----------------------------------------------------------------------------
from spack import *
class RCa(RPackage):
"""Simple, Multiple and Joint Correspondence Analysis.
Computation and visualization of simple, multiple and joint correspondence
analysis."""
cran = "ca"
version('0.71.1', sha256='040c2fc94c356075f116cc7cd880530b3c9e02206c0035182c03a525ee99b424')
depends_on('r@3.0.0:', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/poppler-data/package.py
|
<gh_stars>10-100
# Copyright 2013-2022 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)
from spack import *
class PopplerData(CMakePackage):
"""This package consists of encoding files for use with poppler. The
encoding files are optional and poppler will automatically read them if
they are present. When installed, the encoding files enables poppler to
correctly render CJK and Cyrrilic properly. While poppler is licensed
under the GPL, these encoding files have different license, and thus
distributed separately."""
homepage = "https://poppler.freedesktop.org/"
url = "https://poppler.freedesktop.org/poppler-data-0.4.9.tar.gz"
version('0.4.9', sha256='1f9c7e7de9ecd0db6ab287349e31bf815ca108a5a175cf906a90163bdbe32012')
depends_on('cmake@2.6:', type='build')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/clinfo/package.py
|
# Copyright 2013-2022 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)
from spack import *
class Clinfo(MakefilePackage):
"""Print all known information about all available OpenCL platforms and
devices in the system."""
homepage = "https://github.com/Oblomov/clinfo"
url = "https://github.com/Oblomov/clinfo/archive/2.2.18.04.06.tar.gz"
maintainers = ['matthiasdiener']
version('2.2.18.04.06', sha256='f77021a57b3afcdebc73107e2254b95780026a9df9aa4f8db6aff11c03f0ec6c')
depends_on('opencl')
def install(self, spec, prefix):
make('install', 'PREFIX={0}'.format(prefix))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-rtree/package.py
|
<filename>var/spack/repos/builtin/packages/py-rtree/package.py<gh_stars>1-10
# Copyright 2013-2022 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)
from spack import *
class PyRtree(PythonPackage):
"""R-Tree spatial index for Python GIS."""
homepage = "https://github.com/Toblerity/rtree"
pypi = "Rtree/Rtree-0.8.3.tar.gz"
version('0.9.7', sha256='be8772ca34699a9ad3fb4cfe2cfb6629854e453c10b3328039301bbfc128ca3e')
version('0.8.3', sha256='6cb9cf3000963ea6a3db777a597baee2bc55c4fc891e4f1967f262cc96148649')
depends_on('python@3:', when='@0.9.4:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('py-wheel', when='@0.9.4:', type='build')
depends_on('libspatialindex@1.8.5:')
def setup_build_environment(self, env):
env.set('SPATIALINDEX_C_LIBRARY', self.spec['libspatialindex'].libs[0])
def setup_run_environment(self, env):
self.setup_build_environment(env)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/umesimd/package.py
|
# Copyright 2013-2022 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)
from spack import *
class Umesimd(CMakePackage):
"""UME::SIMD is an explicit vectorization library. The library defines
homogeneous interface for accessing functionality of SIMD registers of
AVX, AVX2, AVX512 and IMCI (KNCNI, k1om) instruction set."""
homepage = "https://github.com/edanor/umesimd"
url = "https://github.com/edanor/umesimd/archive/v0.8.1.tar.gz"
version('0.8.1', sha256='78f457634ee593495083cf8eb6ec1cf7f274db5ff7210c37b3a954f1a712d357')
version('0.7.1', sha256='c5377f8223fbf93ad79412e4b40fd14e88a86e08aa573f49df38a159d451023d')
version('0.6.1', sha256='15d9fde1a5c89f3c77c42550c2b55d25a581971002157a338e01104079cdf843')
version('0.5.2', sha256='8a02c0322b38f1e1757675bb781e190b2458fb8bc508a6bd03356da248362daf')
version('0.5.1', sha256='6b7bc62548170e15e98d9e4c57c2980d2cd46593167d6d4b83765aa57175e5ad')
version('0.4.2', sha256='a5dd2ec7ecf781af01f7e3336975870f34bfc8c79ef4bba90ec90e43b5f5969f')
version('0.4.1', sha256='e05b9f886164826005c8db5d2240f22cb88593c05b4fe45c81aba4d1d57a9bfa')
version('0.3.2', sha256='90399fa64489ca4d492a57a49582f5b827d4710a691f533822fd61edc346e8f6')
version('0.3.1', sha256='9bab8b4c70e11dbdd864a09053225c74cfabb801739e09a314ddeb1d84a43f0a')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-performance/package.py
|
# Copyright 2013-2022 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)
from spack import *
class PyPerformance(PythonPackage):
"""The performance project is intended to be an authoritative source
of benchmarks for all Python implementations.
The focus is on real-world benchmarks, rather than synthetic benchmarks,
using whole applications when possible.
"""
homepage = 'http://pyperformance.readthedocs.io/'
url = 'https://github.com/python/performance/archive/0.6.1.tar.gz'
version('0.6.1', sha256='cc48dd7579da2f4b0e4cff0c8220811f5ba7019493bb408819c1532acf53d13a')
version('0.6.0', sha256='4636e276445e96563f628e071cacd5df31dc587d83899e7d03fa8b31760f2cd2')
depends_on('py-setuptools', type=('build', 'run'))
depends_on('py-six', type=('build', 'run'))
depends_on('py-pyperf', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-gridbase/package.py
|
# Copyright 2013-2022 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)
from spack import *
class RGridbase(RPackage):
"""Integration of base and grid graphics."""
cran = "gridBase"
version('0.4-7', sha256='be8718d24cd10f6e323dce91b15fc40ed88bccaa26acf3192d5e38fe33e15f26')
depends_on('r@2.3.0:', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin.mock/packages/mpileaks/package.py
|
<filename>var/spack/repos/builtin.mock/packages/mpileaks/package.py
# Copyright 2013-2022 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)
from spack import *
class Mpileaks(Package):
homepage = "http://www.llnl.gov"
url = "http://www.llnl.gov/mpileaks-1.0.tar.gz"
version(1.0, '0123456789abcdef0123456789abcdef')
version(2.1, '0123456789abcdef0123456789abcdef')
version(2.2, '0123456789abcdef0123456789abcdef')
version(2.3, '0123456789abcdef0123456789abcdef')
variant('debug', default=False, description='Debug variant')
variant('opt', default=False, description='Optimized variant')
variant('shared', default=True, description='Build shared library')
variant('static', default=True, description='Build static library')
depends_on("mpi")
depends_on("callpath")
# Will be used to try raising an exception
libs = None
def install(self, spec, prefix):
touch(prefix.mpileaks)
mkdirp(prefix.man)
def setup_environment(self, senv, renv):
renv.set('FOOBAR', self.name)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-aiosignal/package.py
|
<reponame>player1537-forks/spack<gh_stars>10-100
# Copyright 2013-2022 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)
from spack import *
class PyAiosignal(PythonPackage):
"""A project to manage callbacks in asyncio projects."""
homepage = "https://aiosignal.readthedocs.io/"
pypi = "aiosignal/aiosignal-1.2.0.tar.gz"
version('1.2.0', sha256='78ed67db6c7b7ced4f98e495e572106d5c432a93e1ddd1bf475e1dc05f5b7df2')
depends_on('python@3.6:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('py-frozenlist@1.1.0:', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/perl-threads/package.py
|
# Copyright 2013-2022 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)
from spack import *
class PerlThreads(PerlPackage):
"""threads - Perl interpreter-based threads"""
homepage = "https://metacpan.org/pod/threads"
url = "https://cpan.metacpan.org/authors/id/J/JD/JDHEDDEN/threads-2.21.tar.gz"
version('2.21', sha256='28394c98a2bcae6f20ffb8a3d965a1c194b764c650169e2050ee38dbaa10f110')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-mapclassify/package.py
|
# Copyright 2013-2022 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)
from spack import *
class PyMapclassify(PythonPackage):
"""Classification Schemes for Choropleth Maps."""
homepage = "https://github.com/pysal/mapclassify"
pypi = "mapclassify/mapclassify-2.4.2.tar.gz"
maintainers = ['adamjstewart']
version('2.4.2', sha256='bc20954aa433466f5fbc572e3f23b05f9606b59209f40b0ded93ac1ca983d24e')
depends_on('py-setuptools', type='build')
depends_on('py-scipy@1.0:', type=('build', 'run'))
depends_on('py-numpy@1.3:', type=('build', 'run'))
depends_on('py-scikit-learn', type=('build', 'run'))
depends_on('py-pandas@1.0:', type=('build', 'run'))
depends_on('py-networkx', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/flume/package.py
|
<reponame>player1537-forks/spack
# Copyright 2013-2022 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)
from spack import *
class Flume(Package):
"""
Apache Flume is a distributed, reliable, and available service for
efficiently collecting, aggregating, and moving large amounts of log
data. It has a simple and flexible architecture based on streaming
data flows. It is robust and fault tolerant with tunable reliability
mechanisms and many failover and recovery mechanisms. The system is
centrally managed and allows for intelligent dynamic management. It
uses a simple extensible data model that allows for online analytic
application.
"""
homepage = "https://cwiki.apache.org/FLUME"
url = "https://www.apache.org/dist/flume/1.9.0/apache-flume-1.9.0-bin.tar.gz"
version('1.9.0', sha256='0373ed5abfd44dc4ab23d9a02251ffd7e3b32c02d83a03546e97ec15a7b23619')
version('1.8.0', sha256='be1b554a5e23340ecc5e0b044215bf7828ff841f6eabe647b526d31add1ab5fa')
version('1.7.0', sha256='b97254cf37c36b6e5045f764095d86fc6d9a8043dda169e950547fcae35681ec')
version('1.6.0', sha256='0f7cef2f0128249893498a23401a0c8cb261e4516bc60f1885f8a3ae4475ed80')
version('1.5.2', sha256='649f07c41d0e77acd661c683146a0c5e395bfb3f23df198196fe8058a7b01426')
depends_on('java@8:', type='run')
def install(self, spec, prefix):
install_tree('.', prefix)
|
player1537-forks/spack
|
lib/spack/external/pyrsistent/__init__.py
|
<reponame>player1537-forks/spack
# -*- coding: utf-8 -*-
from pyrsistent._pmap import pmap
__all__ = ('pmap',)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/msgpack-c/package.py
|
<gh_stars>10-100
# Copyright 2013-2022 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)
from spack import *
class MsgpackC(CMakePackage):
"""A small, fast binary interchange format convertible to/from JSON"""
homepage = "http://www.msgpack.org"
url = "https://github.com/msgpack/msgpack-c/archive/cpp-3.0.1.tar.gz"
version('3.1.1', sha256='bda49f996a73d2c6080ff0523e7b535917cd28c8a79c3a5da54fc29332d61d1e')
version('3.0.1', sha256='1b834ab0b5b41da1dbfb96dd4a673f6de7e79dbd7f212f45a553ff9cc54abf3b')
version('1.4.1', sha256='74324d696f9abb75d8a7cd5e77add5062592b7eac386c8102de78a6cc5309886')
depends_on('cmake@2.8.12:', type='build')
depends_on('googletest', type='test')
def cmake_args(self):
args = [
"-DCMAKE_CXX_FLAGS=-Wno-implicit-fallthrough",
"-DCMAKE_C_FLAGS=-Wno-implicit-fallthrough",
self.define('MSGPACK_BUILD_TESTS', self.run_tests)
]
return args
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/wannier90/package.py
|
# Copyright 2013-2022 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 inspect
import os.path
from spack import *
class Wannier90(MakefilePackage):
"""Wannier90 calculates maximally-localised Wannier functions (MLWFs).
Wannier90 is released under the GNU General Public License.
"""
homepage = 'http://wannier.org'
url = 'https://github.com/wannier-developers/wannier90/archive/v3.1.0.tar.gz'
version('3.1.0', sha256='40651a9832eb93dec20a8360dd535262c261c34e13c41b6755fa6915c936b254')
version('3.0.0', sha256='f196e441dcd7b67159a1d09d2d7de2893b011a9f03aab6b30c4703ecbf20fe5b')
version('2.1.0', sha256='ee90108d4bc4aa6a1cf16d72abebcb3087cf6c1007d22dda269eb7e7076bddca')
version('2.0.1', sha256='05ea7cd421a219ce19d379ad6ae3d9b1a84be4ffb367506ffdfab1e729309e94')
depends_on('mpi')
depends_on('lapack')
depends_on('blas')
parallel = False
variant(
'shared',
default=True,
description='Builds a shared version of the library'
)
@property
def build_targets(self):
targets = []
if '@:2' in self.spec:
targets = [
'lib', 'wannier', 'post', 'w90chk2chk', 'w90vdw', 'w90pov'
]
if '@3:' in self.spec:
targets = ['wannier', 'post', 'lib', 'w90chk2chk', 'w90vdw']
if '+shared' in self.spec:
targets.append('dynlib')
return targets
def url_for_version(self, version):
if (version > Version('2')):
url = 'https://github.com/wannier-developers/wannier90/archive/v{0}.tar.gz'
else:
url = 'http://wannier.org/code/wannier90-{0}.tar.gz'
return url.format(version)
@property
def makefile_name(self):
# Version 2.0.1 uses make.sys,
# other verions use make.inc
if self.spec.satisfies('@2.0.1'):
filename = 'make.sys'
else:
filename = 'make.inc'
abspath = join_path(self.stage.source_path, filename)
return abspath
def edit(self, spec, prefix):
lapack = self.spec['lapack'].libs
blas = self.spec['blas'].libs
mpi = self.spec['mpi'].libs
substitutions = {
'@F90': spack_fc,
'@MPIF90': self.spec['mpi'].mpifc,
'@LIBS': (lapack + blas + mpi).joined()
}
template = join_path(
os.path.dirname(inspect.getmodule(self).__file__),
'make.sys'
)
copy(template, self.makefile_name)
for key, value in substitutions.items():
filter_file(key, value, self.makefile_name)
if '@:2 +shared' in self.spec:
# this is to build a .shared wannier90 library
filter_file('LIBRARY = ../../libwannier.a',
'LIBRARY = ../../libwannier.' + dso_suffix,
join_path(self.stage.source_path, 'src/Makefile.2'))
filter_file('parameters.o kmesh.o io.o comms.o '
'utility.o get_oper.o constants.o '
'postw90_common.o wan_ham.o spin.o '
'dos.o berry.o kpath.o kslice.o '
'boltzwann.o geninterp.o',
'comms.o get_oper.o postw90_common.o '
'wan_ham.o spin.o dos.o berry.o '
'kpath.o kslice.o boltzwann.o geninterp.o',
join_path(self.stage.source_path,
'src/Makefile.2'))
filter_file('../../wannier90.x: .*',
'../../wannier90.x: $(OBJS) '
'../wannier_prog.F90 $(LIBRARY)',
join_path(self.stage.source_path,
'src/Makefile.2'))
filter_file('../../postw90.x: $(OBJS_POST) '
'$(POSTDIR)postw90.F90',
'../../postw90.x: $(OBJS_POST) '
'$(POSTDIR)postw90.F90 $(LIBRARY)',
join_path(self.stage.source_path,
'src/Makefile.2'), string=True)
filter_file(
'$(COMPILER) ../wannier_prog.F90 '
'$(LDOPTS) $(OBJS) $(LIBS) '
'-o ../../wannier90.x',
'$(COMPILER) -I../obj ../wannier_prog.F90 '
'$(LDOPTS) -L../.. -lwannier '
'-o ../../wannier90.x',
join_path(self.stage.source_path,
'src/Makefile.2'), string=True)
filter_file(
'$(COMPILER) $(POSTDIR)postw90.F90 '
'$(POSTOPTS) $(LDOPTS) '
'$(OBJS_POST) '
'$(LIBS) -o ../../postw90.x',
'$(COMPILER) -I../obj $(POSTDIR)postw90.F90 '
'$(POSTOPTS) $(LDOPTS) $(OBJS_POST) '
'-L../.. -lwannier $(LIBS) -o ../../postw90.x',
join_path(self.stage.source_path,
'src/Makefile.2'), string=True)
filter_file(
'$(AR) $(ARFLAGS) '
'$(LIBRARY) $(OBJS2) $(OBJS)',
'$(MPIF90) $(FCOPTS) -shared -o '
'$(LIBRARY) $(OBJS2) $(OBJS) $(LIBS)',
join_path(self.stage.source_path,
'src/Makefile.2'), string=True)
def setup_build_environment(self, env):
env.set('MPIFC', self.prefix.bin.mpifc)
def install(self, spec, prefix):
mkdirp(self.prefix.bin)
mkdirp(self.prefix.lib)
if '+shared' in spec:
mkdirp(self.prefix.modules)
install(
join_path(self.stage.source_path, 'wannier90.x'),
join_path(self.prefix.bin, 'wannier90.x')
)
install(
join_path(self.stage.source_path, 'postw90.x'),
join_path(self.prefix.bin, 'postw90.x')
)
inst = []
if '+shared' in spec:
inst.append('libwannier.' + dso_suffix)
# version 3 or 2 without the shared variant
# also has a .a version of the library
if '@3:' in spec or '~shared' in spec:
inst.append('libwannier.a')
for file in inst:
install(join_path(self.stage.source_path, file),
join_path(self.prefix.lib, file))
install(
join_path(self.stage.source_path, 'w90chk2chk.x'),
join_path(self.prefix.bin, 'w90chk2chk.x')
)
install(
join_path(self.stage.source_path, 'utility', 'w90vdw', 'w90vdw.x'),
join_path(self.prefix.bin, 'w90vdw.x')
)
if spec.satisfies('@:2'):
install(
join_path(self.stage.source_path,
'utility', 'w90pov', 'w90pov'),
join_path(self.prefix.bin, 'w90pov')
)
install_tree(
join_path(self.stage.source_path, 'pseudo'),
join_path(self.prefix.bin, 'pseudo')
)
for file in find(join_path(self.stage.source_path, 'src/obj'),
'*.mod'):
install(file, self.prefix.modules)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-jaspar2018/package.py
|
<gh_stars>10-100
# Copyright 2013-2022 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)
from spack import *
class RJaspar2018(RPackage):
"""Data package for JASPAR 2018.
Data package for JASPAR 2018. To search this databases, please use the
package TFBSTools (>= 1.15.6)."""
bioc = "JASPAR2018"
version('1.1.0', commit='<PASSWORD>')
version('1.0.0', commit='4<PASSWORD>')
depends_on('r@3.4.0:', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-bfastspatial/package.py
|
# Copyright 2013-2022 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)
from spack import *
class RBfastspatial(RPackage):
"""Pre-process gridded time-series data in order for them to be
analyzed with change detection algorithms such as bfast. Uses classes
from the raster package and includes utilities to run the algorithms and
post-process the results."""
homepage = "https://github.com/loicdtx/bfastSpatial"
url = "https://github.com/loicdtx/bfastSpatial/archive/0.6.2.tar.gz"
version('0.6.2', sha256='2c6220a5d04d6e4531b0b022a015651e630433f8d6864fa8b820aed5af5c1897')
depends_on('r@3.0.0:', type=('build', 'run'))
depends_on('r-raster', type=('build', 'run'))
depends_on('r-bfast', type=('build', 'run'))
depends_on('r-gdalutils', type=('build', 'run'))
depends_on('r-stringr', type=('build', 'run'))
depends_on('r-rgdal', type=('build', 'run'))
depends_on('r-bitops', type=('build', 'run'))
depends_on('r-zoo', type=('build', 'run'))
depends_on('r-sp', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-h11/package.py
|
<reponame>player1537-forks/spack<gh_stars>10-100
# Copyright 2013-2022 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)
from spack import *
class PyH11(PythonPackage):
"""A pure-Python, bring-your-own-I/O implementation of HTTP/1.1"""
homepage = "https://github.com/python-hyper/h11"
pypi = "h11/h11-0.10.0.tar.gz"
version('0.13.0', sha256='70813c1135087a248a4d38cc0e1a0181ffab2188141a93eaf567940c3957ff06')
version('0.12.0', sha256='47222cb6067e4a307d535814917cd98fd0a57b6788ce715755fa2b6c28b56042')
version('0.11.0', sha256='3c6c61d69c6f13d41f1b80ab0322f1872702a3ba26e12aa864c928f6a43fbaab')
version('0.10.0', sha256='311dc5478c2568cc07262e0381cdfc5b9c6ba19775905736c87e81ae6662b9fd')
version('0.9.0', sha256='33d4bca7be0fa039f4e84d50ab00531047e53d6ee8ffbc83501ea602c169cae1')
depends_on('py-setuptools', type='build')
depends_on('python@3.6:', type=('build', 'run'), when='@0.12.0:')
depends_on('py-dataclasses', type=('build', 'run'), when='@0.13: ^python@:3.6')
depends_on('py-typing-extensions', type=('build', 'run'), when='@0.13: ^python@:3.7')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-pyvista/package.py
|
# Copyright 2013-2022 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)
from spack import *
class PyPyvista(PythonPackage):
"""Easier Pythonic interface to VTK."""
homepage = "https://github.com/pyvista/pyvista"
pypi = "pyvista/pyvista-0.32.1.tar.gz"
version('0.32.1', sha256='585ac79524e351924730aff9b7207d6c5ac4175dbb5d33f7a9a2de22ae53dbf9')
depends_on('python@3.6:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('py-numpy', type=('build', 'run'))
depends_on('py-imageio', type=('build', 'run'))
depends_on('pil', type=('build', 'run'))
depends_on('py-appdirs', type=('build', 'run'))
depends_on('py-scooby@0.5.1:', type=('build', 'run'))
depends_on('py-meshio@4.0.3:4', type=('build', 'run'))
depends_on('vtk+python', type=('build', 'run'))
depends_on('py-dataclasses', when='^python@3.6', type=('build', 'run'))
depends_on('py-typing-extensions', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-sqlparse/package.py
|
<gh_stars>10-100
# Copyright 2013-2022 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)
from spack import *
class PySqlparse(PythonPackage):
"""A non-validating SQL parser module for Python."""
homepage = "https://github.com/andialbrecht/sqlparse"
url = "https://github.com/andialbrecht/sqlparse/archive/0.3.1.tar.gz"
version('0.4.1', sha256='f75cdec98a4cc8296890279d744e1ae8618bb14dbad77e3d0637f0d7bb5d6535')
version('0.3.1', sha256='344b539482b75c244ac69fbb160d0f4d63a288a392475c8418ca692c594561f9')
version('0.3.0', sha256='a75fddae009fba1d66786203c9dd3a842aa4415475c466d15484139117108474')
version('0.2.4', sha256='7087a2bd385c06ac1a5cf343e2e5ea7ce2bb6386849e59ef214e02af68f73fb4')
version('0.2.3', sha256='12470ab41df1a7003a2957a79c6da9cd4ded180c8a193aa112fe0899b935ef30')
depends_on('py-setuptools', type='build')
depends_on('python@2.7:2.8,3.4:', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/blaze/package.py
|
# Copyright 2013-2022 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)
from spack import *
class Blaze(CMakePackage):
"""Blaze is an open-source, high-performance C++ math library for dense and
sparse arithmetic. With its state-of-the-art Smart Expression Template
implementation Blaze combines the elegance and ease of use of a
domain-specific language with HPC-grade performance, making it one of the
most intuitive and fastest C++ math libraries available.
"""
homepage = "https://bitbucket.org/blaze-lib/blaze/overview"
url = "https://bitbucket.org/blaze-lib/blaze/downloads/blaze-3.8.tar.gz"
git = "https://bitbucket.org/blaze-lib/blaze.git"
maintainers = ['nilsvu']
version('master', branch='master')
version('3.8', sha256='dfaae1a3a9fea0b3cc92e78c9858dcc6c93301d59f67de5d388a3a41c8a629ae')
version('3.7', sha256='ef3cbc5db7d62dcdde0af88d3c951051254afd750d26773406fddb6afc5ad890')
version('3.6', sha256='2ebbadacaf3f066e27352c1e413ead127b7ced8a3b202ae45f39c8f5f12324cc')
version('3.5', sha256='f50d4a57796b8012d3e6d416667d9abe6f4d95994eb9deb86cd4491381dec624')
version('3.4', sha256='fd474ab479e81d31edf27d4a529706b418f874caa7b046c67489128c20dda66f')
version('3.3', sha256='138cbb7b95775c10bf56a5ab3596a32205751299b19699984b6ed55b1bf989d0')
version('3.2', sha256='fb7e83d3a8c1ba04d3a51234708092b75a1abf3b7c4d0db5e6cf3cbed771b869')
version('3.1', sha256='a122d6758d9ada7ab516417f7b5ad186a4a9b390bba682f009df6585f5550716')
version('3.0', sha256='d66abaf4633d60b6e6472f6ecd7db7b4fb5f74a4afcfdf00c92e1ea61f2e0870')
version('2.6', sha256='a6b927db14b43fad483670dfa2acd7ecc94fd53085cdf18f262d2dc613857fb6')
version('2.5', sha256='5faeca8a26e04f70a5b3f94e88ef1fbe96a89e3722cd89e5f9d4bc8267b33d41')
version('2.4', sha256='34af70c8bb4da5fd0017b7c47e5efbfef9aadbabc5aae416582901a4059d1fa3')
version('2.3', sha256='785089db7f15684c24018b931f9f564954a79389166ac1f3e256a56c667d49f2')
version('2.2', sha256='448e70a440d71afa6325bae254ca7367b10e61431084adbf2ac679dbd5da78d2')
version('2.1', sha256='b982c03236c6a7ae396850eba0ef8fb1642ddf6448531063bf7239d9ff3290fd')
version('2.0', sha256='7bdf555e97455a2f42f40396b32caa9cf3e52bdd1877e0289115825113f4dcb2')
version('1.5', sha256='5c69b605b712616dcd29fa25abecb20b977ef318207ef96176ab67b2ad891e1e')
version('1.4', sha256='2e48d2e5a3a06abb23716829501bb0b825c58ad156faab6df0cfeef1bcdfbc82')
version('1.3', sha256='361bfbf2d2bf8557d123da3af8abc70e4c3b13d9c94a8227aeb751e06acdb8cf')
version('1.2', sha256='16f56d4f61dca229fa7e17a0d1e348a1f3246c65cded2df5db33babebf8f9b9d')
version('1.1', sha256='6add20eb9c176ea9f8091c49b101f46d1a1a6bd9c31553a6eff5e53603f0527f')
version('1.0', sha256='ee13cfd467c1a4b0fe7cc58b61b846eae862167a90dd2e60559626a30418b5a3')
# These configuration options set defaults for dependent packages and
# control Blaze dependencies. They can also be enabled or disabled with
# compiler flags later by dependent packages, since Blaze is a header-only
# library.
# - BLAS mode is turned off by default in the Blaze CMake configuration (as
# of v3.8), so we turn it off by default here as well.
variant('blas', default=False, description='Enable BLAS kernels')
# - LAPACK is only a link-time dependency, but Blaze provides a CMake
# configuration check. It is enabled by default in the Blaze CMake
# configuration (as of v3.8).
variant('lapack', default=True, description='Enable LAPACK kernels')
# - SMP mode is set to OpenMP by default in the Blaze CMake configuration
# (as of v3.8), but isn't a required dependency.
variant('smp', values=['none', 'openmp', 'cpp11', 'boost', 'hpx'],
default='openmp', description='Shared memory parallelization mode')
# Blaze requires at least cmake 3.8.0 for C++14 features.
depends_on('cmake@3.8.0:', type='build')
depends_on('blas', when='+blas')
depends_on('lapack', when='+lapack')
depends_on('boost@1.54.0: +thread', when='smp=boost')
depends_on('hpx', when='smp=hpx')
def cmake_args(self):
args = [
self.define_from_variant('BLAZE_BLAS_MODE', 'blas'),
# These flags can be set at compile time, but it would be useful to
# determine them from the BLAS provider if possible and pass them to
# the CMake configuration:
# - BLAZE_BLAS_IS_64BIT
# - BLAZE_BLAS_IS_PARALLEL
# The name of the header file is particularly important because
# builds will fail if `BLAZE_BLAS_MODE` is enabled but the header
# file is missing:
# - BLAZE_BLAS_INCLUDE_FILE (defaults to <cblas.h>)
self.define_from_variant('USE_LAPACK', 'lapack'),
]
# SMP mode
if self.spec.variants['smp'].value == 'none':
args.append(self.define('BLAZE_SHARED_MEMORY_PARALLELIZATION', False))
else:
args.extend([
self.define('BLAZE_SHARED_MEMORY_PARALLELIZATION', True),
self.define('BLAZE_SMP_THREADS', {
'openmp': 'OpenMP',
'cpp11': 'C++11',
'boost': 'Boost',
'hpx': 'HPX',
}[self.spec.variants['smp'].value])
])
return args
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-pytest-flakes/package.py
|
<reponame>player1537-forks/spack
# Copyright 2013-2022 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)
from spack import *
class PyPytestFlakes(PythonPackage):
"""py.test plugin for efficiently checking python source with pyflakes."""
homepage = "https://github.com/asmeurer/pytest-flakes"
pypi = "pytest-flakes/pytest-flakes-4.0.2.tar.gz"
version('4.0.3', sha256='bf070c5485dad82d5b5f5d0eb08d269737e378492d9a68f5223b0a90924c7754')
version('4.0.2', sha256='6733db47937d9689032876359e5ee0ee6926e3638546c09220e2f86b3581d4c1')
depends_on('python@3.5:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('py-pytest@5:', type=('build', 'run'))
depends_on('py-pyflakes', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-ellipsis/package.py
|
<reponame>player1537-forks/spack
# Copyright 2013-2022 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)
from spack import *
class REllipsis(RPackage):
"""Tools for Working with ...
The ellipsis is a powerful tool for extending functions. Unfortunately
this power comes at a cost: misspelled arguments will be silently ignored.
The ellipsis package provides a collection of functions to catch problems
and alert the user."""
cran = "ellipsis"
version('0.3.2', sha256='a90266e5eb59c7f419774d5c6d6bd5e09701a26c9218c5933c9bce6765aa1558')
version('0.3.1', sha256='4f8a15158dfc27cdc0f7554c7a61e92b02e4d70bfc3d968f01a99da2189b75db')
version('0.3.0', sha256='0bf814cb7a1f0ee1f2949bdc98752a0d535f2a9489280dd4d8fcdb10067ee907')
version('0.2.0.1', sha256='0e6528c5e8016c3617cc1cfcdb5a4bfeb073e0bd5ea76b43e56b0c3208a0a943')
depends_on('r@3.1:', type=('build', 'run'))
depends_on('r@3.2:', type=('build', 'run'), when='@0.3:')
depends_on('r-rlang@0.3.0:', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/bolt/package.py
|
# Copyright 2013-2022 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 os
from spack import *
class Bolt(CMakePackage):
"""BOLT targets a high-performing OpenMP implementation,
especially specialized for fine-grain parallelism. Unlike other
OpenMP implementations, BOLT utilizes a lightweight threading
model for its underlying threading mechanism. It currently adopts
Argobots, a new holistic, low-level threading and tasking runtime,
in order to overcome shortcomings of conventional OS-level
threads. The current BOLT implementation is based on the OpenMP
runtime in LLVM, and thus it can be used with LLVM/Clang, Intel
OpenMP compiler, and GCC."""
homepage = "https://www.bolt-omp.org/"
url = "https://github.com/pmodels/bolt/releases/download/v1.0b1/bolt-1.0b1.tar.gz"
git = "https://github.com/pmodels/bolt.git"
maintainers = ['shintaro-iwasaki']
tags = ['e4s']
version("main", branch="main")
version("2.0", sha256="f84b6a525953edbaa5d28748ef3ab172a3b6f6899b07092065ba7d1ccc6eb5ac")
version("1.0.1", sha256="769e30dfc4042cee7ebbdadd23cf08796c03bcd8b335f516dc8cbc3f8adfa597")
version("1.0", sha256="1c0d2f75597485ca36335d313a73736594e75c8a36123c5a6f54d01b5ba5c384")
test_requires_compiler = True
depends_on('argobots')
depends_on('autoconf', type='build')
depends_on('automake', type='build')
depends_on('libtool', type='build')
def cmake_args(self):
spec = self.spec
options = [
'-DLIBOMP_USE_ARGOBOTS=on',
'-DLIBOMP_ARGOBOTS_INSTALL_DIR=' + spec['argobots'].prefix
]
return options
@run_after('install')
def cache_test_sources(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
self.cache_extra_test_sources(['examples'])
def run_sample_nested_example(self):
"""Run stand alone test: sample_nested"""
test_dir = join_path(self.test_suite.current_test_cache_dir, 'examples')
if not os.path.exists(test_dir):
print('Skipping bolt test')
return
exe = 'sample_nested'
# TODO: Either change to use self.compiler.cc (so using the build-time compiler)
# or add test parts that compile with the different supported compilers.
self.run_test('gcc',
options=['-lomp', '-o', exe,
'-L{0}'.format(join_path(self.prefix, 'lib')),
'{0}'.format(join_path(test_dir, 'sample_nested.c'))],
purpose='test: compile {0} example'.format(exe),
work_dir=test_dir)
self.run_test(exe,
purpose='test: run {0} example'.format(exe),
work_dir=test_dir)
def test(self):
print("Running bolt test")
self.run_sample_nested_example()
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-amqp/package.py
|
# Copyright 2013-2022 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)
from spack import *
class PyAmqp(PythonPackage):
"""Low-level AMQP client for Python (fork of amqplib)."""
pypi = "amqp/amqp-2.4.1.tar.gz"
version('5.0.9', sha256='1e5f707424e544078ca196e72ae6a14887ce74e02bd126be54b7c03c971bef18')
version('5.0.1', sha256='9881f8e6fe23e3db9faa6cfd8c05390213e1d1b95c0162bc50552cad75bffa5f')
version('2.6.1', sha256='70cdb10628468ff14e57ec2f751c7aa9e48e7e3651cfd62d431213c0c4e58f21')
version('2.5.2', sha256='77f1aef9410698d20eaeac5b73a87817365f457a507d82edf292e12cbb83b08d')
version('2.4.2', sha256='043beb485774ca69718a35602089e524f87168268f0d1ae115f28b88d27f92d7')
version('2.4.1', sha256='6816eed27521293ee03aa9ace300a07215b11fee4e845588a9b863a7ba30addb')
depends_on('python@2.7:2.8,3.5:', type=('build', 'run'))
depends_on('python@3.6:', type=('build', 'run'), when='@5.0.9:')
depends_on('py-setuptools', type='build')
depends_on('py-cython', type='build')
depends_on('py-vine@1.1.3:4', when="@2", type=('build', 'run'))
depends_on('py-vine@5.0.0', when="@5.0.0:5", type=('build', 'run'))
def setup_build_environment(self, env):
env.set('CELERY_ENABLE_SPEEDUPS', True)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/lustre/package.py
|
<filename>var/spack/repos/builtin/packages/lustre/package.py
# Copyright 2013-2022 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 Lustre(Package):
"""Lustre is a type of parallel distributed file system,
generally used for large-scale cluster computing."""
homepage = 'http://lustre.org/'
has_code = False
executables = [r'^lfs$']
version('2.12')
@classmethod
def determine_version(cls, exe):
output = Executable(exe)('--version', output=str, error=str)
match = re.search(r'lfs (\d\S*)', output)
return match.group(1) if match else None
# Lustre is filesystem and needs to be installed on system.
# To have it as external package in SPACK, follow below:
# config file packages.yaml needs to be adjusted:
#
# packages:
# lustre:
# buildable: False
# externals:
# - spec: lustre@2.12
# prefix: /usr (Usual Lustre library path)
def install(self, spec, prefix):
raise InstallError(
self.spec.format('{name} is not installable, you need to specify '
'it as an external package in packages.yaml'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/mesa-demos/package.py
|
# Copyright 2013-2022 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)
from spack import *
class MesaDemos(AutotoolsPackage):
"""This package provides some demo applications for testing Mesa."""
homepage = "https://www.mesa3d.org"
url = "https://github.com/freedesktop/mesa-demos/archive/mesa-demos-8.3.0.tar.gz"
version('8.3.0', sha256='9bc1b37f4fc7bfc3f818f2d3851ffde28e8167ef11dca87f4781e9ef6206901f')
version('8.2.0', sha256='5a9f71b815d968d0c3b77edfcc3782d0211f8520b00da9e554ccfed80c8889f6')
version('8.1.0', sha256='cc5826105355830208c90047fc38c5b09fa3ab0045366e7e859104935b00b76d')
depends_on('autoconf', type='build')
depends_on('automake', type='build')
depends_on('libtool', type='build')
depends_on('m4', type='build')
depends_on('pkgconfig', type='build')
depends_on('mesa')
depends_on('mesa-glu')
depends_on('freetype')
depends_on('freeglut')
depends_on('glew@1.5.4:')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-sourcetools/package.py
|
# Copyright 2013-2022 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)
from spack import *
class RSourcetools(RPackage):
"""Tools for Reading, Tokenizing and Parsing R Code.
Tools for the reading and tokenization of R code. The 'sourcetools' package
provides both an R and C++ interface for the tokenization of R code, and
helpers for interacting with the tokenized representation of R code."""
cran = "sourcetools"
version('0.1.7', sha256='47984406efb3b3face133979ccbae9fefb7360b9a6ca1a1c11473681418ed2ca')
version('0.1.6', sha256='c9f48d2f0b7f7ed0e7fecdf8e730b0b80c4d567f0e1e880d118b0944b1330c51')
version('0.1.5', sha256='c2373357ad76eaa7d03f9f01c19b5001a3e4db788acbca068b0abbe7a99ea64b')
depends_on('r@3.0.2:', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-torchmeta/package.py
|
# Copyright 2013-2022 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)
from spack import *
class PyTorchmeta(PythonPackage):
"""A collection of extensions and data-loaders for few-shot learning &
meta-learning in PyTorch. Torchmeta contains popular meta-learning
benchmarks, fully compatible with both torchvision and PyTorch's DataLoader."""
homepage = "https://github.com/tristandeleu/pytorch-meta"
pypi = "torchmeta/torchmeta-1.7.0.tar.gz"
version('1.7.0', sha256='148d42b6a1ec27970408f7bcb97cf1cb203f8699214e06424fe43d78faa848d9')
depends_on('python@3.6:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('py-numpy@1.14:', type=('build', 'run'))
depends_on('py-torch@1.4.0:1.8', type=('build', 'run'))
depends_on('py-torchvision@0.5.0:0.9', type=('build', 'run'))
depends_on('pil@7.0:', type=('build', 'run'))
depends_on('py-h5py', type=('build', 'run'))
depends_on('py-tqdm@4.0.0:', type=('build', 'run'))
depends_on('py-requests', type=('build', 'run'))
depends_on('py-ordered-set', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/time/package.py
|
<reponame>player1537-forks/spack<filename>var/spack/repos/builtin/packages/time/package.py
# Copyright 2013-2022 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)
from spack import *
class Time(AutotoolsPackage, GNUMirrorPackage):
"""The time command runs another program, then displays
information about the resources used by that program."""
homepage = "https://www.gnu.org/software/time/"
gnu_mirror_path = "time/time-1.9.tar.gz"
version('1.9', sha256='fbacf0c81e62429df3e33bda4cee38756604f18e01d977338e23306a3e3b521e')
build_directory = 'spack-build'
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/perl-extutils-installpaths/package.py
|
# Copyright 2013-2022 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)
from spack import *
class PerlExtutilsInstallpaths(PerlPackage):
"""ExtUtils::InstallPaths - Build.PL install path logic made easy"""
homepage = "https://metacpan.org/pod/ExtUtils::InstallPaths"
url = "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-InstallPaths-0.012.tar.gz"
version('0.012', sha256='84735e3037bab1fdffa3c2508567ad412a785c91599db3c12593a50a1dd434ed')
depends_on('perl-extutils-config', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/ripgrep/package.py
|
# Copyright 2013-2022 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)
from spack import *
class Ripgrep(Package):
"""ripgrep is a line-oriented search tool that recursively searches
your current directory for a regex pattern. ripgrep is similar to
other popular search tools like The Silver Searcher, ack and grep.
"""
homepage = "https://github.com/BurntSushi/ripgrep"
url = "https://github.com/BurntSushi/ripgrep/archive/11.0.2.tar.gz"
version('11.0.2', sha256='0983861279936ada8bc7a6d5d663d590ad34eb44a44c75c2d6ccd0ab33490055')
depends_on('rust')
def install(self, spec, prefix):
cargo = which('cargo')
cargo('install', '--root', prefix, '--path', '.')
# needed for onig_sys
def setup_build_environment(self, env):
env.append_flags('LLVM_CONFIG_PATH',
join_path(self.spec['llvm'].prefix.libexec.llvm,
'llvm-config'))
env.append_flags('LIBCLANG_PATH', self.spec['llvm'].prefix.lib)
|
player1537-forks/spack
|
lib/spack/spack/test/flag_handlers.py
|
# Copyright 2013-2022 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 os
import pytest
import spack.build_environment
import spack.repo
import spack.spec
from spack.pkgkit import build_system_flags, env_flags, inject_flags
@pytest.fixture()
def temp_env():
old_env = os.environ.copy()
yield
os.environ.clear()
os.environ.update(old_env)
def add_o3_to_build_system_cflags(pkg, name, flags):
build_system_flags = []
if name == 'cflags':
build_system_flags.append('-O3')
return (flags, None, build_system_flags)
@pytest.mark.usefixtures('config', 'mock_packages')
class TestFlagHandlers(object):
def test_no_build_system_flags(self, temp_env):
# Test that both autotools and cmake work getting no build_system flags
s1 = spack.spec.Spec('cmake-client')
s1.concretize()
pkg1 = spack.repo.get(s1)
spack.build_environment.setup_package(pkg1, False)
s2 = spack.spec.Spec('patchelf')
s2.concretize()
pkg2 = spack.repo.get(s2)
spack.build_environment.setup_package(pkg2, False)
# Use cppflags as a canary
assert 'SPACK_CPPFLAGS' not in os.environ
assert 'CPPFLAGS' not in os.environ
def test_unbound_method(self, temp_env):
# Other tests test flag_handlers set as bound methods and functions.
# This tests an unbound method in python2 (no change in python3).
s = spack.spec.Spec('mpileaks cppflags=-g')
s.concretize()
pkg = spack.repo.get(s)
pkg.flag_handler = pkg.__class__.inject_flags
spack.build_environment.setup_package(pkg, False)
assert os.environ['SPACK_CPPFLAGS'] == '-g'
assert 'CPPFLAGS' not in os.environ
def test_inject_flags(self, temp_env):
s = spack.spec.Spec('mpileaks cppflags=-g')
s.concretize()
pkg = spack.repo.get(s)
pkg.flag_handler = inject_flags
spack.build_environment.setup_package(pkg, False)
assert os.environ['SPACK_CPPFLAGS'] == '-g'
assert 'CPPFLAGS' not in os.environ
def test_env_flags(self, temp_env):
s = spack.spec.Spec('mpileaks cppflags=-g')
s.concretize()
pkg = spack.repo.get(s)
pkg.flag_handler = env_flags
spack.build_environment.setup_package(pkg, False)
assert os.environ['CPPFLAGS'] == '-g'
assert 'SPACK_CPPFLAGS' not in os.environ
def test_build_system_flags_cmake(self, temp_env):
s = spack.spec.Spec('cmake-client cppflags=-g')
s.concretize()
pkg = spack.repo.get(s)
pkg.flag_handler = build_system_flags
spack.build_environment.setup_package(pkg, False)
assert 'SPACK_CPPFLAGS' not in os.environ
assert 'CPPFLAGS' not in os.environ
expected = set(['-DCMAKE_C_FLAGS=-g', '-DCMAKE_CXX_FLAGS=-g',
'-DCMAKE_Fortran_FLAGS=-g'])
assert set(pkg.cmake_flag_args) == expected
def test_build_system_flags_autotools(self, temp_env):
s = spack.spec.Spec('patchelf cppflags=-g')
s.concretize()
pkg = spack.repo.get(s)
pkg.flag_handler = build_system_flags
spack.build_environment.setup_package(pkg, False)
assert 'SPACK_CPPFLAGS' not in os.environ
assert 'CPPFLAGS' not in os.environ
assert 'CPPFLAGS=-g' in pkg.configure_flag_args
def test_build_system_flags_not_implemented(self, temp_env):
s = spack.spec.Spec('mpileaks cppflags=-g')
s.concretize()
pkg = spack.repo.get(s)
pkg.flag_handler = build_system_flags
# Test the command line flags method raises a NotImplementedError
try:
spack.build_environment.setup_package(pkg, False)
assert False
except NotImplementedError:
assert True
def test_add_build_system_flags_autotools(self, temp_env):
s = spack.spec.Spec('patchelf cppflags=-g')
s.concretize()
pkg = spack.repo.get(s)
pkg.flag_handler = add_o3_to_build_system_cflags
spack.build_environment.setup_package(pkg, False)
assert '-g' in os.environ['SPACK_CPPFLAGS']
assert 'CPPFLAGS' not in os.environ
assert pkg.configure_flag_args == ['CFLAGS=-O3']
def test_add_build_system_flags_cmake(self, temp_env):
s = spack.spec.Spec('cmake-client cppflags=-g')
s.concretize()
pkg = spack.repo.get(s)
pkg.flag_handler = add_o3_to_build_system_cflags
spack.build_environment.setup_package(pkg, False)
assert '-g' in os.environ['SPACK_CPPFLAGS']
assert 'CPPFLAGS' not in os.environ
assert pkg.cmake_flag_args == ['-DCMAKE_C_FLAGS=-O3']
def test_ld_flags_cmake(self, temp_env):
s = spack.spec.Spec('cmake-client ldflags=-mthreads')
s.concretize()
pkg = spack.repo.get(s)
pkg.flag_handler = build_system_flags
spack.build_environment.setup_package(pkg, False)
assert 'SPACK_LDFLAGS' not in os.environ
assert 'LDFLAGS' not in os.environ
expected = set(['-DCMAKE_EXE_LINKER_FLAGS=-mthreads',
'-DCMAKE_MODULE_LINKER_FLAGS=-mthreads',
'-DCMAKE_SHARED_LINKER_FLAGS=-mthreads',
'-DCMAKE_STATIC_LINKER_FLAGS=-mthreads'])
assert set(pkg.cmake_flag_args) == expected
def test_ld_libs_cmake(self, temp_env):
s = spack.spec.Spec('cmake-client ldlibs=-lfoo')
s.concretize()
pkg = spack.repo.get(s)
pkg.flag_handler = build_system_flags
spack.build_environment.setup_package(pkg, False)
assert 'SPACK_LDLIBS' not in os.environ
assert 'LDLIBS' not in os.environ
expected = set(['-DCMAKE_C_STANDARD_LIBRARIES=-lfoo',
'-DCMAKE_CXX_STANDARD_LIBRARIES=-lfoo',
'-DCMAKE_Fortran_STANDARD_LIBRARIES=-lfoo'])
assert set(pkg.cmake_flag_args) == expected
|
player1537-forks/spack
|
lib/spack/spack/test/cmd/list.py
|
# Copyright 2013-2022 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)
from spack.main import SpackCommand
list = SpackCommand('list')
def test_list():
output = list()
assert 'cloverleaf3d' in output
assert 'hdf5' in output
def test_list_filter(mock_packages):
output = list('py-*')
assert 'py-extension1' in output
assert 'py-extension2' in output
assert 'py-extension3' in output
assert 'python' not in output
assert 'mpich' not in output
output = list('py')
assert 'py-extension1' in output
assert 'py-extension2' in output
assert 'py-extension3' in output
assert 'python' in output
assert 'mpich' not in output
def test_list_search_description(mock_packages):
output = list('--search-description', 'one build dependency')
assert 'depb' in output
def test_list_format_name_only(mock_packages):
output = list('--format', 'name_only')
assert 'zmpi' in output
assert 'hdf5' in output
def test_list_format_version_json(mock_packages):
output = list('--format', 'version_json')
assert '{"name": "zmpi",' in output
assert '{"name": "dyninst",' in output
import json
json.loads(output)
def test_list_format_html(mock_packages):
output = list('--format', 'html')
assert '<div class="section" id="zmpi">' in output
assert '<h1>zmpi' in output
assert '<div class="section" id="hdf5">' in output
assert '<h1>hdf5' in output
def test_list_update(tmpdir, mock_packages):
update_file = tmpdir.join('output')
# not yet created when list is run
list('--update', str(update_file))
assert update_file.exists()
with update_file.open() as f:
assert f.read()
# created but older than any package
with update_file.open('w') as f:
f.write('empty\n')
update_file.setmtime(0)
list('--update', str(update_file))
assert update_file.exists()
with update_file.open() as f:
assert f.read() != 'empty\n'
# newer than any packages
with update_file.open('w') as f:
f.write('empty\n')
list('--update', str(update_file))
assert update_file.exists()
with update_file.open() as f:
assert f.read() == 'empty\n'
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/libmpdclient/package.py
|
<gh_stars>10-100
# Copyright 2013-2022 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)
from spack import *
class Libmpdclient(MesonPackage):
"""Libmpdclient is a C library which implements the Music Player
Daemon protocol."""
homepage = "https://www.musicpd.org/"
url = "https://github.com/MusicPlayerDaemon/libmpdclient/archive/v2.19.tar.gz"
version('2.19', sha256='12b566b75c3b6789ff8fc94698497d1f3fbaf0cbf9fa6c3a1e3906ef0d2bcbbb')
version('2.18', sha256='9b97d00022f2053c06d87bff40b319dfab930ee2b5fa9b8dec208a2911ca3efc')
version('2.17', sha256='06eb4b67c63f64d647e97257ff5f8506bf9c2a26b314bf5d0dd5944995b59fc9')
version('2.16', sha256='6651898489b69d2f2f8e94f0ed6ddcc0dd2cdbcf99b02131b790551922558d6c')
version('2.15', sha256='dd3d36801e397bf43719a291289ff610af71859c08f3196a506e4b1af43c290c')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-isdparser/package.py
|
<gh_stars>10-100
# Copyright 2013-2022 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)
from spack import *
class RIsdparser(RPackage):
"""Parse 'NOAA' Integrated Surface Data Files.
Tools for parsing 'NOAA' Integrated Surface Data ('ISD') files, described
at <https://www.ncdc.noaa.gov/isd>. Data includes for example, wind speed
and direction, temperature, cloud data, sea level pressure, and more.
Includes data from approximately 35,000 stations worldwide, though best
coverage is in North America/Europe/Australia. Data is stored as variable
length ASCII character strings, with most fields optional. Included are
tools for parsing entire files, or individual lines of data."""
cran = "isdparser"
version('0.4.0', sha256='6f609e8f5ae4ce2e7904401f289d60d219b8f3a2bec9f661d10afa18ab73b317')
version('0.3.0', sha256='6c9e1d7f3661802838010d659d7c77b964423dcc9a6623402df1fe3be627b7b9')
depends_on('r-tibble@1.2:', type=('build', 'run'))
depends_on('r-data-table@1.10.0:', type=('build', 'run'))
depends_on('r-lubridate', type=('build', 'run'), when='@0.4.0:')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-multcompview/package.py
|
# Copyright 2013-2022 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)
from spack import *
class RMultcompview(RPackage):
"""Visualizations of Paired Comparisons.
Convert a logical vector or a vector of p-values or a correlation,
difference, or distance matrix into a display identifying the pairs for
which the differences were not significantly different. Designed for use in
conjunction with the output of functions like TukeyHSD, dist{stats},
simint, simtest, csimint, csimtest{multcomp}, friedmanmc,
kruskalmc{pgirmess}."""
cran = "multcompView"
version('0.1-8', sha256='123d539172ad6fc63d83d1fc7f356a5ed7b691e7803827480118bebc374fd8e5')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-randomforest/package.py
|
<filename>var/spack/repos/builtin/packages/r-randomforest/package.py<gh_stars>10-100
# Copyright 2013-2022 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)
from spack import *
class RRandomforest(RPackage):
"""Breiman and Cutler's Random Forests for Classification and Regression.
Classification and regression based on a forest of trees using random
inputs."""
cran = "randomForest"
version('4.6-14', sha256='f4b88920419eb0a89d0bc5744af0416d92d112988702dc726882394128a8754d')
version('4.6-12', sha256='6e512f8f88a51c01a918360acba61f1f39432f6e690bc231b7864218558b83c4')
depends_on('r@2.5.0:', type=('build', 'run'))
depends_on('r@3.2.2:', type=('build', 'run'), when='@4.6-14:')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/perl-fth/package.py
|
# Copyright 2013-2022 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 os
import re
from spack import *
class PerlFth(Package):
"""Ftagshtml is a Fortran (and simple C) to HTML browsing,
resolves static interface overload.
It can handle some LaTeX comments inside the source files.
It only needs to be put somewhere into your disk since it uses Perl.
It also provides javatex2.pl initmak.pl getin.pl tex3ht.pl and view.pl:
(1) javatex2 complements latex2html to make nice browsing,
(2) initmak makes fortran 90 dependencies, either full deps or partial
(when interface is not modified it is silly to recompile everything)
(3) getin is an advanced search tool for Fortran variables and calls,
(4) view.pl is used for CGI search when source is on http server.
"""
homepage = "https://sourceforge.net/projects/ftagshtml/"
url = "https://downloads.sourceforge.net/project/ftagshtml/ftagshtml-0.524.tgz"
maintainers = ['cessenat']
version('0.526', sha256='ada1c7306111d59d64572fe8a9b038026fd0daebaff630924997ef2dc22d87a8')
version('0.525', sha256='378116febeb20f4b0c1e298de90305e8494335949d853c7e390d1b6386c1326a')
version('0.524', sha256='2f378e969d1dd267985342f7fb1b3a0b9fd73334627cbc7ab17d61717bcd3c29')
version('0.523', sha256='d5d3fbd3caca30eee9de45baa46612841d55b2960db8e11411af6db76cf214ad')
version('0.522', sha256='acb73eb2c05b1ed7b75f86fbd9656c00158519b3d11d89a082117004deb0fb9e')
version('0.521', sha256='f980c9cc1ce644340a9e9630ef252f92bc89a411ea0a661fcb80cdae07f0731c')
version('0.520', sha256='0ac509a7416d67f5ddc4ad9f629cb0443e1ce515cf9eb92f4272eb6b545a4c50')
version('0.519', sha256='7a440ca08a18edbc57a4a5da7c90c98551ae1adaa303c9f984e5712e1cd54ffb')
version('0.518', sha256='7aed7c831270bb1935d4ccd090ef1360ec9446dd773c10350645985047f8879b')
version('0.517', sha256='e24488a7edbfa764060f007693329d5ee3154e1ce49a627ec109c41a9d7abcbe')
variant('hevea', default=False,
description="Use hevea when inputting LaTeX files (fth.pl -hevea)")
variant('pdflatex', default=False,
description="Use pdflatex to make a LaTeX index file (fth.pl -latexindex)")
depends_on('perl', type='run')
depends_on('perl-cgi', type='run')
# Actual dependency was on etags only, but no longer in recent releases:
depends_on('emacs', type='run', when='@:0.520')
# For fth.pl -hevea option
depends_on('hevea', when='+hevea', type='run')
# Actual dependency is on pdflatex only for fth.pl -latexindex option
depends_on('texlive', when='+pdflatex', type='run')
# initmak.pl uses md5sum provided by coreutils
depends_on('coreutils', type='run')
depends_on('dos2unix', type='build')
# Patches to remove the ancient ksh shebang for fth.pl and initmak.pl.
# git diff a/bin/fth.pl b/bin/fth.pl
patch('fth-shebang.patch', when='@0.517:0.522', sha256='3e82d34c8ae1709e5480fac87db387c1c2e219d7b7d596c8a9d62f0da2439ab3')
patch('fth-shebang2.patch', when='@0.517:0.522', sha256='839be7c0efad752ae341379c81ee1df4a3a81f608f802998c6b4ebc4bae8e167')
executables = [r'^fth.pl$']
def _make_executable(self, name):
return Executable(join_path(self.prefix.bin, name + '.pl'))
def setup_dependent_package(self, module, dependent_spec):
# https://spack-tutorial.readthedocs.io/en/latest/tutorial_advanced_packaging.html
checks = ['fth', 'getin', 'view', 'javatex2', 'tex3ht', 'initmak']
for name in checks:
setattr(module, name, self._make_executable(name))
def setup_dependent_build_environment(self, env, dependent_spec):
env.set('JAVATEX_DIR', self.prefix)
env.set('FTAGSHTML_DIR', self.prefix)
env.set('FTAGSHTML_DOC', join_path(self.prefix, 'doc'))
def setup_run_environment(self, env):
# https://github.com/spack/spack/discussions/13926
# Let us set the adequate environment when loading perl-fth
env.set('JAVATEX_DIR', self.prefix)
env.set('FTAGSHTML_DIR', self.prefix)
env.set('FTAGSHTML_DOC', join_path(self.prefix, 'doc'))
def install(self, spec, prefix):
# Remove the perl shebang with the local perl
# (since ftagshtml has no Makefile.PL to do it).
checks = ['fth', 'getin', 'view', 'javatex2', 'tex3ht', 'initmak']
# mstr = '#!' + join_path(spec['perl'].prefix.bin, 'perl')
mstr = '#!' + spec['perl'].command.path
with working_dir('bin'):
for exe in checks:
fic = exe + '.pl'
if os.path.exists(fic):
dos2unix = which('dos2unix')
dos2unix(fic)
fthfile = FileFilter(fic)
fthfile.filter('#!/usr/bin/perl', mstr, backup=False)
fthfile.filter('#!/usr/bin/env perl', mstr, backup=False)
# Adds a Makefile with an rsync rule
makefile_inc = [
'RSYNC_OPTS = -avuzL',
'RSYNC = rsync',
]
makefile_inc.append('install:')
makefile_inc.append('\t$(RSYNC) $(RSYNC_OPTS) . %s' % prefix)
makefile_inc.append('')
with working_dir('.'):
with open('Makefile', 'a') as fh:
fh.write('\n'.join(makefile_inc))
# Remove obsolete ftagshtml files, if they exist:
with working_dir('bin'):
if os.path.exists("ftagshtml"):
os.remove("ftagshtml")
if os.path.exists("tata.pl"):
os.remove("tata.pl")
if os.path.exists("truc.pl"):
os.remove("truc.pl")
# Install the full directory structure
install_tree('.', prefix)
@classmethod
def determine_version(cls, exe):
output = Executable(exe)('--version', output=str, error=str)
match = re.search(r'([\d\.]+)', output)
return match.group(1) if match else None
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-adegenet/package.py
|
<reponame>player1537-forks/spack
# Copyright 2013-2022 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)
from spack import *
class RAdegenet(RPackage):
"""Exploratory Analysis of Genetic and Genomic Data.
Toolset for the exploration of genetic and genomic data. Adegenet provides
formal (S4) classes for storing and handling various genetic data,
including genetic markers with varying ploidy and hierarchical population
structure ('genind' class), alleles counts by populations ('genpop'), and
genome-wide SNP data ('genlight'). It also implements original multivariate
methods (DAPC, sPCA), graphics, statistical tests, simulation tools,
distance and similarity measures, and several spatial methods. A range of
both empirical and simulated datasets is also provided to illustrate
various methods."""
cran = "adegenet"
version('2.1.5', sha256='e4eee8c41dae6cb0841db74ec6f9adb2580873f3e313471f37df58324c1857f2')
version('2.1.3', sha256='0790114ecb22642683b5be1f4b3a6a49856e06dc2f9e21b9cba4390c2257f6c6')
version('2.1.1', sha256='3043fe5d731a38ff0e266f090dcda448640c3d0fd61934c76da32d082e5dce7a')
version('2.1.0', sha256='7ee44061002b41164bbc09256307ab02e536f4f2ac03f36c7dc8f85f6af4639a')
version('2.0.1', sha256='7eddf46e64f680d54d034b68c50900d9bd5bc2e08309d062e230121b7460bb10')
depends_on('r@2.14:', type=('build', 'run'))
depends_on('r-ade4', type=('build', 'run'))
depends_on('r-mass', type=('build', 'run'))
depends_on('r-igraph', type=('build', 'run'))
depends_on('r-ape', type=('build', 'run'))
depends_on('r-shiny', type=('build', 'run'))
depends_on('r-ggplot2', type=('build', 'run'))
depends_on('r-seqinr', type=('build', 'run'))
depends_on('r-boot', type=('build', 'run'))
depends_on('r-reshape2', type=('build', 'run'))
depends_on('r-dplyr@0.4.1:', type=('build', 'run'))
depends_on('r-vegan', type=('build', 'run'))
depends_on('r-spdep', type=('build', 'run'), when='@:2.1.3')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/perl-xml-sax/package.py
|
# Copyright 2013-2022 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)
from spack import *
class PerlXmlSax(PerlPackage):
"""XML::SAX is a SAX parser access API for Perl. It includes classes and
APIs required for implementing SAX drivers, along with a factory class for
returning any SAX parser installed on the user's system."""
homepage = "https://metacpan.org/pod/XML::SAX"
url = "https://cpan.metacpan.org/authors/id/G/GR/GRANTM/XML-SAX-1.02.tar.gz"
version('1.02', sha256='4506c387043aa6a77b455f00f57409f3720aa7e553495ab2535263b4ed1ea12a')
depends_on('perl-xml-namespacesupport', type=('build', 'run'))
depends_on('perl-xml-sax-base', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-aniso8601/package.py
|
<reponame>player1537-forks/spack<gh_stars>10-100
# Copyright 2013-2022 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)
from spack import *
class PyAniso8601(PythonPackage):
"""A library for parsing ISO 8601 strings."""
homepage = "https://bitbucket.org/nielsenb/aniso8601"
pypi = "aniso8601/aniso8601-9.0.1.tar.gz"
version('9.0.1', sha256='72e3117667eedf66951bb2d93f4296a56b94b078a8a95905a052611fb3f1b973')
depends_on('py-setuptools', type='build')
|
player1537-forks/spack
|
lib/spack/spack/test/cmd/resource.py
|
# Copyright 2013-2022 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)
from spack.main import SpackCommand
resource = SpackCommand('resource')
#: these are hashes used in mock packages
mock_hashes = [
'abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234',
'1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd',
'b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c',
'c45c1564f70def3fc1a6e22139f62cb21cd190cc3a7dbe6f4120fa59ce33dcb8',
'24eceabef5fe8f575ff4b438313dc3e7b30f6a2d1c78841fbbe3b9293a589277',
'689b8f9b32cb1d2f9271d29ea3fca2e1de5df665e121fca14e1364b711450deb',
'ebe27f9930b99ebd8761ed2db3ea365142d0bafd78317efb4baadf62c7bf94d0',
'208fcfb50e5a965d5757d151b675ca4af4ce2dfd56401721b6168fae60ab798f',
'bf07a7fbb825fc0aae7bf4a1177b2b31fcf8a3feeaf7092761e18c859ee52a9c',
'7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730',
]
def test_resource_list(mock_packages, capfd):
with capfd.disabled():
out = resource('list')
for h in mock_hashes:
assert h in out
assert 'url:' in out
assert 'applies to:' in out
assert 'patched by:' in out
assert 'path:' in out
assert 'repos/builtin.mock/packages/patch-a-dependency/libelf.patch' in out
assert 'applies to: builtin.mock.libelf' in out
assert 'patched by: builtin.mock.patch-a-dependency' in out
def test_resource_list_only_hashes(mock_packages, capfd):
with capfd.disabled():
out = resource('list', '--only-hashes')
for h in mock_hashes:
assert h in out
def test_resource_show(mock_packages, capfd):
with capfd.disabled():
out = resource('show', 'c45c1564f70def3fc1a6e22139f62cb21cd190cc3a7dbe6f4120fa59ce33dcb8')
assert out.startswith('c45c1564f70def3fc1a6e22139f62cb21cd190cc3a7dbe6f4120fa59ce33dcb8')
assert 'repos/builtin.mock/packages/patch-a-dependency/libelf.patch' in out
assert 'applies to: builtin.mock.libelf' in out
assert 'patched by: builtin.mock.patch-a-dependency' in out
assert len(out.strip().split('\n')) == 4
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/parallel-netcdf/package.py
|
<gh_stars>10-100
# Copyright 2013-2022 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 os
from spack import *
class ParallelNetcdf(AutotoolsPackage):
"""PnetCDF (Parallel netCDF) is a high-performance parallel I/O
library for accessing files in format compatibility with Unidata's
NetCDF, specifically the formats of CDF-1, 2, and 5.
"""
homepage = "https://parallel-netcdf.github.io/"
git = "https://github.com/Parallel-NetCDF/PnetCDF"
url = "https://parallel-netcdf.github.io/Release/pnetcdf-1.11.0.tar.gz"
list_url = "https://parallel-netcdf.github.io/wiki/Download.html"
maintainers = ['skosukhin']
tags = ['e4s']
test_requires_compiler = True
def url_for_version(self, version):
if version >= Version('1.11.0'):
url = "https://parallel-netcdf.github.io/Release/pnetcdf-{0}.tar.gz"
else:
url = "https://parallel-netcdf.github.io/Release/parallel-netcdf-{0}.tar.gz"
return url.format(version.dotted)
version('master', branch='master')
version('1.12.2', sha256='3ef1411875b07955f519a5b03278c31e566976357ddfc74c2493a1076e7d7c74')
version('1.12.1', sha256='56f5afaa0ddc256791c405719b6436a83b92dcd5be37fe860dea103aee8250a2')
version('1.11.2', sha256='d2c18601b364c35b5acb0a0b46cd6e14cae456e0eb854e5c789cf65f3cd6a2a7')
version('1.11.1', sha256='0c587b707835255126a23c104c66c9614be174843b85b897b3772a590be45779')
version('1.11.0', sha256='a18a1a43e6c4fd7ef5827dbe90e9dcf1363b758f513af1f1356ed6c651195a9f')
version('1.10.0', sha256='ed189228b933cfeac3b7b4f8944eb00e4ff2b72cf143365b1a77890980663a09')
version('1.9.0', sha256='356e1e1fae14bc6c4236ec11435cfea0ff6bde2591531a4a329f9508a01fbe98')
version('1.8.1', sha256='8d7d4c9c7b39bb1cbbcf087e0d726551c50f0cc30d44aed3df63daf3772c9043')
version('1.8.0', sha256='ac00bb2333bee96354de9d9c32d3dfdaa919d878098762f146996578b7f0ede9')
version('1.7.0', sha256='52f0d106c470a843c6176318141f74a21e6ece3f70ee8fe261c6b93e35f70a94')
version('1.6.1', sha256='8cf1af7b640475e3cc931e5fbcfe52484c5055f2fab526691933c02eda388aae')
variant('cxx', default=True, description='Build the C++ Interface')
variant('fortran', default=True, description='Build the Fortran Interface')
variant('pic', default=True,
description='Produce position-independent code (for shared libs)')
variant('shared', default=True, description='Enable shared library')
variant('burstbuffer', default=False, description='Enable burst buffer feature')
depends_on('mpi')
depends_on('m4', type='build')
depends_on('autoconf', when='@master', type='build')
depends_on('automake', when='@master', type='build')
depends_on('libtool', when='@master', type='build')
depends_on('perl', type='build')
# Suport for shared libraries was introduced in version 1.9.0
conflicts('+shared', when='@:1.8')
conflicts('+burstbuffer', when='@:1.10')
# Before 1.10.0, C utility programs (e.g. ncmpigen) were linked without
# explicit specification of the Fortran runtime libraries, which is
# required when libpnetcdf.so contains Fortran symbols. Libtool sets the
# required linking flags implicitly but only if the Fortran compiler
# produces verbose output with the '-v' flag (and, due to a bug in Libtool,
# when CXX is not set to 'no'; see macro _LT_LANG_FC_CONFIG in libtool.m4
# for more details). The latter is not the case for NAG. Starting 1.10.0,
# the required linking flags are explicitly set in the makefiles and
# detected using macro AC_FC_LIBRARY_LDFLAGS, which means that we can
# override the verbose output flag for Fortran compiler on the command line
# (see below).
conflicts('+shared', when='@:1.9%nag+fortran')
# https://github.com/Parallel-NetCDF/PnetCDF/pull/59
patch('nag_libtool.patch', when='@1.9:1.12.1%nag')
# We could apply the patch unconditionally. However, it fixes a problem
# that manifests itself only when we build shared libraries with Spack on
# a Cray system with PGI compiler. Based on the name of the $CC executable,
# Libtool "thinks" that it works with PGI compiler directly but on a Cray
# system it actually works with the Cray's wrapper. PGI compiler (at least
# since the version 15.7) "understands" two formats of the
# '--whole-archive' argument. Unluckily, Cray's wrapper "understands" only
# one of them but Libtool switches to another one. The following patch
# discards the switching.
patch('cray_pgi_libtool_release.patch',
when='@1.8:999%pgi+shared platform=cray')
# Given that the bug manifests itself in rather specific conditions, it is
# not reported upstream.
patch('cray_pgi_libtool_master.patch',
when='@master%pgi+shared platform=cray')
@property
def libs(self):
libraries = ['libpnetcdf']
query_parameters = self.spec.last_query.extra_parameters
if 'shared' in query_parameters:
shared = True
elif 'static' in query_parameters:
shared = False
else:
shared = '+shared' in self.spec
libs = find_libraries(
libraries, root=self.prefix, shared=shared, recursive=True
)
if libs:
return libs
msg = 'Unable to recursively locate {0} {1} libraries in {2}'
raise spack.error.NoLibrariesError(
msg.format('shared' if shared else 'static',
self.spec.name,
self.spec.prefix))
@when('@master')
def autoreconf(self, spec, prefix):
with working_dir(self.configure_directory):
# We do not specify '-f' because we need to use libtool files from
# the repository.
autoreconf('-iv')
def configure_args(self):
args = ['--with-mpi=%s' % self.spec['mpi'].prefix,
'SEQ_CC=%s' % spack_cc]
args += self.enable_or_disable('cxx')
args += self.enable_or_disable('fortran')
flags = {
'CFLAGS': [],
'CXXFLAGS': [],
'FFLAGS': [],
'FCFLAGS': [],
}
if '+pic' in self.spec:
flags['CFLAGS'].append(self.compiler.cc_pic_flag)
flags['CXXFLAGS'].append(self.compiler.cxx_pic_flag)
flags['FFLAGS'].append(self.compiler.f77_pic_flag)
flags['FCFLAGS'].append(self.compiler.fc_pic_flag)
# https://github.com/Parallel-NetCDF/PnetCDF/issues/61
if self.spec.satisfies('%gcc@10:'):
flags['FFLAGS'].append('-fallow-argument-mismatch')
flags['FCFLAGS'].append('-fallow-argument-mismatch')
for key, value in sorted(flags.items()):
if value:
args.append('{0}={1}'.format(key, ' '.join(value)))
if self.version >= Version('1.8'):
args.append('--enable-relax-coord-bound')
if self.version >= Version('1.9'):
args += self.enable_or_disable('shared')
args.extend(['--enable-static',
'--disable-silent-rules'])
if self.spec.satisfies('%nag+fortran+shared'):
args.extend(['ac_cv_prog_fc_v=-Wl,-v',
'ac_cv_prog_f77_v=-Wl,-v'])
if '+burstbuffer' in self.spec:
args.append('--enable-burst-buffering')
return args
examples_src_dir = join_path('examples', 'CXX')
@run_after('install')
def cache_test_sources(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
self.cache_extra_test_sources([self.examples_src_dir])
def test(self):
test_dir = join_path(self.test_suite.current_test_cache_dir,
self.examples_src_dir)
# pnetcdf has many examples to serve as a suitable smoke check.
# column_wise was chosen based on the E4S test suite. Other
# examples should work as well.
test_exe = 'column_wise'
options = ['{0}.cpp'.format(test_exe), '-o', test_exe, '-lpnetcdf',
'-L{0}'.format(self.prefix.lib),
'-I{0}'.format(self.prefix.include)]
reason = 'test: compiling and linking pnetcdf example'
self.run_test(self.spec['mpi'].mpicxx, options, [],
installed=False, purpose=reason, work_dir=test_dir)
mpiexe_list = [self.spec['mpi'].prefix.bin.srun,
self.spec['mpi'].prefix.bin.mpirun,
self.spec['mpi'].prefix.bin.mpiexec]
for mpiexe in mpiexe_list:
if os.path.isfile(mpiexe):
self.run_test(mpiexe, ['-n', '1', test_exe], [],
installed=False,
purpose='test: pnetcdf smoke test',
skip_missing=True,
work_dir=test_dir)
break
self.run_test('rm', ['-f', test_exe], work_dir=test_dir)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/sdl2-image/package.py
|
<reponame>player1537-forks/spack
# Copyright 2013-2022 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)
from spack import *
class Sdl2Image(AutotoolsPackage):
"""SDL is designed to provide the bare bones of creating a graphical
program. """
homepage = "http://sdl.beuc.net/sdl.wiki/SDL_image"
url = "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.1.tar.gz"
version('2.0.1', sha256='3a3eafbceea5125c04be585373bfd8b3a18f259bd7eae3efc4e6d8e60e0d7f64')
depends_on('sdl2')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/libcap/package.py
|
# Copyright 2013-2022 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)
from spack import *
class Libcap(MakefilePackage):
"""Libcap implements the user-space interfaces to the POSIX 1003.1e
capabilities available in Linux kernels. These capabilities are a
partitioning of the all powerful root privilege into a set of
distinct privileges."""
homepage = "https://sites.google.com/site/fullycapable/"
url = "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.25.tar.gz"
version('2.25', sha256='4ca80dc6f9f23d14747e4b619fd9784434c570e24a7346f326c692784ed83a86')
patch('libcap-fix-the-libcap-native-building-failure-on-CentOS-6.7.patch')
def install(self, spec, prefix):
make_args = [
'RAISE_SETFCAP=no',
'lib=lib',
'prefix={0}'.format(prefix),
'install'
]
make(*make_args)
chmod = which('chmod')
chmod('+x', join_path(prefix.lib, 'libcap.so'))
|
player1537-forks/spack
|
lib/spack/external/macholib/_cmdline.py
|
<gh_stars>10-100
"""
Internal helpers for basic commandline tools
"""
from __future__ import absolute_import, print_function
import os
import sys
from macholib.util import is_platform_file
def check_file(fp, path, callback):
if not os.path.exists(path):
print(
"%s: %s: No such file or directory" % (sys.argv[0], path), file=sys.stderr
)
return 1
try:
is_plat = is_platform_file(path)
except IOError as msg:
print("%s: %s: %s" % (sys.argv[0], path, msg), file=sys.stderr)
return 1
else:
if is_plat:
callback(fp, path)
return 0
def main(callback):
args = sys.argv[1:]
name = os.path.basename(sys.argv[0])
err = 0
if not args:
print("Usage: %s filename..." % (name,), file=sys.stderr)
return 1
for base in args:
if os.path.isdir(base):
for root, _dirs, files in os.walk(base):
for fn in files:
err |= check_file(sys.stdout, os.path.join(root, fn), callback)
else:
err |= check_file(sys.stdout, base, callback)
return err
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-mne/package.py
|
# Copyright 2013-2022 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)
from spack import *
class PyMne(PythonPackage):
"""MNE python project for MEG and EEG data analysis."""
homepage = "http://mne.tools/"
pypi = "mne/mne-0.23.4.tar.gz"
version('0.23.4', sha256='ecace5caacf10961ebb74cc5e0ead4d4dbc55fed006eab1e644da144092354e9')
version('0.18.2', sha256='aa2e72ad3225efdad39b05e67cd5c88dbd5c3fabf5e1705e459347131f114bc6')
variant('full', default=False, description="Enable full functionality.")
depends_on('python@3.6:', when='@0.23:', type=('build', 'run'))
depends_on('python@3.5:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('py-numpy@1.15.4:', when='@0.23:', type=('build', 'run'))
depends_on('py-numpy@1.11.3:', type=('build', 'run'))
depends_on('py-scipy@1.1.0:', when='@0.23:', type=('build', 'run'))
depends_on('py-scipy@0.17.1:', type=('build', 'run'))
with when('+full'):
# requirements.txt with versions specified in README.rst (marked with *)
depends_on('py-matplotlib@3.0.3:', type=('build', 'run')) # *
depends_on('py-pyqt5@5.10:,:5.15.1,5.15.4:', when='platform=linux', type=('build', 'run'))
depends_on('py-pyqt5@5.10:,:5.13', when='platform=darwin', type=('build', 'run'))
depends_on('py-pyqt5@5.10:,:5.15.2,5.15.4:', when='platform=cray', type=('build', 'run'))
depends_on('py-pyqt5@5.10:,:5.15.2,5.15.4:', when='platform=win32', type=('build', 'run'))
depends_on('py-pyqt5-sip', type=('build', 'run'))
depends_on('py-sip', type=('build', 'run'))
depends_on('py-scikit-learn@0.20.2:', type=('build', 'run')) # *
depends_on('py-nibabel@2.1.0:', type=('build', 'run')) # *
depends_on('py-numba@0.40:', type=('build', 'run')) # *
depends_on('py-h5py', type=('build', 'run'))
depends_on('py-pandas@0.23.4:', type=('build', 'run')) # *
depends_on('py-numexpr', type=('build', 'run'))
depends_on('py-jupyter', type=('build', 'run'))
depends_on('py-python-picard@0.3:', type=('build', 'run')) # *
depends_on('py-statsmodels', type=('build', 'run'))
depends_on('py-joblib', type=('build', 'run'))
depends_on('py-psutil', type=('build', 'run'))
depends_on('py-dipy@0.10.1:', type=('build', 'run')) # *
depends_on('vtk+python', type=('build', 'run'))
depends_on('vtk+python@:8.1', when='platform=darwim', type=('build', 'run'))
depends_on('py-mayavi', type=('build', 'run'))
depends_on('py-pysurfer+save_movie', type=('build', 'run'))
depends_on('py-nilearn', type=('build', 'run'))
depends_on('py-xlrd', type=('build', 'run'))
depends_on('py-imageio@2.6.1:', type=('build', 'run')) # *
depends_on('py-imageio-ffmpeg@0.4.1:', type=('build', 'run'))
depends_on('py-pyvista@0.24:', type=('build', 'run')) # *
depends_on('py-pyvistaqt@0.2.0:', type=('build', 'run')) # *
depends_on('py-tqdm', type=('build', 'run'))
depends_on('py-mffpy@0.5.7:', type=('build', 'run')) # *
depends_on('py-ipywidgets', type=('build', 'run'))
depends_on('py-ipyvtk-simple', type=('build', 'run'))
# README.rst
# depends_on('py-cupy@4.0:', type=('build', 'run')) # not yet in spack
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-samr/package.py
|
<reponame>player1537-forks/spack<filename>var/spack/repos/builtin/packages/r-samr/package.py<gh_stars>10-100
# Copyright 2013-2022 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)
from spack import *
class RSamr(RPackage):
"""SAM: Significance Analysis of Microarrays.
Significance Analysis of Microarrays for differential expression analysis,
RNAseq data and related problems."""
cran = "samr"
version('3.0', sha256='25f88ac002c2adce8881a562241bc12d683810a05defb553e8e3d4878f037506')
version('2.0', sha256='090b5becd91d60f4bb8269df5c9bc19a03c09917d327b28e75b0ee7b80624e67')
depends_on('r-impute', type=('build', 'run'))
depends_on('r-matrixstats', type=('build', 'run'))
depends_on('r-shiny', type=('build', 'run'), when='@3.0:')
depends_on('r-shinyfiles', type=('build', 'run'), when='@3.0:')
depends_on('r-openxlsx', type=('build', 'run'), when='@3.0:')
depends_on('r-gsa', type=('build', 'run'), when='@3.0:')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/iproute2/package.py
|
# Copyright 2013-2022 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)
from spack import *
class Iproute2(AutotoolsPackage):
"""This is a set of utilities for Linux networking."""
homepage = "https://github.com/shemminger/iproute2"
url = "https://github.com/shemminger/iproute2/archive/v5.9.0.tar.gz"
depends_on('bison', type='build')
depends_on('flex', type='build')
depends_on('libmnl')
version('5.11.0', sha256='16b79e6ce65d4d5fd425cef2fd92a58c403a93faeeed0e0a3202b36a8e857d1f')
version('5.10.0', sha256='164f1de457eefbdadb98d82c309a0977542b34e7a2dfe81e497a0b93675cb3d2')
version('5.9.0', sha256='1afde56d416f136b1236ac2f8276e4edbe114ca3c2ab12f11af11b84cf0992e4')
version('5.8.0', sha256='78c73ed49c35fae59ab4e9d88220dcc70da924de3838e13a3cdc7c09496e5a45')
version('5.7.0', sha256='12a3861f463c6bbd1bb3b213ac734f75c89172b74104140dd0bbfcb1e13ee798')
version('5.6.0', sha256='be41c35eddb02e736a2040b66ccfacee41fe7ee454580588f8959568d8a3c5b3')
version('5.5.0', sha256='5bc88876a3140f640e3318453382be5be4c673ccc17a518c05a5ce2ef9aa9a7f')
def install(self, spec, prefix):
make('install', 'DESTDIR={0}'.format(prefix), 'PREFIX=')
def setup_run_environment(self, env):
env.prepend_path('PATH', self.prefix.sbin)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/perl-extutils-helpers/package.py
|
<filename>var/spack/repos/builtin/packages/perl-extutils-helpers/package.py
# Copyright 2013-2022 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)
from spack import *
class PerlExtutilsHelpers(PerlPackage):
"""ExtUtils::Helpers - Various portability utilities for module builders"""
homepage = "https://metacpan.org/pod/ExtUtils::Helpers"
url = "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Helpers-0.026.tar.gz"
version('0.026', sha256='de901b6790a4557cf4ec908149e035783b125bf115eb9640feb1bc1c24c33416')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/compiz/package.py
|
<filename>var/spack/repos/builtin/packages/compiz/package.py
# Copyright 2013-2022 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)
from spack import *
class Compiz(AutotoolsPackage, XorgPackage):
"""compiz - OpenGL window and compositing manager.
Compiz is an OpenGL compositing manager that use
GLX_EXT_texture_from_pixmap for binding redirected top-level
windows to texture objects. It has a flexible plug-in system
and it is designed to run well on most graphics hardware."""
homepage = "http://www.compiz.org/"
xorg_mirror_path = "app/compiz-0.7.8.tar.gz"
version('0.7.8', sha256='b46f52b776cc78e85357a07688d04b36ec19c65eadeaf6f6cfcca7b8515e6503')
depends_on('libxcb')
depends_on('libxcomposite')
depends_on('libxfixes')
depends_on('libxdamage')
depends_on('libxrandr')
depends_on('libxinerama')
depends_on('libice')
depends_on('libsm')
depends_on('libxml2')
depends_on('libxslt')
# TODO: add dependencies
# libstartup-notification-1.0 >= 0.7
depends_on('libxrender')
depends_on('libpng')
depends_on('glib')
depends_on('gconf')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-mouseinfo/package.py
|
<filename>var/spack/repos/builtin/packages/py-mouseinfo/package.py<gh_stars>10-100
# Copyright 2013-2022 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)
from spack import *
class PyMouseinfo(PythonPackage):
"""An application to display XY position and RGB color
information for the pixel currently under the mouse. Works
on Python 2 and 3. This is useful for GUI automation
planning."""
homepage = "https://github.com/asweigart/mouseinfo"
pypi = "MouseInfo/MouseInfo-0.1.3.tar.gz"
version('0.1.3', sha256='2c62fb8885062b8e520a3cce0a297c657adcc08c60952eb05bc8256ef6f7f6e7')
depends_on('python@2.7,3.2:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
# rubicon-objc;platform_system=="Darwin"',
# 'python3-Xlib;platform_system=="Linux" and python_version>="3.0"',
# 'Xlib;platform_system=="Linux" and python_version<"3.0"',
# Conflicting until rubicon-objc exists
conflicts('platform=darwin')
depends_on('py-python3-xlib', when='^python@3 platform=linux', type=('build', 'run'))
depends_on('py-python-xlib', when='^python@2 platform=linux', type=('build', 'run'))
depends_on('py-pyperclip', type=('build', 'run'))
depends_on('pil@5.2.0:', when='^python@3.7:', type=('build', 'run'))
depends_on('pil@4.0.0:', when='^python@3.6', type=('build', 'run'))
depends_on('pil@3.2.0:', when='^python@3.5', type=('build', 'run'))
depends_on('pil@2.5.0:5.4.1', when='^python@3.4', type=('build', 'run'))
depends_on('pil@2.0.0:4.3.0', when='^python@3.3', type=('build', 'run'))
depends_on('pil@2.0.0:3.4.2', when='^python@3.2', type=('build', 'run'))
depends_on('pil@2.0.0:', when='^python@2.7', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-fdb-infiniummethylation-hg19/package.py
|
# Copyright 2013-2022 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)
from spack import *
class RFdbInfiniummethylationHg19(RPackage):
"""Annotation package for Illumina Infinium DNA methylation probes.
Compiled HumanMethylation27 and HumanMethylation450 annotations."""
# No available git repository
bioc = "FDb.InfiniumMethylation.hg19"
url = "https://bioconductor.org/packages/release/data/annotation/src/contrib/FDb.InfiniumMethylation.hg19_2.2.0.tar.gz"
version('2.2.0', sha256='605aa3643588a2f40a942fa760b92662060a0dfedb26b4e4cd6f1a78b703093f')
depends_on('r@2.10:', type=('build', 'run'))
depends_on('r-genomicfeatures@1.7.22:', type=('build', 'run'))
depends_on('r-txdb-hsapiens-ucsc-hg19-knowngene', type=('build', 'run'))
depends_on('r-org-hs-eg-db', type=('build', 'run'))
depends_on('r-annotationdbi', type=('build', 'run'))
depends_on('r-biostrings', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/hyperscan/package.py
|
# Copyright 2013-2022 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 platform
from spack import *
_versions = {
'v5.2.1': {
'Linux-aarch64': ('d2ac1669154ec27b794b64d026ad09caecee6e5e17fd35107595a7517711d2b9', 'https://github.com/kunpengcompute/hyperscan/archive/v5.2.1.aarch64.tar.gz'),
'Linux-x86_64': ('fd879e4ee5ecdd125e3a79ef040886978ae8f1203832d5a3f050c48f17eec867', 'https://github.com/intel/hyperscan/archive/v5.2.1.tar.gz')
}
}
class Hyperscan(CMakePackage):
"""High-performance regular expression matching library."""
homepage = "https://www.hyperscan.io/"
url = "https://github.com/intel/hyperscan/archive/v5.2.1.tar.gz"
for ver, packages in _versions.items():
key = "{0}-{1}".format(platform.system(), platform.machine())
pkg = packages.get(key)
if pkg:
version(ver, sha256=pkg[0], url=pkg[1])
depends_on('boost')
depends_on('pcre')
depends_on('ragel', type='build')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-compquadform/package.py
|
# Copyright 2013-2022 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)
from spack import *
class RCompquadform(RPackage):
"""Distribution Function of Quadratic Forms in Normal Variables.
Computes the distribution function of quadratic forms in normal variables
using Imhof's method, Davies's algorithm, Farebrother's algorithm or Liu et
al.'s algorithm."""
cran = "CompQuadForm"
version('1.4.3', sha256='042fc56c800dd8f5f47a017e2efa832caf74f0602824abf7099898d9708660c4')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/argtable/package.py
|
<gh_stars>10-100
# Copyright 2013-2022 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)
from spack import *
class Argtable(AutotoolsPackage):
"""Argtable is an ANSI C library for parsing GNU style command line
options with a minimum of fuss.
"""
homepage = "http://argtable.sourceforge.net/"
url = "https://sourceforge.net/projects/argtable/files/argtable/argtable-2.13/argtable2-13.tar.gz/download"
version('2-13', sha256='8f77e8a7ced5301af6e22f47302fdbc3b1ff41f2b83c43c77ae5ca041771ddbf')
|
player1537-forks/spack
|
lib/spack/spack/cmd/restage.py
|
<reponame>player1537-forks/spack<filename>lib/spack/spack/cmd/restage.py<gh_stars>10-100
# Copyright 2013-2022 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 llnl.util.tty as tty
import spack.cmd
import spack.cmd.common.arguments as arguments
import spack.repo
description = "revert checked out package source code"
section = "build"
level = "long"
def setup_parser(subparser):
arguments.add_common_arguments(subparser, ['specs'])
def restage(parser, args):
if not args.specs:
tty.die("spack restage requires at least one package spec.")
specs = spack.cmd.parse_specs(args.specs, concretize=True)
for spec in specs:
package = spack.repo.get(spec)
package.do_restage()
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/nlcglib/package.py
|
# Copyright 2013-2022 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)
from spack import *
class Nlcglib(CMakePackage, CudaPackage):
"""Nonlinear CG methods for wave-function optimization in DFT."""
homepage = "https://github.com/simonpintarelli/nlcglib"
git = "https://github.com/simonpintarelli/nlcglib.git"
url = "https://github.com/simonpintarelli/nlcglib/archive/v0.9.tar.gz"
maintainers = ['simonpintarelli']
version('master', branch='master')
version('develop', branch='develop')
version('0.9', sha256='8d5bc6b85ee714fb3d6480f767e7f43e5e7d569116cf60e48f533a7f50a37a08')
variant('wrapper', default=False,
description='Use nvcc-wrapper for CUDA build')
variant('openmp', default=False)
variant('build_type', default='Release',
description='CMake build type',
values=('Debug', 'Release', 'RelWithDebInfo'))
depends_on('lapack')
depends_on('kokkos +cuda~cuda_relocatable_device_code+cuda_lambda')
depends_on('kokkos-nvcc-wrapper', when='+wrapper')
depends_on('kokkos +cuda~cuda_relocatable_device_code+cuda_lambda+wrapper', when='+wrapper')
depends_on("cmake@3.15:", type='build')
depends_on('kokkos+cuda~cuda_relocatable_device_code+cuda_lambda+openmp+wrapper', when='+openmp+wrapper')
def cmake_args(self):
options = []
if '+openmp' in self.spec:
options.append('-DUSE_OPENMP=On')
else:
options.append('-DUSE_OPENMP=Off')
if self.spec['blas'].name in ['intel-mkl', 'intel-parallel-studio']:
options.append('-DLAPACK_VENDOR=MKL')
elif self.spec['blas'].name in ['openblas']:
options.append('-DLAPACK_VENDOR=OpenBLAS')
else:
raise Exception('blas/lapack must be either openblas or mkl.')
options.append('-DBUILD_TESTS=OFF')
if '+wrapper' in self.spec:
options.append('-DCMAKE_CXX_COMPILER=%s' %
self.spec['kokkos-nvcc-wrapper'].kokkos_cxx)
if '+cuda' in self.spec:
cuda_arch = self.spec.variants['cuda_arch'].value
if cuda_arch[0] != 'none':
options += [
'-DCMAKE_CUDA_FLAGS=-arch=sm_{0}'.format(cuda_arch[0])
]
return options
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/masurca/package.py
|
<filename>var/spack/repos/builtin/packages/masurca/package.py
# Copyright 2013-2022 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)
from spack import *
class Masurca(Package):
"""MaSuRCA is whole genome assembly software. It combines the efficiency
of the de Bruijn graph and Overlap-Layout-Consensus (OLC)
approaches."""
homepage = "http://www.genome.umd.edu/masurca.html"
url = "https://github.com/alekseyzimin/masurca/releases/download/v3.3.1/MaSuRCA-3.3.1.tar.gz"
version('4.0.5', sha256='db525c26f2b09d6b359a2830fcbd4a3fdc65068e9a116c91076240fd1f5924ed')
version('4.0.1', sha256='68628acaf3681d09288b48a35fec7909b347b84494fb26c84051942256299870')
version('3.3.1', sha256='587d0ee2c6b9fbd3436ca2a9001e19f251b677757fe5e88e7f94a0664231e020')
version('3.2.9', sha256='795ad4bd42e15cf3ef2e5329aa7e4f2cdeb7e186ce2e350a45127e319db2904b')
depends_on('perl', type=('build', 'run'))
depends_on('boost')
depends_on('zlib')
patch('arm.patch', when='target=aarch64:')
def patch(self):
filter_file('#include <sys/sysctl.h>', '',
'global-1/CA8/src/AS_BAT/memoryMappedFile.H')
if self.spec.target.family == 'aarch64':
for makefile in 'Makefile.am', 'Makefile.in':
m = join_path('global-1', 'prepare', makefile)
filter_file('-minline-all-stringops', '', m)
m = join_path('global-1', makefile)
filter_file('-minline-all-stringops', '', m)
def setup_build_environment(self, env):
if '@4:' in self.spec:
env.set('DEST', self.prefix)
def install(self, spec, prefix):
installer = Executable('./install.sh')
installer()
if '@:4' in self.spec:
install_tree('.', prefix)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-selectr/package.py
|
# Copyright 2013-2022 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)
from spack import *
class RSelectr(RPackage):
"""Translate CSS Selectors to XPath Expressions.
Translates a CSS3 selector into an equivalent XPath expression. This allows
us to use CSS selectors when working with the XML package as it can only
evaluate XPath expressions. Also provided are convenience functions useful
for using CSS selectors on XML nodes. This package is a port of the Python
package 'cssselect' (<https://cssselect.readthedocs.io/>)."""
cran = "selectr"
version('0.4-2', sha256='5588aed05f3f5ee63c0d29953ef53da5dac7afccfdd04b7b22ef24e1e3b0c127')
version('0.4-1', sha256='8bd42f167629344e485e586f9b05fed342746132489079084d82133d7b3ee2ca')
version('0.4-0', sha256='40cd51bfe499954b300742c49f92167a68964b974268a7f47ca8864f32020ece')
version('0.3-1', sha256='db4f7ceea4b522a54c3ae7709787b0b7fcf389c5d945c5a278e3625388218949')
depends_on('r@3.0:', type=('build', 'run'))
depends_on('r-stringr', type=('build', 'run'))
depends_on('r-r6', type=('build', 'run'), when='@0.4-0:')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-rsatoolbox/package.py
|
# Copyright 2013-2022 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)
from spack import *
class PyRsatoolbox(PythonPackage):
"""Representational Similarity Analysis (RSA) in Python."""
homepage = "https://github.com/rsagroup/rsatoolbox"
pypi = "rsatoolbox/rsatoolbox-0.0.3.tar.gz"
version('0.0.3', sha256='9bf6e16d9feadc081f9daaaaab7ef38fc1cd64dd8ef0ccd9f74adb5fe6166649')
depends_on('py-setuptools', type='build')
depends_on('py-coverage', type=('build', 'run'))
depends_on('py-numpy@1.21.2:', type=('build', 'run'))
depends_on('py-scipy', type=('build', 'run'))
depends_on('py-scikit-learn', type=('build', 'run'))
depends_on('py-scikit-image', type=('build', 'run'))
depends_on('py-tqdm', type=('build', 'run'))
depends_on('py-h5py', type=('build', 'run'))
depends_on('py-matplotlib', type=('build', 'run'))
depends_on('py-joblib', type=('build', 'run'))
def patch(self):
# tests are looking for a not existing requirements.txt file
with working_dir('tests'):
open('requirements.txt', 'a').close()
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/elasticsearch/package.py
|
# Copyright 2013-2022 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)
from spack import *
class Elasticsearch(Package):
"""Elasticsearch is a search engine based on Lucene. It provides a
distributed, multitenant-capable full-text search engine with an HTTP web
interface and schema-free JSON documents.
"""
homepage = "https://www.elastic.co/"
url = "https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.4.tar.gz"
version('6.4.0', sha256='e9786efb5cecd12adee2807c7640ba9a1ab3b484d2e87497bb8d0b6df0e24f01')
version('6.3.0', sha256='0464127140820d82b24bd2830232131ea85bcd49267a8bc7365e4fa391dee2a3')
version('6.2.4', sha256='91e6f1ea1e1dd39011e7a703d2751ca46ee374665b08b0bfe17e0c0c27000e8e')
depends_on('java', type='run')
def install(self, spec, prefix):
dirs = [
'bin',
'config',
'lib',
'modules',
'plugins']
for d in dirs:
install_tree(d, join_path(prefix, d))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.