repo_name
stringlengths 6
97
| path
stringlengths 3
341
| text
stringlengths 8
1.02M
|
|---|---|---|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-retry/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 PyRetry(PythonPackage):
"""Easy to use retry decorator."""
homepage = "https://github.com/invl/retry"
pypi = "retry/retry-0.9.2.tar.gz"
version('0.9.2', sha256='f8bfa8b99b69c4506d6f5bd3b0aabf77f98cdb17f3c9fc3f5ca820033336fba4')
depends_on('python@2.6:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('py-pbr', type='build')
depends_on('py-decorator@3.4.2:', type=('build', 'run'))
depends_on('py-py@1.4.26:1', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-fastcluster/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 RFastcluster(RPackage):
"""Fast Hierarchical Clustering Routines for R and 'Python'.
This is a two-in-one package which provides interfaces to both R and
'Python'. It implements fast hierarchical, agglomerative clustering
routines. Part of the functionality is designed as drop-in replacement for
existing routines: linkage() in the 'SciPy' package
'scipy.cluster.hierarchy', hclust() in R's 'stats' package, and the
'flashClust' package. It provides the same functionality with the benefit
of a much faster implementation. Moreover, there are memory-saving routines
for clustering of vector data, which go beyond what the existing packages
provide. For information on how to install the 'Python' files, see the file
INSTALL in the source distribution."""
cran = "fastcluster"
version('1.2.3', sha256='1f229129e1cddc78c7bb5ecc90c4d28ed810ee68cf210004c7cdfa12cfaf2a01')
version('1.1.25', sha256='f3661def975802f3dd3cec5b2a1379f3707eacff945cf448e33aec0da1ed4205')
depends_on('r@3.0.0:', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-colormath/package.py
|
<filename>var/spack/repos/builtin/packages/py-colormath/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 PyColormath(PythonPackage):
"""Color math and conversion library."""
pypi = "colormath/colormath-2.1.1.tar.gz"
version('3.0.0', sha256='3d4605af344527da0e4f9f504fad7ddbebda35322c566a6c72e28edb1ff31217')
version('2.1.1', sha256='003a2b2d9c1f43aa7d90addf1863fb2d822463c839b1166ae3092950792f9707')
depends_on('py-setuptools', type='build')
depends_on('py-numpy', type=('build', 'run'))
depends_on('py-networkx', type=('build', 'run'))
depends_on('py-networkx@2.0:', type=('build', 'run'), when='@3.0.0:')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/json-glib/package.py
|
<filename>var/spack/repos/builtin/packages/json-glib/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 JsonGlib(AutotoolsPackage):
"""JSON-GLib is a library for reading and parsing JSON using GLib and
GObject data types and API."""
homepage = "https://developer.gnome.org/json-glib"
url = "https://ftp.gnome.org/pub/gnome/sources/json-glib/1.2/json-glib-1.2.8.tar.xz"
version('1.2.8', sha256='fd55a9037d39e7a10f0db64309f5f0265fa32ec962bf85066087b83a2807f40a')
depends_on('glib')
|
player1537-forks/spack
|
lib/spack/spack/schema/bootstrap.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)
"""Schema for bootstrap.yaml configuration file."""
#: Schema of a single source
_source_schema = {
'type': 'object',
'properties': {
'name': {'type': 'string'},
'description': {'type': 'string'},
'type': {'type': 'string'},
'info': {'type': 'object'}
},
'additionalProperties': False,
'required': ['name', 'description', 'type']
}
properties = {
'bootstrap': {
'type': 'object',
'properties': {
'enable': {'type': 'boolean'},
'root': {
'type': 'string'
},
'sources': {
'type': 'array',
'items': _source_schema
},
'trusted': {
'type': 'object',
'patternProperties': {r'\w[\w-]*': {'type': 'boolean'}}
}
}
}
}
#: Full schema with metadata
schema = {
'$schema': 'http://json-schema.org/draft-07/schema#',
'title': 'Spack bootstrap configuration file schema',
'type': 'object',
'additionalProperties': False,
'properties': properties,
}
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/premake-core/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 PremakeCore(MakefilePackage):
"""Premake is a command line utility which reads a scripted
definition of a software project, then uses it to perform
build configuration tasks or generate project files for
toolsets like Visual Studio, Xcode, and GNU Make. Premake's
scripts are little Lua programs, so the sky's the limit!"""
homepage = "https://premake.github.io/"
url = "https://github.com/premake/premake-core/archive/v5.0.0-alpha15.tar.gz"
version('5.0.0-alpha15', sha256='188c590f23b944f8fb2a3254acbb63c9655617be021ba4a670d81e6d499ff6cf')
version('5.0.0-alpha14', sha256='bb0b7b13b1aa175159cbce252389f6e28025a1a935e678632b0dede8e5c21cb9')
version('5.0.0-alpha13', sha256='bfe983e24686c50cada935f74adad2aefe6581649734b2ab8c1aaa2de4d473c6')
def build(self, spec, prefix):
make('-f', 'Bootstrap.mak', self.architecture.platform.name)
def install(self, spec, prefix):
install_tree('bin/release', prefix.bin)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-spatialpack/package.py
|
<filename>var/spack/repos/builtin/packages/r-spatialpack/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 RSpatialpack(RPackage):
"""Tools to assess the association between two spatial processes.
Tools to assess the association between two spatial processes. Currently,
several methodologies are implemented: A modified t-test to perform
hypothesis testing about the independence between the processes, a suitable
nonparametric correlation coefficient, the codispersion coefficient, and an
F test for assessing the multiple correlation between one spatial process
and several others. Functions for image processing and computing the
spatial association between images are also provided."""
cran = "SpatialPack"
version('0.3-8196', sha256='9027e1656db97b721a12f5eda46532c6a99b4a079299b8d12fb57d445b237b4d')
version('0.3-8', sha256='a0e54b5dee3cd30a634e2d30380fe163942b672073fd909be888803332ed5151')
version('0.3', sha256='4c80fc1c77bc97fc678e6e201ecf7f0f89dcf3417b3b497a28a3639e9b30bd8a')
depends_on('r@2.10:', type=('build', 'run'))
depends_on('r@3.5.0:', type=('build', 'run'), when='@0.3-8196:')
depends_on('r-fastmatrix', type=('build', 'run'), when='@0.3-8196:')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-diagrammer/package.py
|
<filename>var/spack/repos/builtin/packages/r-diagrammer/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 RDiagrammer(RPackage):
"""Graph/Network Visualization.
Build graph/network structures using functions for stepwise addition and
deletion of nodes and edges. Work with data available in tables for bulk
addition of nodes, edges, and associated metadata. Use graph selections and
traversals to apply changes to specific nodes or edges. A wide selection of
graph algorithms allow for the analysis of graphs. Visualize the graphs and
take advantage of any aesthetic properties assigned to nodes and edges."""
cran = "DiagrammeR"
version('1.0.8', sha256='b9157b26215edda4fe0a1b9330a597d5b01a5d7e660a9832f593b87c584dd233')
version('1.0.7', sha256='6af291a7136657b9f7c67b96cd7f3afe99662cf5a477ebbb213a6c53df623050')
version('1.0.6.1', sha256='be4e4c520a3692902ce405e8225aef9f3d5f0cd11fcde614f6541e981b63673d')
version('1.0.1', sha256='ccee8acf608fc909e73c6de4374cef5a570cb62e5f454ac55dda736f22f3f013')
version('1.0.0', sha256='2b186dae1b19018681b979e9444bf16559c42740d8382676fbaf3b0f8a44337e')
version('0.8.4', sha256='0503935fa120c7c7cdcfd4dce85558b23fd0bcb7e6b32fa6989087d3c88ec404')
depends_on('r@3.2.0:', type=('build', 'run'), when='@0.9.2:')
depends_on('r@3.5.0:', type=('build', 'run'), when='@1.0.7')
depends_on('r-dplyr@0.7.4:', type=('build', 'run'), when='@1.0.0:')
depends_on('r-dplyr@0.7.6:', type=('build', 'run'), when='@1.0.6.1:')
depends_on('r-dplyr@1.0.7:', type=('build', 'run'), when='@1.0.7:')
depends_on('r-downloader@0.4:', type=('build', 'run'), when='@1.0.0:')
depends_on('r-glue@1.2.0:', type=('build', 'run'), when='@1.0.0:')
depends_on('r-glue@1.3.0:', type=('build', 'run'), when='@1.0.6.1:')
depends_on('r-glue@1.5.0:', type=('build', 'run'), when='@1.0.7:')
depends_on('r-htmltools@0.3.6:', type=('build', 'run'), when='@1.0.0:')
depends_on('r-htmltools@0.5.2:', type=('build', 'run'), when='@1.0.7:')
depends_on('r-htmlwidgets@1.0:', type=('build', 'run'))
depends_on('r-htmlwidgets@1.2:', type=('build', 'run'), when='@1.0.6.1:')
depends_on('r-htmlwidgets@1.5:', type=('build', 'run'), when='@1.0.7:')
depends_on('r-igraph@1.1.2:', type=('build', 'run'))
depends_on('r-igraph@1.2.2:', type=('build', 'run'), when='@1.0.6.1:')
depends_on('r-igraph@1.2.11:', type=('build', 'run'), when='@1.0.7:')
depends_on('r-influencer@0.1.0:', type=('build', 'run'))
depends_on('r-influencer@0.1.0.1:', type=('build', 'run'), when='@1.0.7:')
depends_on('r-magrittr@1.5:', type=('build', 'run'), when='@1.0.0:')
depends_on('r-purrr@0.2.4:', type=('build', 'run'), when='@1.0.0:')
depends_on('r-purrr@0.2.5:', type=('build', 'run'), when='@1.0.6.1:')
depends_on('r-purrr@0.3.4:', type=('build', 'run'), when='@1.0.7:')
depends_on('r-rcolorbrewer@1.1-2:', type=('build', 'run'), when='@1.0.0:')
depends_on('r-readr@1.1.1:', type=('build', 'run'), when='@1.0.0:')
depends_on('r-readr@2.1.1:', type=('build', 'run'), when='@1.0.7:')
depends_on('r-rlang@0.2.0:', type=('build', 'run'), when='@1.0.0:')
depends_on('r-rlang@0.2.2:', type=('build', 'run'), when='@1.0.6.1:')
depends_on('r-rlang@0.4:', type=('build', 'run'), when='@1.0.7:')
depends_on('r-rstudioapi@0.7:', type=('build', 'run'))
depends_on('r-scales@0.5.0:', type=('build', 'run'))
depends_on('r-scales@1.0.0:', type=('build', 'run'), when='@1.0.6.1:')
depends_on('r-scales@1.1:', type=('build', 'run'), when='@1.0.7:')
depends_on('r-stringr@1.3.0:', type=('build', 'run'))
depends_on('r-stringr@1.3.1:', type=('build', 'run'), when='@1.0.6.1:')
depends_on('r-stringr@1.4:', type=('build', 'run'), when='@1.0.7:')
depends_on('r-tibble@1.4.2:', type=('build', 'run'), when='@1.0.0:')
depends_on('r-tibble@3.1:', type=('build', 'run'), when='@1.0.7:')
depends_on('r-tidyr@0.8.0:', type=('build', 'run'), when='@1.0.0:')
depends_on('r-tidyr@0.8.1:', type=('build', 'run'), when='@1.0.6.1:')
depends_on('r-tidyr@1.1:', type=('build', 'run'), when='@1.0.7:')
depends_on('r-viridis@0.5.0:', type=('build', 'run'), when='@1.0.0:')
depends_on('r-viridis@0.5.1:', type=('build', 'run'), when='@1.0.6.1:')
depends_on('r-viridis@0.6.2:', type=('build', 'run'), when='@1.0.7:')
depends_on('r-visnetwork@2.0.3:', type=('build', 'run'))
depends_on('r-visnetwork@2.0.4:', type=('build', 'run'), when='@1.0.6.1:')
depends_on('r-visnetwork@2.1.0:', type=('build', 'run'), when='@1.0.7:')
depends_on('r-rgexf@0.15.3:', type=('build', 'run'), when='@1.0.0:1.0.1')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-teachingdemos/package.py
|
<filename>var/spack/repos/builtin/packages/r-teachingdemos/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 RTeachingdemos(RPackage):
"""Demonstrations for Teaching and Learning.
Demonstration functions that can be used in a classroom to demonstrate
statistical concepts, or on your own to better understand the concepts
or the programming."""
cran = "TeachingDemos"
version('2.12', sha256='3e75405ce1affa406d6df85e06f96381412bc7a2810b25d8c81bfe64c4698644')
version('2.10', sha256='2ef4c2e36ba13e32f66000e84281a3616584c86b255bca8643ff3fe4f78ed704')
depends_on('r@2.10:', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/kraken2/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)
import glob
import os
from spack import *
class Kraken2(Package):
"""Kraken2 is a system for assigning taxonomic labels to short DNA
sequences, usually obtained through metagenomic studies."""
homepage = "https://ccb.jhu.edu/software/kraken2/"
url = "https://github.com/DerrickWood/kraken2/archive/v2.1.1.tar.gz"
maintainers = ['rberg2']
version('2.1.1', sha256='8f3e928cdb32b9e8e6f55b44703d1557b2a5fc3f30f63e8d16e465e19a81dee4')
version('2.0.8-beta', sha256='f2a91fc57a40b3e87df8ac2ea7c0ff1060cc9295c95de417ee53249ee3f7ad8e')
version('2.0.7-beta', sha256='baa160f5aef73327e1a79e6d1c54b64b2fcdaee0be31b456f7bc411d1897a744')
version('2.0.6-beta', sha256='d77db6251179c4d7e16bc9b5e5e9043d25acf81f3e32ad6eadfba829a31e1d09')
depends_on('perl', type=('build', 'run'))
depends_on('rsync', type=('run'))
depends_on('wget', type=('run'))
def install(self, spec, prefix):
installer = Executable('./install_kraken2.sh')
installer(self.stage.source_path)
mkdirp(prefix.bin)
files = glob.iglob('*')
for file in files:
if os.path.isfile(file):
install(file, prefix.bin)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-pamr/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 RPamr(RPackage):
"""Pam: Prediction Analysis for Microarrays
Some functions for sample classification in microarrays."""
cran = "pamr"
version('1.56.1', sha256='d0e527f2336ee4beee91eefb2a8f0dfa96413d9b5a5841d6fc7ff821e67c9779')
version('1.55', sha256='ed910194937a6097ec79234d84777856fd520b111a7c79f7c86dc607169cc3c3')
depends_on('r@2.10:', type=('build', 'run'))
depends_on('r-cluster', type=('build', 'run'))
depends_on('r-survival', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-wurlitzer/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 PyWurlitzer(PythonPackage):
"""Capture C-level stdout/stderr pipes in Python via os.dup2."""
pypi = 'wurlitzer/wurlitzer-3.0.2.tar.gz'
maintainers = ['sethrj']
version('3.0.2', sha256='36051ac530ddb461a86b6227c4b09d95f30a1d1043de2b4a592e97ae8a84fcdf')
depends_on('python+ctypes@3.5:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
# In some circumstances (unclear exactly what) Wurlitzer is unable to get
# stdout/stderr pointers from ctypes, so it falls back to trying to use
# cffi. If you encounter this, please add the dependency below.
# depends_on('py-cffi', type='run', when='...????')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/haproxy/package.py
|
<reponame>player1537-forks/spack<filename>var/spack/repos/builtin/packages/haproxy/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 Haproxy(MakefilePackage):
"""
HAProxy is a single-threaded, event-driven, non-blocking engine
combining a very fast I/O layer with a priority-based scheduler.
"""
homepage = "https://www.haproxy.org"
url = "https://www.haproxy.org/download/2.1/src/haproxy-2.1.0.tar.gz"
version('2.1.1', sha256='57e75c1a380fc6f6aa7033f71384370899443c7f4e8a4ba289b5d4350bc76d1a')
version('2.1.0', sha256='f268efb360a0e925137b4b8ed431f2f8f3b68327efb2c418b266e535d8e335a0')
def url_for_version(self, version):
url = "https://www.haproxy.org/download/{0}/src/haproxy-{1}.tar.gz"
return url.format(version.up_to(2), version)
def build(self, spec, prefix):
make('TARGET=generic', 'PREFIX=' + prefix)
def install(self, spec, prefix):
install_tree('.', prefix)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/madx/package.py
|
<filename>var/spack/repos/builtin/packages/madx/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Madx(CMakePackage):
"""MAD-X (Methodical Accelerator Design) is an application
for designing particle accelerators."""
homepage = "https://github.com/MethodicalAcceleratorDesign/MAD-X"
url = "https://github.com/MethodicalAcceleratorDesign/MAD-X/archive/refs/tags/5.07.00.tar.gz"
git = "https://github.com/MethodicalAcceleratorDesign/MAD-X.git"
maintainers = ['wdconinc']
# Supported MAD-X versions
version('5.08.01', sha256='89c943fcb474344a4f7d28de98e8eae0aec40f779bf908daff79043bf3520555')
version('5.08.00', sha256='0b3fe2aca8899289ef7bfb98d745f13b8c4082e239f54f2662c9cad8d1e63a53')
version('5.07.00', sha256='77c0ec591dc3ea76cf57c60a5d7c73b6c0d66cca1fa7c4eb25a9071e8fc67e60')
variant('x11', default=True, description='Turn on plotting using X11')
# patch for gcc-11 to avoid error due to variable shadowing
patch('https://github.com/MethodicalAcceleratorDesign/MAD-X/commit/e7a434290df675b894f70026ce0c7c217330cce5.patch',
sha256='ba9d00692250ab1eeeb7235a4ba7d899ecbbb4588f3ec08afc22d228dc1ea437',
when='@:5.07.00')
depends_on('cmake@2.8:', type='build')
depends_on("libx11")
depends_on("zlib")
def cmake_args(self):
args = [
self.define('MADX_STATIC', False), # Turn on for static linking
self.define('MADX_LAPACK', True), # Use system blas/lapack installation
self.define('MADX_NTPSA', True), # Build with NTPSA
self.define('MADX_ONLINE', False), # Build with Online model
self.define_from_variant('MADX_X11', 'x11'), # Turn on plotting using X11
]
return args
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-mizani/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.directives import depends_on, version
class PyMizani(PythonPackage):
"""Mizani is a scales package for graphics. It is based on Hadley Wickham's
Scales package."""
pypi = "mizani/mizani-0.7.3.tar.gz"
version(
"0.7.3",
sha256="f521300bd29ca918fcd629bc8ab50fa04e41bdbe00f6bcf74055d3c6273770a4",
)
depends_on('python@3.6:', type=('build', 'run'))
depends_on("py-matplotlib@3.1.1:", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
depends_on("py-palettable", type=("build", "run"))
depends_on("py-pandas@1.1.0:", type=("build", "run"))
depends_on("py-setuptools", type="build")
|
player1537-forks/spack
|
lib/spack/spack/cmd/graph.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 __future__ import print_function
import llnl.util.tty as tty
import spack.cmd
import spack.cmd.common.arguments as arguments
import spack.config
import spack.environment as ev
import spack.store
from spack.graph import graph_ascii, graph_dot
description = "generate graphs of package dependency relationships"
section = "basic"
level = "long"
def setup_parser(subparser):
setup_parser.parser = subparser
method = subparser.add_mutually_exclusive_group()
method.add_argument(
'-a', '--ascii', action='store_true',
help="draw graph as ascii to stdout (default)")
method.add_argument(
'-d', '--dot', action='store_true',
help="generate graph in dot format and print to stdout")
subparser.add_argument(
'-s', '--static', action='store_true',
help="graph static (possible) deps, don't concretize (implies --dot)")
subparser.add_argument(
'-i', '--installed', action='store_true',
help="graph installed specs, or specs in the active env (implies --dot)")
arguments.add_common_arguments(subparser, ['deptype', 'specs'])
def graph(parser, args):
if args.installed:
if args.specs:
tty.die("Can't specify specs with --installed")
args.dot = True
env = ev.active_environment()
if env:
specs = env.all_specs()
else:
specs = spack.store.db.query()
else:
specs = spack.cmd.parse_specs(args.specs, concretize=not args.static)
if not specs:
setup_parser.parser.print_help()
return 1
if args.static:
args.dot = True
if args.dot:
graph_dot(specs, static=args.static, deptype=args.deptype)
elif specs: # ascii is default: user doesn't need to provide it explicitly
debug = spack.config.get('config:debug')
graph_ascii(specs[0], debug=debug, deptype=args.deptype)
for spec in specs[1:]:
print() # extra line bt/w independent graphs
graph_ascii(spec, debug=debug)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/verilator/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 Verilator(AutotoolsPackage):
"""Verilator is the fastest free Verilog HDL simulator.
It compiles synthesizable Verilog (not test-bench code!), plus some PSL,
SystemVerilog and Synthesis assertions into C++ or SystemC code. It is
designed for large projects where fast simulation performance is of primary
concern, and is especially well suited to generate executable models of
CPUs for embedded software design teams.
Please do not download this program if you are expecting a full featured
replacement for NC-Verilog, VCS or another commercial Verilog simulator
or Verilog compiler for a little project! (Try Icarus instead.) However, if
you are looking for a path to migrate synthesizable Verilog to C++ or
SystemC, and writing just a touch of C code and Makefiles doesn't scare you
off, this is the free Verilog compiler for you.
Verilator supports the synthesis subset of Verilog, plus initial
statements, proper blocking/non-blocking assignments, functions, tasks,
multi-dimensional arrays, and signed numbers. It also supports very simple
forms of SystemVerilog assertions and coverage analysis. Verilator supports
the more important Verilog 2005 constructs, and some SystemVerilog
features, with additional constructs being added as users request them.
Verilator has been used to simulate many very large multi-million gate
designs with thousands of modules."""
homepage = "https://www.veripool.org/projects/verilator"
url = "https://www.veripool.org/ftp/verilator-3.920.tgz"
version('4.108', sha256='8e8ec1de0bf200b6206035214f9071a5acc64bd2e7134361d564271e48552702')
version('4.020', sha256='abd79fc2a54cab9da33dfccd669bda3baa71e79060abec17517f0b7374dbc31a')
version('3.920', sha256='2b5c38aa432d0766a38475219f9548d64d18104ce8bdcb5d29e42f5da06943ff')
version('3.904', sha256='ea95e08b2d70682ad42e6c2f5ba99f59b2e7b220791214076099cdf6b7a8c1cb')
depends_on('bison', type='build')
depends_on('flex')
depends_on('perl', type=('build', 'run'))
def setup_run_environment(self, env):
env.prepend_path('VERILATOR_ROOT', self.prefix)
# verilator requires access to its shipped scripts (bin) and include
# but the standard make doesn't put it in the correct places
@run_before('install')
def install_include(self):
install_tree('include', prefix.include)
install_tree('bin', prefix.bin)
# we need to fix the CXX and LINK paths, as they point to the spack
# wrapper scripts which aren't usable without spack
@run_after('install')
def patch_cxx(self):
filter_file(r'^CXX\s*=.*', 'CXX = {0}'.format(self.compiler.cxx),
join_path(self.prefix.include, 'verilated.mk'))
filter_file(r'^LINK\s*=.*', 'LINK = {0}'.format(self.compiler.cxx),
join_path(self.prefix.include, 'verilated.mk'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-factoextra/package.py
|
<filename>var/spack/repos/builtin/packages/r-factoextra/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 RFactoextra(RPackage):
"""Extract and Visualize the Results of Multivariate Data Analyses.
Provides some easy-to-use functions to extract and visualize the output of
multivariate data analyses, including 'PCA' (Principal Component Analysis),
'CA' (Correspondence Analysis), 'MCA' (Multiple Correspondence Analysis),
'FAMD' (Factor Analysis of Mixed Data), 'MFA' (Multiple Factor Analysis)
and 'HMFA' (Hierarchical Multiple Factor Analysis) functions from different
R packages. It contains also functions for simplifying some clustering
analysis steps and provides 'ggplot2' - based elegant data
visualization."""
cran = "factoextra"
version('1.0.7', sha256='624ff01c74933352aca55966f8a052b1ccc878f52c2c307e47f88e0665db94aa')
version('1.0.5', sha256='8177a3f5107883ae248b2cd0afa388a1794741f5155a9455b3883788cf44d5d0')
version('1.0.4', sha256='e4a000a04ef5b9aa0790dc6e5277451c482a19ba10dda9474f6c6982424aeed3')
depends_on('r@3.1.2:', type=('build', 'run'))
depends_on('r-ggplot2@2.2.0:', type=('build', 'run'))
depends_on('r-abind', type=('build', 'run'))
depends_on('r-cluster', type=('build', 'run'))
depends_on('r-dendextend', type=('build', 'run'))
depends_on('r-factominer', type=('build', 'run'))
depends_on('r-ggpubr@0.1.5:', type=('build', 'run'))
depends_on('r-reshape2', type=('build', 'run'))
depends_on('r-ggrepel', type=('build', 'run'))
depends_on('r-tidyr', type=('build', 'run'))
|
player1537-forks/spack
|
lib/spack/external/py2/functools32/functools32.py
|
<reponame>player1537-forks/spack
"""functools.py - Tools for working with functions and callable objects
"""
# Python module wrapper for _functools C module
# to allow utilities written in Python to be added
# to the functools module.
# Written by <NAME> <ncoghlan at g<EMAIL>>
# and <NAME> <python at rcn.com>
# Copyright (C) 2006-2010 Python Software Foundation.
# See C source code for _functools credits/copyright
__all__ = ['update_wrapper', 'wraps', 'WRAPPER_ASSIGNMENTS', 'WRAPPER_UPDATES',
'total_ordering', 'cmp_to_key', 'lru_cache', 'reduce', 'partial']
from _functools import partial, reduce
from collections import MutableMapping, namedtuple
from .reprlib32 import recursive_repr as _recursive_repr
from weakref import proxy as _proxy
import sys as _sys
try:
from thread import allocate_lock as Lock
except ImportError:
from ._dummy_thread32 import allocate_lock as Lock
################################################################################
### OrderedDict
################################################################################
class _Link(object):
__slots__ = 'prev', 'next', 'key', '__weakref__'
class OrderedDict(dict):
'Dictionary that remembers insertion order'
# An inherited dict maps keys to values.
# The inherited dict provides __getitem__, __len__, __contains__, and get.
# The remaining methods are order-aware.
# Big-O running times for all methods are the same as regular dictionaries.
# The internal self.__map dict maps keys to links in a doubly linked list.
# The circular doubly linked list starts and ends with a sentinel element.
# The sentinel element never gets deleted (this simplifies the algorithm).
# The sentinel is in self.__hardroot with a weakref proxy in self.__root.
# The prev links are weakref proxies (to prevent circular references).
# Individual links are kept alive by the hard reference in self.__map.
# Those hard references disappear when a key is deleted from an OrderedDict.
def __init__(self, *args, **kwds):
'''Initialize an ordered dictionary. The signature is the same as
regular dictionaries, but keyword arguments are not recommended because
their insertion order is arbitrary.
'''
if len(args) > 1:
raise TypeError('expected at most 1 arguments, got %d' % len(args))
try:
self.__root
except AttributeError:
self.__hardroot = _Link()
self.__root = root = _proxy(self.__hardroot)
root.prev = root.next = root
self.__map = {}
self.__update(*args, **kwds)
def __setitem__(self, key, value,
dict_setitem=dict.__setitem__, proxy=_proxy, Link=_Link):
'od.__setitem__(i, y) <==> od[i]=y'
# Setting a new item creates a new link at the end of the linked list,
# and the inherited dictionary is updated with the new key/value pair.
if key not in self:
self.__map[key] = link = Link()
root = self.__root
last = root.prev
link.prev, link.next, link.key = last, root, key
last.next = link
root.prev = proxy(link)
dict_setitem(self, key, value)
def __delitem__(self, key, dict_delitem=dict.__delitem__):
'od.__delitem__(y) <==> del od[y]'
# Deleting an existing item uses self.__map to find the link which gets
# removed by updating the links in the predecessor and successor nodes.
dict_delitem(self, key)
link = self.__map.pop(key)
link_prev = link.prev
link_next = link.next
link_prev.next = link_next
link_next.prev = link_prev
def __iter__(self):
'od.__iter__() <==> iter(od)'
# Traverse the linked list in order.
root = self.__root
curr = root.next
while curr is not root:
yield curr.key
curr = curr.next
def __reversed__(self):
'od.__reversed__() <==> reversed(od)'
# Traverse the linked list in reverse order.
root = self.__root
curr = root.prev
while curr is not root:
yield curr.key
curr = curr.prev
def clear(self):
'od.clear() -> None. Remove all items from od.'
root = self.__root
root.prev = root.next = root
self.__map.clear()
dict.clear(self)
def popitem(self, last=True):
'''od.popitem() -> (k, v), return and remove a (key, value) pair.
Pairs are returned in LIFO order if last is true or FIFO order if false.
'''
if not self:
raise KeyError('dictionary is empty')
root = self.__root
if last:
link = root.prev
link_prev = link.prev
link_prev.next = root
root.prev = link_prev
else:
link = root.next
link_next = link.next
root.next = link_next
link_next.prev = root
key = link.key
del self.__map[key]
value = dict.pop(self, key)
return key, value
def move_to_end(self, key, last=True):
'''Move an existing element to the end (or beginning if last==False).
Raises KeyError if the element does not exist.
When last=True, acts like a fast version of self[key]=self.pop(key).
'''
link = self.__map[key]
link_prev = link.prev
link_next = link.next
link_prev.next = link_next
link_next.prev = link_prev
root = self.__root
if last:
last = root.prev
link.prev = last
link.next = root
last.next = root.prev = link
else:
first = root.next
link.prev = root
link.next = first
root.next = first.prev = link
def __sizeof__(self):
sizeof = _sys.getsizeof
n = len(self) + 1 # number of links including root
size = sizeof(self.__dict__) # instance dictionary
size += sizeof(self.__map) * 2 # internal dict and inherited dict
size += sizeof(self.__hardroot) * n # link objects
size += sizeof(self.__root) * n # proxy objects
return size
update = __update = MutableMapping.update
keys = MutableMapping.keys
values = MutableMapping.values
items = MutableMapping.items
__ne__ = MutableMapping.__ne__
__marker = object()
def pop(self, key, default=__marker):
'''od.pop(k[,d]) -> v, remove specified key and return the corresponding
value. If key is not found, d is returned if given, otherwise KeyError
is raised.
'''
if key in self:
result = self[key]
del self[key]
return result
if default is self.__marker:
raise KeyError(key)
return default
def setdefault(self, key, default=None):
'od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od'
if key in self:
return self[key]
self[key] = default
return default
@_recursive_repr()
def __repr__(self):
'od.__repr__() <==> repr(od)'
if not self:
return '%s()' % (self.__class__.__name__,)
return '%s(%r)' % (self.__class__.__name__, list(self.items()))
def __reduce__(self):
'Return state information for pickling'
items = [[k, self[k]] for k in self]
inst_dict = vars(self).copy()
for k in vars(OrderedDict()):
inst_dict.pop(k, None)
if inst_dict:
return (self.__class__, (items,), inst_dict)
return self.__class__, (items,)
def copy(self):
'od.copy() -> a shallow copy of od'
return self.__class__(self)
@classmethod
def fromkeys(cls, iterable, value=None):
'''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S.
If not specified, the value defaults to None.
'''
self = cls()
for key in iterable:
self[key] = value
return self
def __eq__(self, other):
'''od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive
while comparison to a regular mapping is order-insensitive.
'''
if isinstance(other, OrderedDict):
return len(self)==len(other) and \
all(p==q for p, q in zip(self.items(), other.items()))
return dict.__eq__(self, other)
# update_wrapper() and wraps() are tools to help write
# wrapper functions that can handle naive introspection
WRAPPER_ASSIGNMENTS = ('__module__', '__name__', '__doc__')
WRAPPER_UPDATES = ('__dict__',)
def update_wrapper(wrapper,
wrapped,
assigned = WRAPPER_ASSIGNMENTS,
updated = WRAPPER_UPDATES):
"""Update a wrapper function to look like the wrapped function
wrapper is the function to be updated
wrapped is the original function
assigned is a tuple naming the attributes assigned directly
from the wrapped function to the wrapper function (defaults to
functools.WRAPPER_ASSIGNMENTS)
updated is a tuple naming the attributes of the wrapper that
are updated with the corresponding attribute from the wrapped
function (defaults to functools.WRAPPER_UPDATES)
"""
wrapper.__wrapped__ = wrapped
for attr in assigned:
try:
value = getattr(wrapped, attr)
except AttributeError:
pass
else:
setattr(wrapper, attr, value)
for attr in updated:
getattr(wrapper, attr).update(getattr(wrapped, attr, {}))
# Return the wrapper so this can be used as a decorator via partial()
return wrapper
def wraps(wrapped,
assigned = WRAPPER_ASSIGNMENTS,
updated = WRAPPER_UPDATES):
"""Decorator factory to apply update_wrapper() to a wrapper function
Returns a decorator that invokes update_wrapper() with the decorated
function as the wrapper argument and the arguments to wraps() as the
remaining arguments. Default arguments are as for update_wrapper().
This is a convenience function to simplify applying partial() to
update_wrapper().
"""
return partial(update_wrapper, wrapped=wrapped,
assigned=assigned, updated=updated)
def total_ordering(cls):
"""Class decorator that fills in missing ordering methods"""
convert = {
'__lt__': [('__gt__', lambda self, other: not (self < other or self == other)),
('__le__', lambda self, other: self < other or self == other),
('__ge__', lambda self, other: not self < other)],
'__le__': [('__ge__', lambda self, other: not self <= other or self == other),
('__lt__', lambda self, other: self <= other and not self == other),
('__gt__', lambda self, other: not self <= other)],
'__gt__': [('__lt__', lambda self, other: not (self > other or self == other)),
('__ge__', lambda self, other: self > other or self == other),
('__le__', lambda self, other: not self > other)],
'__ge__': [('__le__', lambda self, other: (not self >= other) or self == other),
('__gt__', lambda self, other: self >= other and not self == other),
('__lt__', lambda self, other: not self >= other)]
}
roots = set(dir(cls)) & set(convert)
if not roots:
raise ValueError('must define at least one ordering operation: < > <= >=')
root = max(roots) # prefer __lt__ to __le__ to __gt__ to __ge__
for opname, opfunc in convert[root]:
if opname not in roots:
opfunc.__name__ = opname
opfunc.__doc__ = getattr(int, opname).__doc__
setattr(cls, opname, opfunc)
return cls
def cmp_to_key(mycmp):
"""Convert a cmp= function into a key= function"""
class K(object):
__slots__ = ['obj']
def __init__(self, obj):
self.obj = obj
def __lt__(self, other):
return mycmp(self.obj, other.obj) < 0
def __gt__(self, other):
return mycmp(self.obj, other.obj) > 0
def __eq__(self, other):
return mycmp(self.obj, other.obj) == 0
def __le__(self, other):
return mycmp(self.obj, other.obj) <= 0
def __ge__(self, other):
return mycmp(self.obj, other.obj) >= 0
def __ne__(self, other):
return mycmp(self.obj, other.obj) != 0
__hash__ = None
return K
_CacheInfo = namedtuple("CacheInfo", "hits misses maxsize currsize")
def lru_cache(maxsize=100):
"""Least-recently-used cache decorator.
If *maxsize* is set to None, the LRU features are disabled and the cache
can grow without bound.
Arguments to the cached function must be hashable.
View the cache statistics named tuple (hits, misses, maxsize, currsize) with
f.cache_info(). Clear the cache and statistics with f.cache_clear().
Access the underlying function with f.__wrapped__.
See: http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used
"""
# Users should only access the lru_cache through its public API:
# cache_info, cache_clear, and f.__wrapped__
# The internals of the lru_cache are encapsulated for thread safety and
# to allow the implementation to change (including a possible C version).
def decorating_function(user_function,
tuple=tuple, sorted=sorted, len=len, KeyError=KeyError):
hits, misses = [0], [0]
kwd_mark = (object(),) # separates positional and keyword args
lock = Lock() # needed because OrderedDict isn't threadsafe
if maxsize is None:
cache = dict() # simple cache without ordering or size limit
@wraps(user_function)
def wrapper(*args, **kwds):
key = args
if kwds:
key += kwd_mark + tuple(sorted(kwds.items()))
try:
result = cache[key]
hits[0] += 1
return result
except KeyError:
pass
result = user_function(*args, **kwds)
cache[key] = result
misses[0] += 1
return result
else:
cache = OrderedDict() # ordered least recent to most recent
cache_popitem = cache.popitem
cache_renew = cache.move_to_end
@wraps(user_function)
def wrapper(*args, **kwds):
key = args
if kwds:
key += kwd_mark + tuple(sorted(kwds.items()))
with lock:
try:
result = cache[key]
cache_renew(key) # record recent use of this key
hits[0] += 1
return result
except KeyError:
pass
result = user_function(*args, **kwds)
with lock:
cache[key] = result # record recent use of this key
misses[0] += 1
if len(cache) > maxsize:
cache_popitem(0) # purge least recently used cache entry
return result
def cache_info():
"""Report cache statistics"""
with lock:
return _CacheInfo(hits[0], misses[0], maxsize, len(cache))
def cache_clear():
"""Clear the cache and cache statistics"""
with lock:
cache.clear()
hits[0] = misses[0] = 0
wrapper.cache_info = cache_info
wrapper.cache_clear = cache_clear
return wrapper
return decorating_function
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-gql/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 PyGql(PythonPackage):
"""This is a GraphQL client for Python. Plays nicely with
graphene, graphql-core, graphql-js and any other GraphQL
implementation compatible with the spec.
GQL architecture is inspired by React-Relay and Apollo-Client."""
homepage = "https://github.com/graphql-python/gql"
pypi = "gql/gql-2.0.0.tar.gz"
version('3.0.0a1', sha256='ecd8fd0b6a5a8bb5c9e1a97eefad3f267fc889bd03316211193640d49b3e4525')
version('0.4.0', sha256='259b0c66d8dfe61feb06fe45b57713da0fe2e5ca13fa500a1fafc9bf2f195e81')
depends_on('py-setuptools', type='build')
depends_on('py-aiohttp@3.6.2', type=('build', 'run'), when='@3.0:')
depends_on('py-graphql-core@3.1.0:3.1', type=('build', 'run'), when='@3.0:')
depends_on('py-requests@2.23:2', type=('build', 'run'), when='@3.0:')
depends_on('py-websockets@8.1:8', type=('build', 'run'), when='@3.0:')
depends_on('py-yarl@1.4:1', type=('build', 'run'), when='@3.0:')
depends_on('py-graphql-core@2.0:2', type=('build', 'run'), when='@0.4.0')
depends_on('py-six@1.10.0:', type=('build', 'run'), when='@0.4.0')
depends_on('py-promise@2.0:2', type=('build', 'run'), when='@0.4.0')
depends_on('py-requests@2.12:2', type=('build', 'run'), when='@0.4.0')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-threejs/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 RThreejs(RPackage):
"""Interactive 3D Scatter Plots, Networks and Globes.
Create interactive 3D scatter plots, network plots, and globes using the
'three.js' visualization library ("https://threejs.org/")."""
cran = "threejs"
version('0.3.3', sha256='76c759c8b20fb34f4f7a01cbd1b961296e1f19f4df6dded69aae7f1bca80219c')
version('0.3.1', sha256='71750b741672a435ecf749b69c72f0681aa8bb795e317f4e3056d5e33f6d79e8')
version('0.2.2', sha256='41fe949490fbe0f71e39b0a144791da427bd7361d027579cb4a002ed53520cc5')
depends_on('r@3.0.0:', type=('build', 'run'))
depends_on('r-igraph@1.0.0:', type=('build', 'run'), when='@0.3.1:')
depends_on('r-htmlwidgets@0.3.2:', type=('build', 'run'))
depends_on('r-base64enc', type=('build', 'run'))
depends_on('r-crosstalk', type=('build', 'run'), when='@0.3.1:')
depends_on('r-matrix', type=('build', 'run'), when='@0.2.2')
depends_on('r-jsonlite', type=('build', 'run'), when='@0.2.2')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-mlbench/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 RMlbench(RPackage):
"""Machine Learning Benchmark Problems.
A collection of artificial and real-world machine learning benchmark
problems, including, e.g., several data sets from the UCI repository."""
cran = "mlbench"
version('2.1-3', sha256='b1f92be633243185ab86e880a1e1ac5a4dd3c535d01ebd187a4872d0a8c6f194')
version('2.1-1', sha256='748141d56531a39dc4d37cf0a5165a40b653a04c507e916854053ed77119e0e6')
depends_on('r@2.10:', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/tracer/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 Tracer(MakefilePackage):
"""Trace Replay and Network Simulation Framework"""
homepage = "https://tracer-codes.readthedocs.io"
git = "https://github.com/LLNL/tracer.git"
maintainers = ['bhatele']
version('develop', branch='master')
version('2.2', tag='v2.2')
variant('otf2', default=True, description='Use OTF2 traces for simulation')
depends_on('mpi')
depends_on('codes')
depends_on('otf2', when='+otf2')
build_directory = 'tracer'
@property
def build_targets(self):
targets = []
targets.append('CXX = {0}'.format(self.spec['mpi'].mpicxx))
if "+otf2" in self.spec:
targets.append('SELECT_TRACE = -DTRACER_OTF_TRACES=1')
return targets
def install(self, spec, prefix):
with working_dir(self.build_directory):
make('PREFIX={0}'.format(prefix), 'install')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/entrezdirect/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 Entrezdirect(Package):
"""Entrez Direct (EDirect) provides access to the NCBI's suite of
interconnected databases (publication, sequence, structure,
gene, variation, expression, etc.) from a UNIX terminal window."""
homepage = "https://www.ncbi.nlm.nih.gov/books/NBK179288/"
version('10.7.20190114', sha256='4152749e6a3aac71a64e9367527428714ed16cf1fb6c7eff1298cca9ef144c0d')
depends_on('perl', type='run')
depends_on('perl-html-parser', type='run')
depends_on('perl-libwww-perl', type='run')
depends_on('perl-lwp-protocol-https', type='run')
depends_on('perl-http-message', type='run')
depends_on('perl-xml-simple', type='run')
def url_for_version(self, ver):
pfx = 'ftp://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/'
return pfx + '{0}/edirect-{0}.tar.gz'.format(ver.dotted)
def install(self, spec, prefix):
install_tree('.', prefix.bin)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-hdf5r/package.py
|
<reponame>player1537-forks/spack<filename>var/spack/repos/builtin/packages/r-hdf5r/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 RHdf5r(RPackage):
"""Interface to the 'HDF5' Binary Data Format.
'HDF5' is a data model, library and file format for storing and managing
large amounts of data. This package provides a nearly feature complete,
object oriented wrapper for the 'HDF5' API
<https://support.hdfgroup.org/HDF5/doc/RM/RM_H5Front.html> using R6
classes. Additionally, functionality is added so that 'HDF5' objects behave
very similar to their corresponding R counterparts."""
cran = "hdf5r"
version('1.3.5', sha256='87b75173ab226a9fbaa5b28289349f3c56b638629560a172994b8f9323c1622f')
version('1.3.3', sha256='a0f83cbf21563e81dbd1a1bd8379623ed0c9c4df4e094c75013abfd7a5271545')
version('1.2.0', sha256='58813e334fd3f9040038345a7186e5cb02090898883ac192477a76a5b8b4fe81')
depends_on('r@3.2.2:', type=('build', 'run'))
depends_on('r-r6', type=('build', 'run'))
depends_on('r-bit64', type=('build', 'run'))
depends_on('hdf5@1.8.13:+hl')
depends_on('pkgconfig', type='build')
# The configure script in the package uses the hdf5 h5cc compiler wrapper
# in the PATH to configure hdf5. That works fine if hdf5 was built with
# autotools but the hdf5 package in Spack is built with cmake. The compiler
# wrapper built with cmake does not support the '-show' or '-showconfig'
# flags. The following patch replaces those commands in the configure
# script with pkg-config commands.
patch('configure.patch')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-future/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 RFuture(RPackage):
"""Unified Parallel and Distributed Processing in R for Everyone.
The purpose of this package is to provide a lightweight and unified Future
API for sequential and parallel processing of R expression via futures. The
simplest way to evaluate an expression in parallel is to use 'x %<-% {
expression }' with 'plan(multiprocess)'. This package implements
sequential, multicore, multisession, and cluster futures. With these, R
expressions can be evaluated on the local machine, in parallel a set of
local machines, or distributed on a mix of local and remote machines.
Extensions to this package implement additional backends for processing
futures via compute cluster schedulers etc. Because of its unified API,
there is no need to modify any code in order switch from sequential on the
local machine to, say, distributed processing on a remote compute cluster.
Another strength of this package is that global variables and functions are
automatically identified and exported as needed, making it straightforward
to tweak existing code to make use of futures."""
cran = "future"
version('1.23.0', sha256='d869c80e837c0937a414b8050deff081aefeac586b796f3d634d64f0f4fdb8f8')
version('1.22.1', sha256='87b24a85caf08e1d809eab28f9258444105cd7788eee2e3e2f21727ba3bbedcd')
version('1.21.0', sha256='909e6602068eba543a6d2e464b911123cc29efdb600a7000eff0e5624ff0d12d')
version('1.14.0', sha256='0a535010d97a01b21aaf9d863603e44359335e273019c1e1980bbb5b2917dbcb')
depends_on('r-digest', type=('build', 'run'))
depends_on('r-globals@0.12.4:', type=('build', 'run'))
depends_on('r-globals@0.13.1:', type=('build', 'run'), when='@1.21.0:')
depends_on('r-globals@0.14.0:', type=('build', 'run'), when='@1.22.0:')
depends_on('r-listenv@0.7.0:', type=('build', 'run'))
depends_on('r-listenv@0.8.0:', type=('build', 'run'), when='@1.21.0:')
depends_on('r-parallelly@1.21.0:', type=('build', 'run'), when='@1.21.0:')
depends_on('r-parallelly@1.26.1:', type=('build', 'run'), when='@1.22.0:')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/logrotate/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 Logrotate(AutotoolsPackage):
"""The logrotate utility is designed to simplify the administration of
log files on a system which generates a lot of log files. """
homepage = "https://github.com/logrotate/logrotate"
url = "https://github.com/logrotate/logrotate/archive/3.17.0.tar.gz"
version('3.17.0', sha256='c25ea219018b024988b791e91e9f6070c34d2056efa6ffed878067866c0ed765')
version('3.16.0', sha256='bc6acfd09925045d48b5ff553c24c567cfd5f59d513c4ac34bfb51fa6b79dc8a')
version('3.15.1', sha256='a7b20f5184c9598c36546f9200d3bd616d561478a0423ab8074e97a1cd7b1c25')
depends_on('autoconf', type='build')
depends_on('automake', type='build')
depends_on('libtool', type='build')
depends_on('m4', type='build')
depends_on('popt')
depends_on('acl')
def setup_run_environment(self, env):
env.prepend_path('PATH', self.prefix.sbin)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/rdkit/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 Rdkit(CMakePackage):
"""RDKit is a collection of cheminformatics and machine-learning
software written in C++ and Python."""
homepage = "https://www.rdkit.org"
url = "https://github.com/rdkit/rdkit/archive/refs/tags/Release_2021_03_2.tar.gz"
maintainers = ['bvanessen']
version('2021_03_2', sha256='9907a745405cc915c65504046e446199f8ad03d870714de57c27d3738f330fe4')
version('2021_03_1b1', sha256='2cd0673b289ba756c76a1bf57cf19e147ac4a9f6ecf9e79cc3dd86c8d39be414')
version('2021_03_1', sha256='9495f797a54ac70b3b6e12776de7d82acd7f7b5d5f0cc1f168c763215545610b')
version('2020_09_5', sha256='85cec9618e7ef6365b9b908ed674c073d898b6627521cc7fd8c2e05fea8a5def')
version('2020_09_4', sha256='9e734ca8f99d8be1ef2ac51efb67c393c62e88b98cfa550d6173ce3eaa87b559')
version('2020_09_3', sha256='aa95bf3cbeef287eeb6d9759ff0992d2f92f2171b1758af71b7c9a0ec97a0660')
version('2020_09_2', sha256='44663970859c0ec993f94a56b692231557df02c267853a2ee3c1f609cef93ae9')
version('2020_09_1b1', sha256='d9d836dc38cc45db44698e33325901452c94df9add10dd2675674594af1b73c2')
version('2020_09_1', sha256='ac105498be52ff77f7e9328c41d0e61a2318cac0789d6efc30f5f50dc78a992c')
version('2020_03_6', sha256='a3663295a149aa0307ace6d1995094d0334180bc8f892fa325558a110154272b')
depends_on('python@3:')
depends_on('boost@1.53.0: +python +serialization')
depends_on('py-numpy')
depends_on('sqlite')
extends("python")
def cmake_args(self):
args = ['-DCMAKE_CXX_STANDARD=14',
'-DRDK_INSTALL_INTREE=OFF']
return args
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-metpy/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 PyMetpy(PythonPackage):
"""Collection of tools for reading, visualizing and performing calculations
with weather data."""
homepage = "https://github.com/Unidata/MetPy"
pypi = "MetPy/MetPy-1.0.1.tar.gz"
maintainers = ['dopplershift']
# Importing 'metpy.io' results in downloads, so skip it.
# https://github.com/Unidata/MetPy/issues/1888
import_modules = ['metpy', 'metpy._vendor', 'metpy.calc', 'metpy.interpolate']
version('1.0.1', sha256='16fa9806facc24f31f454b898741ec5639a72ba9d4ff8a19ad0e94629d93cb95')
version('1.0', sha256='11b043aaa4e3d35db319e96bb9967eb9f73da653e155bca2d62f838108b100dc',
deprecated=True)
depends_on('python@3.6:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('py-setuptools-scm', type='build')
depends_on('py-importlib-metadata@1.0.0:', when='^python@:3.7', type=('build', 'run'))
depends_on('py-importlib-resources@1.3.0:', when='^python@:3.8', type=('build', 'run'))
depends_on('py-matplotlib@2.1.0:', type=('build', 'run'))
depends_on('py-numpy@1.16.0:', type=('build', 'run'))
depends_on('py-pandas@0.22.0:', when='@1.0', type=('build', 'run'))
depends_on('py-pandas@0.24.0:', when='@1.0.1', type=('build', 'run'))
depends_on('py-pint@0.10.1:', type=('build', 'run'))
depends_on('py-pooch@0.1:', type=('build', 'run'))
depends_on('py-pyproj@2.3.0:', type=('build', 'run'))
depends_on('py-scipy@1.0:', type=('build', 'run'))
depends_on('py-traitlets@4.3.0:', type=('build', 'run'))
depends_on('py-xarray@0.14.1:', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-siggenes/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 RSiggenes(RPackage):
"""Multiple Testing using SAM and Efron's Empirical Bayes Approaches.
Identification of differentially expressed genes and estimation of the
False Discovery Rate (FDR) using both the Significance Analysis of
Microarrays (SAM) and the Empirical Bayes Analyses of Microarrays
(EBAM)."""
bioc = "siggenes"
version('1.68.0', commit='<KEY>')
version('1.64.0', commit='<KEY>')
version('1.58.0', commit='<KEY>')
version('1.56.0', commit='3e929feaa76311be07ff51ad807e657b0b521f6f')
version('1.54.0', commit='<KEY>')
version('1.52.0', commit='dc46cf4b6053ea99c6c841d661f97390653c2e71')
version('1.50.0', commit='<KEY>')
depends_on('r-biobase', type=('build', 'run'))
depends_on('r-multtest', type=('build', 'run'))
depends_on('r-scrime@1.2.5:', type=('build', 'run'), when='@1.58.0:')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-reams/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 RReams(RPackage):
"""Resampling-Based Adaptive Model Selection.
Resampling methods for adaptive linear model selection. These can be
thought of as extensions of the Akaike information criterion that account
for searching among candidate models."""
cran = "reams"
version('0.1', sha256='ac24ea875b24bd18152afd87538b1f807f442cf2bd1c6ac1a365cf543c88181e')
depends_on('r@2.9.0:', type=('build', 'run'))
depends_on('r-leaps', type=('build', 'run'))
depends_on('r-mgcv', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-pyvcf/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 PyPyvcf(PythonPackage):
"""A Variant Call Format reader for Python"""
homepage = "https://pyvcf.readthedocs.org/en/latest/index.html"
pypi = "PyVCF/PyVCF-0.6.0.tar.gz"
version('0.6.8', sha256='e9d872513d179d229ab61da47a33f42726e9613784d1cb2bac3f8e2642f6f9d9')
version('0.6.0', sha256='d9ec3bbedb64fa35c2648a9c41fdefaedd3912ff597a436e073d27aeccf5de7c')
depends_on('py-setuptools', type='build')
depends_on('py-argparse', when='^python@:2.6,3.0:3.1', type=('build', 'run'))
depends_on('py-counter', when='^python@:2.6', type=('build', 'run'))
depends_on('py-ordereddict', when='^python@:2.6', type=('build', 'run'))
depends_on('py-unittest2', when='^python@:2.6', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-numba/package.py
|
<filename>var/spack/repos/builtin/packages/py-numba/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 PyNumba(PythonPackage):
"""NumPy aware dynamic Python compiler using LLVM"""
homepage = "https://numba.pydata.org/"
pypi = "numba/numba-0.35.0.tar.gz"
version('0.55.1', sha256='03e9069a2666d1c84f93b00dbd716fb8fedde8bb2c6efafa2f04842a46442ea3')
version('0.54.0', sha256='bad6bd98ab2e41c34aa9c80b8d9737e07d92a53df4f74d3ada1458b0b516ccff')
version('0.51.1', sha256='1e765b1a41535684bf3b0465c1d0a24dcbbff6af325270c8f4dad924c0940160')
version('0.50.1', sha256='89e81b51b880f9b18c82b7095beaccc6856fcf84ba29c4f0ced42e4e5748a3a7')
version('0.48.0', sha256='9d21bc77e67006b5723052840c88cc59248e079a907cc68f1a1a264e1eaba017')
version('0.40.1', sha256='52d046c13bcf0de79dbfb936874b7228f141b9b8e3447cc35855e9ad3e12aa33')
version('0.35.0', sha256='11564937757605bee590c5758c73cfe9fd6d569726b56d970316a6228971ecc3')
depends_on('python@3.7:3.10', type=('build', 'run'), when='@0.55.0:')
depends_on('python@3.7:3.9', type=('build', 'run'), when='@0.54')
depends_on('python@3.6:3.9', type=('build', 'run'), when='@0.53')
depends_on('python@3.6:3.8', type=('build', 'run'), when='@0.52')
# set upper bound for python the same as newer release
depends_on('python@3.6:3.8', type=('build', 'run'), when='@0.48:0.51')
depends_on('python@3.3:3.7', type=('build', 'run'), when='@0.40.1:0.47')
depends_on('python@3.3:3.6', type=('build', 'run'), when='@:0.35.0')
depends_on('py-numpy@1.18:1.21', type=('build', 'run'), when='@0.55.0:')
depends_on('py-numpy@1.17:1.20', type=('build', 'run'), when='@0.54')
# set upper bound for py-numpy the same as newer release
depends_on('py-numpy@1.15:1.20', type=('build', 'run'), when='@0.48:0.53')
depends_on('py-numpy@1.10:1.20', type=('build', 'run'), when='@:0.47')
depends_on('py-setuptools', type=('build', 'run'))
depends_on('py-llvmlite@0.38', type=('build', 'run'), when='@0.55.1')
depends_on('py-llvmlite@0.37', type=('build', 'run'), when='@0.54.0')
depends_on('py-llvmlite@0.34', type=('build', 'run'), when='@0.51.1')
depends_on('py-llvmlite@0.33', type=('build', 'run'), when='@0.50.1')
depends_on('py-llvmlite@0.31', type=('build', 'run'), when='@0.47,0.48')
depends_on('py-llvmlite@0.25', type=('build', 'run'), when='@0.40')
depends_on('py-llvmlite@0.20:0.25', type=('build', 'run'), when='@0.35.1')
depends_on('py-argparse', type=('build', 'run'), when='^python@:2.6,3.0:3.1')
depends_on('py-funcsigs', type=('build', 'run'), when='@:0.47 ^python@:3.2')
depends_on('py-enum34', type=('build', 'run'), when='@:0.47 ^python@:3.3')
depends_on('py-singledispatch', type=('build', 'run'), when='@:0.47 ^python@:3.3')
# Version 6.0.0 of llvm had a hidden symbol which breaks numba at runtime.
# See https://reviews.llvm.org/D44140
conflicts('^llvm@6.0.0')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-immutables/package.py
|
<reponame>player1537-forks/spack<filename>var/spack/repos/builtin/packages/py-immutables/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 PyImmutables(PythonPackage):
"""An immutable mapping type for Python."""
homepage = "https://github.com/MagicStack/immutables"
pypi = "immutables/immutables-0.14.tar.gz"
version('0.16', sha256='d67e86859598eed0d926562da33325dac7767b7b1eff84e232c22abea19f4360')
version('0.14', sha256='a0a1cc238b678455145bae291d8426f732f5255537ed6a5b7645949704c70a78')
depends_on('python@3.5:', type=('build', 'run'))
depends_on('python@3.6:', type=('build', 'run'), when='@0.16:')
depends_on('py-setuptools', type='build')
depends_on('py-setuptools@42:', type='build', when='@0.16:')
depends_on('py-typing-extensions@3.7.4.3:', when='@0.16: ^python@:3.7', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/dateutils/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 Dateutils(AutotoolsPackage):
"""Dateutils are a bunch of tools that revolve around fiddling with dates
and times in the command line with a strong focus on use cases that arise
when dealing with large amounts of financial data."""
homepage = "https://www.fresse.org/dateutils/"
url = "https://github.com/hroptatyr/dateutils/releases/download/v0.4.6/dateutils-0.4.6.tar.xz"
version('0.4.7', sha256='49725457f5bef45ea424baade8999a6e54496e357f64280474ff7134a54f599a')
version('0.4.6', sha256='26a071317ae5710f226a3e6ba9a54d3764cd9efe3965aecc18e75372088757cd')
version('0.4.5', sha256='16d6a0fe7b7d49ddbb303f33538dd7304a0d4af5a0369bcbf275db6a5060cbde')
build_directory = 'spack-build'
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/octave-quaternion/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 OctaveQuaternion(OctavePackage, SourceforgePackage):
"""Quaternion package for GNU Octave,
includes a quaternion class with overloaded operators."""
homepage = "https://octave.sourceforge.io/quaternion/"
sourceforge_mirror_path = "octave/quaternion-2.4.0.tar.gz"
version('2.4.0', sha256='4c2d4dd8f1d213f080519c6f9dfbbdca068087ee0411122b16e377e0f4641610')
version('2.2.2', sha256='261d51657bc729c8f9fe915532d91e75e48dce2af2b298781e78cc93a5067cbd')
conflicts('octave@6:')
extends('octave@3.8.0:5.2.0')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-acme/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 RAcme(RPackage):
"""Algorithms for Calculating Microarray Enrichment (ACME).
ACME (Algorithms for Calculating Microarray Enrichment) is a set of
tools for analysing tiling array ChIP/chip, DNAse hypersensitivity, or
other experiments that result in regions of the genome showing
"enrichment". It does not rely on a specific array technology (although
the array should be a "tiling" array), is very general (can be applied
in experiments resulting in regions of enrichment), and is very
insensitive to array noise or normalization methods. It is also very
fast and can be applied on whole-genome tiling array experiments quite
easily with enough memory."""
bioc = "ACME"
version('2.50.0', commit='d55a19a8c091e8ea5fd35041520107a7f7603e14')
version('2.46.0', commit='<KEY>')
version('2.40.0', commit='38499e512998d54d874a0bfdc173f4ba5de5f01a')
version('2.38.0', commit='cd03196428e8adf62e84f25c4d4545429e2c908b')
version('2.36.0', commit='39e056435b9775d35e7f7fc5446c2c3cafe15670')
version('2.34.0', commit='<PASSWORD>fdf2711d0dcb345f829469')
version('2.32.0', commit='<KEY>')
depends_on('r@2.10:', type=('build', 'run'))
depends_on('r-biobase@2.5.5:', type=('build', 'run'))
depends_on('r-biocgenerics', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/nettle/package.py
|
<reponame>player1537-forks/spack<filename>var/spack/repos/builtin/packages/nettle/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 Nettle(AutotoolsPackage, GNUMirrorPackage):
"""The Nettle package contains the low-level cryptographic library
that is designed to fit easily in many contexts."""
homepage = "https://www.lysator.liu.se/~nisse/nettle/"
gnu_mirror_path = "nettle/nettle-3.3.tar.gz"
version('3.4.1', sha256='f941cf1535cd5d1819be5ccae5babef01f6db611f9b5a777bae9c7604b8a92ad')
version('3.4', sha256='ae7a42df026550b85daca8389b6a60ba6313b0567f374392e54918588a411e94')
version('3.3', sha256='46942627d5d0ca11720fec18d81fc38f7ef837ea4197c1f630e71ce0d470b11e')
version('3.2', sha256='ea4283def236413edab5a4cf9cf32adf540c8df1b9b67641cfc2302fca849d97')
version('2.7.1', sha256='bc71ebd43435537d767799e414fce88e521b7278d48c860651216e1fc6555b40')
version('2.7', sha256='c294ea133c05382cc2effb1734d49f4abeb1ad8515543a333de49a11422cd4d6')
depends_on('gmp')
depends_on('m4', type='build')
def configure_args(self):
return ['CFLAGS={0}'.format(self.compiler.c99_flag)]
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/lua-bitlib/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 LuaBitlib(Package):
"""Lua-jit-like bitwise operations for lua"""
homepage = "http://luaforge.net/projects/bitlib"
url = "https://luarocks.org/bitlib-23-2.src.rock"
version('23-2', sha256='fe226edc2808162e67418e6b2c98befc0ed25a489ecffc6974fa153f951c0c34',
expand=False)
extends('lua')
def install(self, spec, prefix):
luarocks('unpack', "bitlib-23-2.src.rock")
os.chdir(os.path.join('bitlib-23-2', 'bitlib-23'))
sed = which('sed')
sed('-ie', 's/luaL_reg/luaL_Reg/', 'lbitlib.c')
luarocks('--tree=' + prefix, 'make')
|
player1537-forks/spack
|
var/spack/repos/builtin.mock/packages/conditional-constrained-dependencies/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 ConditionalConstrainedDependencies(Package):
"""Package that has a variant which adds a dependency forced to
use non default values.
"""
homepage = "https://dev.null"
version('1.0')
# This variant is on by default and attaches a dependency
# with a lot of variants set at their non-default values
variant('dep', default=True, description='nope')
depends_on('dep-with-variants+foo+bar+baz', when='+dep')
|
player1537-forks/spack
|
lib/spack/spack/test/modules/common.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)
import collections
import os
import stat
import pytest
import spack.error
import spack.modules.tcl
import spack.spec
from spack.modules.common import UpstreamModuleIndex
from spack.spec import Spec
def test_update_dictionary_extending_list():
target = {
'foo': {
'a': 1,
'b': 2,
'd': 4
},
'bar': [1, 2, 4],
'baz': 'foobar'
}
update = {
'foo': {
'c': 3,
},
'bar': [3],
'baz': 'foobaz',
'newkey': {
'd': 4
}
}
spack.modules.common.update_dictionary_extending_lists(target, update)
assert len(target) == 4
assert len(target['foo']) == 4
assert len(target['bar']) == 4
assert target['baz'] == 'foobaz'
@pytest.fixture()
def mock_module_filename(monkeypatch, tmpdir):
filename = str(tmpdir.join('module'))
# Set for both module types so we can test both
monkeypatch.setattr(spack.modules.lmod.LmodFileLayout,
'filename',
filename)
monkeypatch.setattr(spack.modules.tcl.TclFileLayout,
'filename',
filename)
yield filename
@pytest.fixture()
def mock_module_defaults(monkeypatch):
def impl(*args):
# No need to patch both types because neither override base
monkeypatch.setattr(spack.modules.common.BaseConfiguration,
'defaults',
[arg for arg in args])
return impl
@pytest.fixture()
def mock_package_perms(monkeypatch):
perms = stat.S_IRGRP | stat.S_IWGRP
monkeypatch.setattr(spack.package_prefs,
'get_package_permissions',
lambda spec: perms)
yield perms
def test_modules_written_with_proper_permissions(mock_module_filename,
mock_package_perms,
mock_packages, config):
spec = spack.spec.Spec('mpileaks').concretized()
# The code tested is common to all module types, but has to be tested from
# one. TCL picked at random
generator = spack.modules.tcl.TclModulefileWriter(spec, 'default')
generator.write()
assert mock_package_perms & os.stat(
mock_module_filename).st_mode == mock_package_perms
@pytest.mark.parametrize('module_type', ['tcl', 'lmod'])
def test_modules_default_symlink(
module_type, mock_packages, mock_module_filename, mock_module_defaults, config
):
spec = spack.spec.Spec('mpileaks@2.3').concretized()
mock_module_defaults(spec.format('{name}{@version}'))
generator_cls = spack.modules.module_types[module_type]
generator = generator_cls(spec, 'default')
generator.write()
link_path = os.path.join(os.path.dirname(mock_module_filename), 'default')
assert os.path.islink(link_path)
assert os.readlink(link_path) == mock_module_filename
class MockDb(object):
def __init__(self, db_ids, spec_hash_to_db):
self.upstream_dbs = db_ids
self.spec_hash_to_db = spec_hash_to_db
def db_for_spec_hash(self, spec_hash):
return self.spec_hash_to_db.get(spec_hash)
class MockSpec(object):
def __init__(self, unique_id):
self.unique_id = unique_id
def dag_hash(self):
return self.unique_id
def test_upstream_module_index():
s1 = MockSpec('spec-1')
s2 = MockSpec('spec-2')
s3 = MockSpec('spec-3')
s4 = MockSpec('spec-4')
tcl_module_index = """\
module_index:
{0}:
path: /path/to/a
use_name: a
""".format(s1.dag_hash())
module_indices = [
{
'tcl': spack.modules.common._read_module_index(tcl_module_index)
},
{}
]
dbs = [
'd0',
'd1'
]
mock_db = MockDb(
dbs,
{
s1.dag_hash(): 'd0',
s2.dag_hash(): 'd1',
s3.dag_hash(): 'd0'
}
)
upstream_index = UpstreamModuleIndex(mock_db, module_indices)
m1 = upstream_index.upstream_module(s1, 'tcl')
assert m1.path == '/path/to/a'
# No modules are defined for the DB associated with s2
assert not upstream_index.upstream_module(s2, 'tcl')
# Modules are defined for the index associated with s1, but none are
# defined for the requested type
assert not upstream_index.upstream_module(s1, 'lmod')
# A module is registered with a DB and the associated module index has
# modules of the specified type defined, but not for the requested spec
assert not upstream_index.upstream_module(s3, 'tcl')
# The spec isn't recorded as installed in any of the DBs
with pytest.raises(spack.error.SpackError):
upstream_index.upstream_module(s4, 'tcl')
def test_get_module_upstream():
s1 = MockSpec('spec-1')
tcl_module_index = """\
module_index:
{0}:
path: /path/to/a
use_name: a
""".format(s1.dag_hash())
module_indices = [
{},
{
'tcl': spack.modules.common._read_module_index(tcl_module_index)
}
]
dbs = ['d0', 'd1']
mock_db = MockDb(
dbs,
{s1.dag_hash(): 'd1'}
)
upstream_index = UpstreamModuleIndex(mock_db, module_indices)
MockPackage = collections.namedtuple('MockPackage', ['installed_upstream'])
setattr(s1, "package", MockPackage(True))
try:
old_index = spack.modules.common.upstream_module_index
spack.modules.common.upstream_module_index = upstream_index
m1_path = spack.modules.common.get_module('tcl', s1, True)
assert m1_path == '/path/to/a'
finally:
spack.modules.common.upstream_module_index = old_index
def test_load_installed_package_not_in_repo(install_mockery, mock_fetch,
monkeypatch):
# Get a basic concrete spec for the trivial install package.
spec = Spec('trivial-install-test-package')
spec.concretize()
assert spec.concrete
# Get the package
pkg = spec.package
def find_nothing(*args):
raise spack.repo.UnknownPackageError(
'Repo package access is disabled for test')
try:
pkg.do_install()
spec._package = None
monkeypatch.setattr(spack.repo, 'get', find_nothing)
with pytest.raises(spack.repo.UnknownPackageError):
spec.package
module_path = spack.modules.common.get_module('tcl', spec, True)
assert module_path
pkg.do_uninstall()
except Exception:
pkg.remove_prefix()
raise
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-ggfun/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 RGgfun(RPackage):
"""Miscellaneous Functions for 'ggplot2'.
Useful functions to edit 'ggplot' object (e.g., setting fonts for theme and
layers, adding rounded rectangle as background for each of the legends)."""
cran = "ggfun"
version('0.0.5', sha256='b1e340a8932d2cffbbbf6070ce96c9356599e9955a2b6534fcb17e599c575783')
version('0.0.4', sha256='5926365f9a90baf47320baf48c40f515ef570f9c767484adea5f04219964d21e')
depends_on('r-ggplot2', type=('build', 'run'))
depends_on('r-rlang', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/linux-pam/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 LinuxPam(AutotoolsPackage):
"""Linux PAM (Pluggable Authentication Modules for Linux) project."""
homepage = "http://www.linux-pam.org/"
url = "https://github.com/linux-pam/linux-pam/releases/download/v1.5.2/Linux-PAM-1.5.2.tar.xz"
version('1.5.1', sha256='201d40730b1135b1b3cdea09f2c28ac634d73181ccd0172ceddee3649c5792fc')
version('1.5.2', sha256='e4ec7131a91da44512574268f493c6d8ca105c87091691b8e9b56ca685d4f94d')
version('1.5.0', sha256='02d39854b508fae9dc713f7733bbcdadbe17b50de965aedddd65bcb6cc7852c8')
version('1.4.0', sha256='cd6d928c51e64139be3bdb38692c68183a509b83d4f2c221024ccd4bcddfd034')
version('1.3.1', sha256='eff47a4ecd833fbf18de9686632a70ee8d0794b79aecb217ebd0ce11db4cd0db')
depends_on('m4', type='build')
depends_on('autoconf', type='build')
depends_on('automake', type='build')
depends_on('libtool', type='build')
def configure_args(self):
config_args = [
'--includedir=' + self.prefix.include.security
]
return config_args
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-pygithub/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 PyPygithub(PythonPackage):
"""Use the full Github API v3"""
homepage = "https://pygithub.readthedocs.io/"
pypi = "PyGithub/PyGithub-1.54.1.tar.gz"
version('1.55', sha256='1bbfff9372047ff3f21d5cd8e07720f3dbfdaf6462fcaed9d815f528f1ba7283')
depends_on('python@3.6:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('py-deprecated', type=('build', 'run'))
depends_on('py-pyjwt@2:', type=('build', 'run'))
depends_on('py-pynacl@1.4.0:', type=('build', 'run'))
depends_on('py-requests@2.14.0:', type=('build', 'run'))
|
player1537-forks/spack
|
lib/spack/spack/platforms/__init__.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 contextlib
from ._functions import _host, by_name, platforms, prevent_cray_detection, reset
from ._platform import Platform
from .cray import Cray
from .darwin import Darwin
from .linux import Linux
from .test import Test
__all__ = [
'Platform',
'Cray',
'Darwin',
'Linux',
'Test',
'platforms',
'host',
'by_name',
'reset',
'prevent_cray_detection'
]
#: The "real" platform of the host running Spack. This should not be changed
#: by any method and is here as a convenient way to refer to the host platform.
real_host = _host
#: The current platform used by Spack. May be swapped by the use_platform
#: context manager.
host = _host
class _PickleableCallable(object):
"""Class used to pickle a callable that may substitute either
_platform or _all_platforms. Lambda or nested functions are
not pickleable.
"""
def __init__(self, return_value):
self.return_value = return_value
def __call__(self):
return self.return_value
@contextlib.contextmanager
def use_platform(new_platform):
global host
import spack.compilers
import spack.config
msg = '"{0}" must be an instance of Platform'
assert isinstance(new_platform, Platform), msg.format(new_platform)
original_host_fn = host
try:
host = _PickleableCallable(new_platform)
# Clear configuration and compiler caches
spack.config.config.clear_caches()
spack.compilers._cache_config_files = []
yield new_platform
finally:
host = original_host_fn
# Clear configuration and compiler caches
spack.config.config.clear_caches()
spack.compilers._cache_config_files = []
|
player1537-forks/spack
|
lib/spack/spack/test/cmd/style.py
|
<filename>lib/spack/spack/test/cmd/style.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 filecmp
import os
import shutil
import sys
import pytest
from llnl.util.filesystem import FileFilter
import spack.main
import spack.paths
import spack.repo
from spack.cmd.style import changed_files
from spack.util.executable import which
#: directory with sample style files
style_data = os.path.join(spack.paths.test_path, 'data', 'style')
style = spack.main.SpackCommand("style")
def has_develop_branch():
git = which('git')
if not git:
return False
git("show-ref", "--verify", "--quiet",
"refs/heads/develop", fail_on_error=False)
return git.returncode == 0
# spack style requires git to run -- skip the tests if it's not there
pytestmark = pytest.mark.skipif(not has_develop_branch(),
reason='requires git with develop branch')
# The style tools have requirements to use newer Python versions. We simplify by
# requiring Python 3.6 or higher to run spack style.
skip_old_python = pytest.mark.skipif(
sys.version_info < (3, 6), reason='requires Python 3.6 or higher'
)
@pytest.fixture(scope="function")
def flake8_package():
"""Style only checks files that have been modified. This fixture makes a small
change to the ``flake8`` mock package, yields the filename, then undoes the
change on cleanup.
"""
repo = spack.repo.Repo(spack.paths.mock_packages_path)
filename = repo.filename_for_package_name("flake8")
tmp = filename + ".tmp"
try:
shutil.copy(filename, tmp)
package = FileFilter(filename)
package.filter("state = 'unmodified'", "state = 'modified'", string=True)
yield filename
finally:
shutil.move(tmp, filename)
@pytest.fixture
def flake8_package_with_errors(scope="function"):
"""A flake8 package with errors."""
repo = spack.repo.Repo(spack.paths.mock_packages_path)
filename = repo.filename_for_package_name("flake8")
tmp = filename + ".tmp"
try:
shutil.copy(filename, tmp)
package = FileFilter(filename)
package.filter("state = 'unmodified'", "state = 'modified'", string=True)
package.filter(
"from spack import *", "from spack import *\nimport os", string=True
)
yield filename
finally:
shutil.move(tmp, filename)
def test_changed_files(flake8_package):
# changed_files returns file paths relative to the root
# directory of Spack. Convert to absolute file paths.
files = [os.path.join(spack.paths.prefix, path) for path in changed_files()]
# There will likely be other files that have changed
# when these tests are run
assert flake8_package in files
def test_changed_no_base(tmpdir, capfd):
"""Ensure that we fail gracefully with no base branch."""
tmpdir.join("bin").ensure("spack")
git = which("git", required=True)
with tmpdir.as_cwd():
git("init")
git("config", "user.name", "test user")
git("config", "user.email", "<EMAIL>")
git("add", ".")
git("commit", "-m", "initial commit")
with pytest.raises(SystemExit):
changed_files(base="foobar")
out, err = capfd.readouterr()
assert "This repository does not have a 'foobar' branch." in err
def test_changed_files_all_files(flake8_package):
# it's hard to guarantee "all files", so do some sanity checks.
files = set([
os.path.join(spack.paths.prefix, path)
for path in changed_files(all_files=True)
])
# spack has a lot of files -- check that we're in the right ballpark
assert len(files) > 6000
# a builtin package
zlib = spack.repo.path.get_pkg_class("zlib")
assert zlib.module.__file__ in files
# a core spack file
assert os.path.join(spack.paths.module_path, "spec.py") in files
# a mock package
assert flake8_package in files
# this test
assert __file__ in files
# ensure externals are excluded
assert not any(f.startswith(spack.paths.external_path) for f in files)
@pytest.mark.skipif(sys.version_info >= (3, 6), reason="doesn't apply to newer python")
def test_fail_on_old_python():
"""Ensure that `spack style` runs but fails with older python."""
output = style(fail_on_error=False)
assert "spack style requires Python 3.6" in output
@skip_old_python
def test_bad_root(tmpdir):
"""Ensure that `spack style` doesn't run on non-spack directories."""
output = style("--root", str(tmpdir), fail_on_error=False)
assert "This does not look like a valid spack root" in output
assert style.returncode != 0
def test_style_is_package(tmpdir):
"""Ensure the is_package() function works."""
assert spack.cmd.style.is_package(
"var/spack/repos/builtin/packages/hdf5/package.py"
)
assert spack.cmd.style.is_package(
"var/spack/repos/builtin/packages/zlib/package.py"
)
assert not spack.cmd.style.is_package("lib/spack/spack/spec.py")
assert not spack.cmd.style.is_package("lib/spack/external/pytest.py")
@pytest.fixture
def external_style_root(flake8_package_with_errors, tmpdir):
"""Create a mock git repository for running spack style."""
git = which("git", required=True)
# create a sort-of spack-looking directory
script = tmpdir / "bin" / "spack"
script.ensure()
spack_dir = tmpdir / "lib" / "spack" / "spack"
spack_dir.ensure("__init__.py")
llnl_dir = tmpdir / "lib" / "spack" / "llnl"
llnl_dir.ensure("__init__.py")
# create a base develop branch
with tmpdir.as_cwd():
git("init")
git("config", "user.name", "test user")
git("config", "user.email", "<EMAIL>")
git("add", ".")
git("commit", "-m", "initial commit")
git("branch", "-m", "develop")
git("checkout", "-b", "feature")
# copy the buggy package in
py_file = spack_dir / "dummy.py"
py_file.ensure()
shutil.copy(flake8_package_with_errors, str(py_file))
# add the buggy file on the feature branch
with tmpdir.as_cwd():
git("add", str(py_file))
git("commit", "-m", "add new file")
yield tmpdir, py_file
@skip_old_python
@pytest.mark.skipif(not which("black"), reason="black is not installed.")
@pytest.mark.skipif(not which("flake8"), reason="flake8 is not installed.")
def test_fix_style(external_style_root):
"""Make sure spack style --fix works."""
tmpdir, py_file = external_style_root
broken_dummy = os.path.join(style_data, "broken.dummy")
broken_py = str(tmpdir / "lib" / "spack" / "spack" / "broken.py")
fixed_py = os.path.join(style_data, "fixed.py")
shutil.copy(broken_dummy, broken_py)
assert not filecmp.cmp(broken_py, fixed_py)
output = style(
"--root", str(tmpdir),
"--no-mypy", # mypy doesn't fix, so skip it
"--no-flake8", # flake8 doesn't fix, so skip it
"--black",
"--fix",
)
print(output)
assert filecmp.cmp(broken_py, fixed_py)
@skip_old_python
@pytest.mark.skipif(not which("flake8"), reason="flake8 is not installed.")
@pytest.mark.skipif(not which("isort"), reason="isort is not installed.")
@pytest.mark.skipif(not which("mypy"), reason="mypy is not installed.")
@pytest.mark.skipif(not which("black"), reason="black is not installed.")
def test_external_root(external_style_root):
"""Ensure we can run in a separate root directory w/o configuration files."""
tmpdir, py_file = external_style_root
# make sure tools are finding issues with external root,
# not the real one.
output = style(
"--root-relative", "--black", "--root", str(tmpdir),
fail_on_error=False
)
# make sure it failed
assert style.returncode != 0
# isort error
assert "%s Imports are incorrectly sorted" % str(py_file) in output
# mypy error
assert 'lib/spack/spack/dummy.py:10: error: Name "Package" is not defined' in output
# black error
assert "--- lib/spack/spack/dummy.py" in output
assert "+++ lib/spack/spack/dummy.py" in output
# flake8 error
assert "lib/spack/spack/dummy.py:7: [F401] 'os' imported but unused" in output
@skip_old_python
@pytest.mark.skipif(not which("flake8"), reason="flake8 is not installed.")
def test_style(flake8_package, tmpdir):
root_relative = os.path.relpath(flake8_package, spack.paths.prefix)
# use a working directory to test cwd-relative paths, as tests run in
# the spack prefix by default
with tmpdir.as_cwd():
relative = os.path.relpath(flake8_package)
# no args
output = style()
assert relative in output
assert "spack style checks were clean" in output
# one specific arg
output = style(flake8_package)
assert relative in output
assert "spack style checks were clean" in output
# specific file that isn't changed
output = style(__file__)
assert relative not in output
assert __file__ in output
assert "spack style checks were clean" in output
# root-relative paths
output = style("--root-relative", flake8_package)
assert root_relative in output
assert "spack style checks were clean" in output
@skip_old_python
@pytest.mark.skipif(not which("flake8"), reason="flake8 is not installed.")
def test_style_with_errors(flake8_package_with_errors):
root_relative = os.path.relpath(flake8_package_with_errors, spack.paths.prefix)
output = style("--root-relative", flake8_package_with_errors, fail_on_error=False)
assert root_relative in output
assert style.returncode != 0
assert "spack style found errors" in output
@skip_old_python
@pytest.mark.skipif(not which("flake8"), reason="flake8 is not installed.")
@pytest.mark.skipif(not which("black"), reason="black is not installed.")
def test_style_with_black(flake8_package_with_errors):
output = style("--black", flake8_package_with_errors, fail_on_error=False)
assert "black found errors" in output
assert style.returncode != 0
assert "spack style found errors" in output
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-seriate/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 PySeriate(PythonPackage):
"""This is a Python implementation of Seriation
algorithm. Seriation is an approach for ordering elements in a set
so that the sum of the sequential pairwise distances is
minimal. We state this task as a Travelling Salesman Problem (TSP)
and leverage the powerful Google's or-tools to do
heavy-lifting. Since TSP is NP-hard, it is not possible to
calculate the precise solution for a big number of
elements. However, the or-tools' heuristics work very well in
practice, and they are used in e.g. Google Maps."""
homepage = "https://github.com/src-d/seriate"
url = "https://github.com/src-d/seriate/archive/1.1.2.tar.gz"
version('1.1.2', sha256='5e031e865398fbe24aebdbb4a2e0015447aec50478830850f29d38660fd266e3')
depends_on('py-setuptools', type='build')
depends_on('py-numpy@1.0:', type=('build', 'run'))
depends_on('py-packaging@16.0:', type=('build', 'run'))
depends_on('py-or-tools', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-stringfish/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 RStringfish(RPackage):
"""Alt String Implementation.
Provides an extendable, performant and multithreaded 'alt-string'
implementation backed by 'C++' vectors and strings."""
cran = "stringfish"
maintainers = ['dorton21']
version('0.15.5', sha256='9df21146a7710e5a9ab4bb53ebc231a580c798b7e541b8d78df53207283f8129')
version('0.14.2', sha256='9373cfc715cda1527fd20179435977b8e59e19d8c5ef82a31e519f93fb624ced')
depends_on('r@3.5.0:', type=('build', 'run'))
depends_on('r@3.0.2:', type=('build', 'run'), when='@0.15.5:')
depends_on('r-rcpp@0.12.18.3:', type=('build', 'run'))
depends_on('r-rcppparallel', type=('build', 'run'))
depends_on('gmake', type='build')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-ggplotify/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 RGgplotify(RPackage):
"""Convert Plot to 'grob' or 'ggplot' Object.
Convert plot function call (using expression or formula) to 'grob' or
'ggplot' object that compatible to the 'grid' and 'ggplot2' ecosystem. With
this package, we are able to e.g. using 'cowplot' to align plots produced
by 'base' graphics, 'ComplexHeatmap', 'eulerr', 'grid', 'lattice',
'magick', 'pheatmap', 'vcd' etc. by converting them to 'ggplot' objects."""
cran = "ggplotify"
version('0.1.0', sha256='178f73d6d3dc391c3efb1a62c95fe38587044f9e3288dffb915d3687941bb38a')
version('0.0.5', sha256='035ea6a70023c4819c8a486d0fd94c2765aa4d6df318747e104eeb9829b9d65d')
version('0.0.3', sha256='7e7953a2933aa7127a0bac54375e3e0219a0744cfc3249c3d7b76065f7a51892')
depends_on('r@3.4.0:', type=('build', 'run'))
depends_on('r-ggplot2', type=('build', 'run'))
depends_on('r-gridgraphics', type=('build', 'run'))
depends_on('r-yulab-utils', type=('build', 'run'), when='@0.1.0:')
depends_on('r-rvcheck', type=('build', 'run'), when='@:0.0.5')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/antlr/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 Antlr(AutotoolsPackage):
"""ANTLR (ANother Tool for Language Recognition) is a powerful parser
generator for reading, processing, executing, or translating structured
text or binary files. It's widely used to build languages, tools, and
frameworks. From a grammar, ANTLR generates a parser that can build and
walk parse trees."""
homepage = "https://www.antlr2.org/"
url = "http://www.antlr2.org/download/antlr-2.7.7.tar.gz"
version('2.7.7', sha256='853aeb021aef7586bda29e74a6b03006bcb565a755c86b66032d8ec31b67dbb9')
# Fixes build with recent versions of GCC
patch('gcc.patch')
variant('cxx', default=True, description='Enable ANTLR for C++')
variant('java', default=False, description='Enable ANTLR for Java')
variant('python', default=False, description='Enable ANTLR for Python')
extends('python', when='+python')
depends_on('java', type=('build', 'run'), when='+java')
def configure_args(self):
spec = self.spec
return [
'--disable-csharp',
'--{0}-cxx'.format('enable' if '+cxx' in spec else 'disable'),
'--{0}-java'.format('enable' if '+java' in spec else 'disable'),
'--{0}-python'.format('enable' if '+python' in spec else 'disable')
]
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/soci/package.py
|
<filename>var/spack/repos/builtin/packages/soci/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 Soci(CMakePackage):
"""Official repository of the SOCI - The C++ Database Access Library"""
homepage = "https://github.com/SOCI/soci"
url = "https://github.com/SOCI/soci/archive/v4.0.2.tar.gz"
version('4.0.2', sha256='f293192a412ed82693d17dfe46e2734b140bff835bc3259e3cbd7c315e5e2d74')
version('4.0.0', sha256='359b988d8cbe81357835317821919f7e270c0705e41951a92ac1627cb9fe8faf')
version('3.2.3', sha256='1166664d5d7c4552c4c2abf173f98fa4427fbb454930fd04de3a39782553199e',
url="https://github.com/SOCI/soci/archive/3.2.3.tar.gz")
version('3.2.2', sha256='cf1a6130ebdf0b84d246da948874ab1312c317e2ec659ede732b688667c355f4',
url="https://github.com/SOCI/soci/archive/3.2.2.tar.gz")
variant('cxxstd', default=11, values=('98', '11', '14', '17', '20'),
multi=False, description='Use the specified C++ standard when building')
variant('static', default=True, description='Enable build of static libraries')
variant('boost', default=False, description='Build with Boost support')
variant('sqlite', default=False, description='Build with SQLite support')
variant('postgresql', default=False, description='Build with PostgreSQL support')
depends_on('boost', when='+boost')
depends_on('sqlite', when='+sqlite')
depends_on('postgresql+client_only', when='+postgresql')
@property
def root_cmakelists_dir(self):
if self.spec.satisfies('@:3'):
return 'src'
else:
return self.stage.source_path
def cmake_args(self):
args = [
# SOCI_STATIC does not work with BOOL:OFF
'-DSOCI_STATIC=' + ('ON' if '+static' in self.spec else 'OFF'),
self.define_from_variant('CMAKE_CXX_STANDARD', 'cxxstd'),
self.define_from_variant('WITH_BOOST', 'boost'),
self.define_from_variant('WITH_SQLITE3', 'sqlite'),
self.define_from_variant('WITH_POSTGRESQL', 'postgresql'),
]
return args
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-dominate/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 PyDominate(PythonPackage):
"""Dominate is a Python library for creating and
manipulating HTML documents using an elegant DOM API. It
allows you to write HTML pages in pure Python very
concisely, which eliminates the need to learn another
template language, and lets you take advantage of the more
powerful features of Python."""
homepage = "https://github.com/Knio/dominate"
pypi = "dominate/dominate-2.6.0.tar.gz"
# license = "LGPL-3.0"
version('2.6.0', sha256='76ec2cde23700a6fc4fee098168b9dee43b99c2f1dd0ca6a711f683e8eb7e1e4')
depends_on('python@2.7:2,3.4:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-isoband/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 RIsoband(RPackage):
"""Generate Isolines and Isobands from Regularly Spaced Elevation Grids.
A fast C++ implementation to generate contour lines (isolines) and contour
polygons (isobands) from regularly spaced grids containing elevation
data."""
cran = "isoband"
version('0.2.5', sha256='46f53fa066f0966f02cb2bf050190c0d5e950dab2cdf565feb63fc092c886ba5')
version('0.2.3', sha256='f9d3318fdf6d147dc2e2c7015ea7de42a55fa33d6232b952f982df96066b7ffe')
depends_on('r-testthat', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-regex/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 PyRegex(PythonPackage):
"""Alternative regular expression module, to replace re."""
pypi = "regex/regex-2020.11.13.tar.gz"
version('2020.11.13', sha256='83d6b356e116ca119db8e7c6fc2983289d87b27b3fac238cfe5dca529d884562')
version('2019.11.1', sha256='720e34a539a76a1fedcebe4397290604cc2bdf6f81eca44adb9fb2ea071c0c69')
version('2019.02.07', sha256='4a1a1d963f462c13722b34ef1f82c4707091b0a3fb9b5fd79b6670c38b734095')
version('2018.01.10', sha256='139678fc013b75e486e580c39b4c52d085ed7362e400960f8be1711a414f16b5')
version('2017.07.11', sha256='dbda8bdc31a1c85445f1a1b29d04abda46e5c690f8f933a9cc3a85a358969616')
depends_on('py-setuptools', type='build', when='@:2018,2020:')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-gwmodel/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 RGwmodel(RPackage):
"""Geographically-Weighted Models.
Techniques from a particular branch of spatial statistics,termed
geographically-weighted (GW) models. GW models suit situations when data
are not described well by some global model, but where there are spatial
regions where a suitably localised calibration provides a better
description. 'GWmodel' includes functions to calibrate: GW summary
statistics (Brunsdon et al., 2002) <doi:10.1016/s0198-9715(01)00009-6>, GW
principal components analysis (Harris et al., 2011)
<doi:10.1080/13658816.2011.554838>, GW discriminant analysis (Brunsdon et
al., 2007) <doi:10.1111/j.1538-4632.2007.00709.x> and various forms of GW
regression (Brunsdon et al., 1996)
<doi:10.1111/j.1538-4632.1996.tb00936.x>; some of which are provided in
basic and robust (outlier resistant) forms."""
cran = "GWmodel"
version('2.2-8', sha256='5b1890dbf75502e89b651efd9158be77b3cfa764a5717f9889f438ed2b0a4da2')
version('2.2-2', sha256='4e2b221b85fbc828ffc4f057c137ded849afcaac2a75c27d2d6d0a6db17f8a06')
version('2.1-3', sha256='3e1a36fddf8e64f61d548067bb043216f8d12069d814a4cbf07a9cae0b310af6')
version('2.1-1', sha256='91241b4e26d423a54c7c6784ef5159759058a5dafdff18a1ea8451faf979d1f3')
version('2.0-9', sha256='b479af2c19d4aec30f1883d00193d52e342c609c1badcb51cc0344e4404cffa7')
depends_on('r@3.0.0:', type=('build', 'run'))
depends_on('r-maptools@0.5-2:', type=('build', 'run'))
depends_on('r-robustbase', type=('build', 'run'))
depends_on('r-sp', type=('build', 'run'))
depends_on('r-sp@1.4-0:', type=('build', 'run'), when='@2.2-2:')
depends_on('r-rcpp', type=('build', 'run'))
depends_on('r-spatialreg', type=('build', 'run'))
depends_on('r-spacetime', type=('build', 'run'))
depends_on('r-spdep', type=('build', 'run'))
depends_on('r-fnn', type=('build', 'run'), when='@2.1-1:')
depends_on('r-rcpparmadillo', type=('build', 'run'))
depends_on('gmake', type='build')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/onnx/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 Onnx(CMakePackage):
"""Open Neural Network Exchange (ONNX).
ONNX provides an open source format for AI models, both deep learning and
traditional ML. It defines an extensible computation graph model, as well
as definitions of built-in operators and standard data types."""
homepage = "https://github.com/onnx/onnx"
url = "https://github.com/onnx/onnx/archive/refs/tags/v1.9.0.tar.gz"
git = "https://github.com/onnx/onnx.git"
version('master', branch='master')
version('1.10.1', sha256='cb2fe3e0c9bba128a5790a565d81be30f4b5571eaca5418fb19df8d2d0f11ce2')
version('1.10.0', sha256='705a27ee076713b8c755911913c9ffa8f96b95fc3a8568ed0b8e1dd954d67147')
version('1.9.0', sha256='61d459a5f30604cabec352574119a6685dfd43bfa757cfbff52be9471d5b8ea0')
version('1.8.0_2020-11-03', commit='54c38e6eaf557b844e70cebc00f39ced3321e9ad') # py-torch@1.8:1.9
version('1.7.0_2020-05-31', commit='a<PASSWORD>0e2e332d8f74ad5b0c726fd47c85376') # py-torch@1.6:1.7
version('1.6.0_2020-02-16', commit='9fdae4c68960a2d44cd1cc871c74a6a9d469fa1f') # py-torch@1.5
version('1.6.0_2019-11-06', commit='fea8568cac61a482ed208748fdc0e1a8e47f62f5') # py-torch@1.4
version('1.6.0_2019-09-26', commit='<KEY>') # py-torch@1.3
version('1.5.0_2019-07-25', commit='28ca699b69b5a31892619defca2391044a9a6052') # py-torch@1.2
version('1.5.0_2019-04-25', commit='<KEY>') # py-torch@1.1
version('1.3.0_2018-12-04', commit='<KEY>') # py-torch@1.0
version('1.2.2_2018-07-16', commit='b2817a682f25f960586f06caa539bbbd7a96b859') # py-torch@0.4.1
version('1.1.0_2018-04-19', commit='<PASSWORD>bed51cc508a25b22130de459830b5d5<PASSWORD>c41') # py-torch@0.4.0
depends_on('cmake@3.1:', type='build')
depends_on('ninja', type='build')
depends_on('python', type='build')
depends_on('protobuf')
generator = 'Ninja'
def cmake_args(self):
# Try to get ONNX to use the same version of python as the spec is using
args = ['-DPY_VERSION={0}'.format(self.spec['python'].version.up_to(2))]
return args
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-boruta/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 RBoruta(RPackage):
"""Wrapper Algorithm for All Relevant Feature Selection.
An all relevant feature selection wrapper algorithm. It finds relevant
features by comparing original attributes' importance with importance
achievable at random, estimated using their permuted copies (shadows)."""
cran = "Boruta"
version('7.0.0', sha256='6ff520d27d68637058c33a34c547a656bb44d5e351b7cc7afed6cd4216275c78')
version('6.0.0', sha256='1c9a7aabe09f040e147f6c614f5fe1d0b951d3b0f0024161fbb4c31da8fae8de')
depends_on('r-ranger', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-bayesian-optimization/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 PyBayesianOptimization(PythonPackage):
"""Pure Python implementation of bayesian global
optimization with gaussian processes."""
homepage = "https://github.com/fmfn/BayesianOptimization"
pypi = 'bayesian-optimization/bayesian-optimization-1.2.0.tar.gz'
version('1.2.0', sha256='c2fd3af4b6cc24ee1c145295b2a900ffb9b455cad924e8185a8d5784712bc935')
depends_on('py-setuptools', type='build')
depends_on("py-numpy@1.9.0:", type=('build', 'run'))
depends_on("py-scipy@0.14.0:", type=('build', 'run'))
depends_on("py-scikit-learn@0.18.0:", type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/libcgroup/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 Libcgroup(AutotoolsPackage):
"""Library of control groups."""
homepage = "https://sourceforge.net/projects/libcg/"
url = "https://sourceforge.net/projects/libcg/files/libcgroup/v0.41/libcgroup-0.41.tar.bz2"
version('0.41', sha256='e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706f6fb51')
version('0.37', sha256='15c8f3febb546530d3495af4e4904b3189c273277ca2d8553dec882cde1cd0f6')
version('0.36', sha256='8dcd2ae220435b3de736d3efb0023fdf1192d7a7f4032b439f3cf5342cff7b4c')
depends_on('m4', type='build')
depends_on('autoconf', type='build')
depends_on('automake', type='build')
depends_on('libtool', type='build')
depends_on('bison', type='build')
depends_on('flex', type='build')
depends_on('linux-pam')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/hicolor-icon-theme/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 HicolorIconTheme(AutotoolsPackage):
"""icon-theme contains the standard also references the default
icon theme called hicolor."""
homepage = "https://www.freedesktop.org/wiki/Software/icon-theme/"
url = "https://icon-theme.freedesktop.org/releases/hicolor-icon-theme-0.17.tar.xz"
version('0.17', sha256='317484352271d18cbbcfac3868eab798d67fff1b8402e740baa6ff41d588a9d8')
def setup_dependent_build_environment(self, env, dependent_spec):
env.prepend_path('XDG_DATA_DIRS', self.prefix.share)
def setup_dependent_run_environment(self, env, dependent_spec):
env.prepend_path('XDG_DATA_DIRS', self.prefix.share)
def setup_build_environment(self, env):
env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
def setup_run_environment(self, env):
env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-questionr/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 RQuestionr(RPackage):
"""Functions to Make Surveys Processing Easier.
Set of functions to make the processing and analysis of surveys easier:
interactive shiny apps and addins for data recoding, contingency tables,
dataset metadata handling, and several convenience functions."""
cran = "questionr"
version('0.7.7', sha256='ce24c40bd98dbeca615b9eb2a9cd2da26852821dc3840f8394eeecb0739dfd56')
version('0.7.6', sha256='4b71d049d9e032157e12a7809dbfa2a39262b49d0c7a03ed434791a66f0cee5e')
version('0.7.4', sha256='818ad87723aa7ebe466b3a639c9e86b7f77e6a341c8d9a933073925a21d4555c')
depends_on('r@3.5.0:', type=('build', 'run'))
depends_on('r-shiny@1.0.5:', type=('build', 'run'))
depends_on('r-miniui', type=('build', 'run'))
depends_on('r-rstudioapi', type=('build', 'run'))
depends_on('r-highr', type=('build', 'run'))
depends_on('r-styler', type=('build', 'run'))
depends_on('r-classint', type=('build', 'run'))
depends_on('r-htmltools', type=('build', 'run'))
depends_on('r-labelled@2.6.0:', type=('build', 'run'))
depends_on('xclip', when='platform=linux')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-pyfftw/package.py
|
<filename>var/spack/repos/builtin/packages/py-pyfftw/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 PyPyfftw(PythonPackage):
"""A pythonic wrapper around FFTW, the FFT library,
presenting a unified interface for all the supported transforms."""
homepage = "http://hgomersall.github.com/pyFFTW"
pypi = "pyFFTW/pyFFTW-0.10.4.tar.gz"
version('0.12.0', sha256='60988e823ca75808a26fd79d88dbae1de3699e72a293f812aa4534f8a0a58cb0')
version('0.11.1', sha256='05ea28dede4c3aaaf5c66f56eb0f71849d0d50f5bc0f53ca0ffa69534af14926')
version('0.10.4', sha256='739b436b7c0aeddf99a48749380260364d2dc027cf1d5f63dafb5f50068ede1a')
depends_on('fftw')
depends_on('py-setuptools', type='build')
depends_on('py-cython@0.29:0', type='build')
depends_on('py-numpy@1.6:', type=('build', 'run'), when='@:0.10.4')
depends_on('py-numpy@1.10:1', type=('build', 'run'), when='@0.11.0:')
def setup_build_environment(self, env):
env.append_flags('LDFLAGS', self.spec['fftw'].libs.search_flags)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/sox/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 Sox(AutotoolsPackage):
"""SoX, the Swiss Army knife of sound processing programs."""
homepage = "http://sox.sourceforge.net/Main/HomePage"
url = "https://downloads.sourceforge.net/project/sox/sox/14.4.2/sox-14.4.2.tar.bz2"
version('14.4.2', sha256='81a6956d4330e75b5827316e44ae381e6f1e8928003c6aa45896da9041ea149c')
variant('mp3',
default=False,
description='Build with mp3 support')
depends_on('bzip2')
depends_on('flac')
depends_on('id3lib')
depends_on('libvorbis')
depends_on('opus')
depends_on('lame', when='+mp3')
depends_on('libmad', when='+mp3')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-mpm/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 RMpm(RPackage):
"""Multivariate Projection Methods.
Exploratory graphical analysis of multivariate data, specifically gene
expression data with different projection methods: principal component
analysis, correspondence analysis, spectral map analysis."""
cran = "mpm"
version('1.0-22', sha256='d3ba4053cd57a189cb65c5fa20e6a4152374aead8c985254cb6e550e36e23272')
depends_on('r@2.10:', type=('build', 'run'))
depends_on('r-mass', type=('build', 'run'))
depends_on('r-kernsmooth', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/gtkplus/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 Gtkplus(MesonPackage):
"""The GTK+ package contains libraries used for creating graphical user
interfaces for applications."""
homepage = "https://www.gtk.org/"
url = "https://download.gnome.org/sources/gtk+/3.24/gtk+-3.24.26.tar.xz"
version('3.24.29', sha256='f57ec4ade8f15cab0c23a80dcaee85b876e70a8823d9105f067ce335a8268caa')
version('3.24.26', sha256='2cc1b2dc5cad15d25b6abd115c55ffd8331e8d4677745dd3ce6db725b4fff1e9')
version('3.20.10', sha256='e81da1af1c5c1fee87ba439770e17272fa5c06e64572939814da406859e56b70', deprecated=True)
version('2.24.32', sha256='b6c8a93ddda5eabe3bfee1eb39636c9a03d2a56c7b62828b359bf197943c582e', deprecated=True)
version('2.24.31', sha256='68c1922732c7efc08df4656a5366dcc3afdc8791513400dac276009b40954658', deprecated=True)
version('2.24.25', sha256='38af1020cb8ff3d10dda2c8807f11e92af9d2fa4045de61c62eedb7fbc7ea5b3', deprecated=True)
variant('cups', default='False', description='enable cups support')
# See meson.build for version requirements
depends_on('meson@0.48.0:', when='@3.24:', type='build')
depends_on('ninja', when='@3.24:', type='build')
# Needed to build man pages:
# depends_on('docbook-xml', when='@3.24:', type='build')
# depends_on('docbook-xsl', when='@3.24:', type='build')
# depends_on('libxslt', when='@3.24:', type='build')
depends_on('pkgconfig', type='build')
depends_on('glib@2.57.2:')
depends_on('pango@1.41.0:+X')
depends_on('fribidi@0.19.7:')
depends_on('atk@2.35.1:')
depends_on('at-spi2-atk@2.15.1:', when='@3:')
depends_on('cairo@1.14.0:+X+pdf+gobject')
depends_on('gdk-pixbuf@2.30.0:')
depends_on('gobject-introspection@1.39.0:')
depends_on('shared-mime-info')
depends_on('libxkbcommon')
depends_on('librsvg')
depends_on('xrandr')
depends_on('libepoxy+glx', when='@3:')
depends_on('libxi', when='@3:')
depends_on('inputproto', when='@3:')
depends_on('fixesproto', when='@3:')
depends_on('gettext', when='@3:')
depends_on('cups', when='+cups')
patch('no-demos.patch', when='@2.0:2')
def url_for_version(self, version):
url = 'https://download.gnome.org/sources/gtk+/{0}/gtk+-{1}.tar.xz'
return url.format(version.up_to(2), version)
def patch(self):
# remove disable deprecated flag.
filter_file(r'CFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CFLAGS"',
'', 'configure', string=True)
# https://gitlab.gnome.org/GNOME/gtk/-/issues/3776
if self.spec.satisfies('@3:%gcc@11:'):
filter_file(" '-Werror=array-bounds',",
'', 'meson.build', string=True)
def setup_run_environment(self, env):
env.prepend_path("GI_TYPELIB_PATH",
join_path(self.prefix.lib, 'girepository-1.0'))
def setup_dependent_build_environment(self, env, dependent_spec):
env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
env.prepend_path("GI_TYPELIB_PATH",
join_path(self.prefix.lib, 'girepository-1.0'))
def setup_dependent_run_environment(self, env, dependent_spec):
env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
env.prepend_path("GI_TYPELIB_PATH",
join_path(self.prefix.lib, 'girepository-1.0'))
def meson_args(self):
args = std_meson_args
if self.spec.satisfies('platform=darwin'):
args.extend([
'-Dx11_backend=false',
'-Dquartz_backend=true',
])
args.extend([
'-Dgtk_doc=false',
'-Dman=false',
'-Dintrospection=true',
'-Dwayland_backend=false',
])
return args
def configure_args(self):
true = which('true')
args = [
'--prefix={0}'.format(self.prefix),
# disable building of gtk-doc files following #9771
'--disable-gtk-doc-html',
'GTKDOC_CHECK={0}'.format(true),
'GTKDOC_CHECK_PATH={0}'.format(true),
'GTKDOC_MKPDF={0}'.format(true),
'GTKDOC_REBASE={0}'.format(true),
]
if '~cups' in self.spec:
args.append('--disable-cups')
return args
@when('@:3.20.10')
def meson(self, spec, prefix):
configure(*self.configure_args())
@when('@:3.20.10')
def build(self, spec, prefix):
make()
@when('@:3.20.10')
def install(self, spec, prefix):
make('install')
def check(self):
"""All build time checks open windows in the X server, don't do that"""
pass
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/cradl/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 Cradl(Package):
"""The CRADL proxy application captured performance metrics during
inference on data from multiphysics codes, specifically ALE
hydrodynamics codes."""
homepage = "https://github.com/LLNL/CRADL"
url = "https://github.com/LLNL/CRADL/archive/master.zip"
git = "https://github.com/LLNL/CRADL.git"
tags = ['proxy-app']
version('master', branch='master')
depends_on('py-pandas')
depends_on('py-torch')
depends_on('py-torchvision')
depends_on('py-apex')
depends_on('py-gputil')
depends_on('py-matplotlib')
depends_on('py-mpi4py')
def install(self, spec, prefix):
# Mostly about providing an environment so just copy everything
install_tree('.', prefix)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/astral/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.path
from spack import *
class Astral(Package):
"""ASTRAL is a tool for estimating an unrooted species tree given a set of
unrooted gene trees."""
homepage = "https://github.com/smirarab/ASTRAL"
url = "https://github.com/smirarab/ASTRAL/archive/v4.10.7.tar.gz"
version('5.6.1', sha256='b49a67c9fe19c0c92a89dc2f1a3928840e698a53054a595c61546ca98448a076',
url='https://github.com/smirarab/ASTRAL/archive/untagged-697f19dbce69929ece09.tar.gz')
version('4.10.7', sha256='314b49e0129ec06a7c78a1b60d590259ede6a5e75253407031e108d8048fcc79')
depends_on('java', type=('build', 'run'))
depends_on('zip', type='build')
phases = ['build', 'install']
def build(self, spec, prefix):
make = Executable('./make.sh')
make()
def install(self, spec, prefix):
mkdirp(prefix.bin)
install_tree('lib', prefix.tools.lib)
jar_file = 'astral.{v}.jar'.format(v=self.version)
install(jar_file, prefix.tools)
script_sh = join_path(os.path.dirname(__file__), "astral.sh")
script = prefix.bin.astral
install(script_sh, script)
set_executable(script)
java = self.spec['java'].prefix.bin.java
kwargs = {'ignore_absent': False, 'backup': False, 'string': False}
filter_file('^java', java, script, **kwargs)
filter_file('astral.jar', join_path(prefix.tools, jar_file),
script, **kwargs)
def setup_run_environment(self, env):
env.set('ASTRAL_HOME', self.prefix.tools)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-deoptimr/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 RDeoptimr(RPackage):
"""Differential Evolution Optimization in Pure R.
Differential Evolution (DE) stochastic algorithms for global optimization
of problems with and without constraints. The aim is to curate a collection
of its state-of-the-art variants that (1) do not sacrifice simplicity of
design, (2) are essentially tuning-free, and (3) can be efficiently
implemented directly in the R language. Currently, it only provides an
implementation of the 'jDE' algorithm by Brest et al. (2006)
<doi:10.1109/TEVC.2006.872133>."""
cran = "DEoptimR"
version('1.0-10', sha256='774f7ba0ac9c73aaab4567024b98afdb58098905726e72bceeeb9e380e782ad5')
version('1.0-8', sha256='846911c1b2561a9fae73a8c60a21a5680963ebb0050af3c1f1147ae9a121e5ef')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/gaussian/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 Gaussian(Package):
"""Gaussian is a computer program for computational chemistry"""
homepage = "http://www.gaussian.com/"
manual_download = True
maintainers = ['antoniokaust']
version('16-B.01', sha256='0b2cf60aa85d2c8c8e7547446e60e8e8cb67eec20e5f13c4a3e4e7616dcdf122')
version('09-D.01', sha256='ef14885b5e334b6ec44a93bfd7225c634247dc946416af3087ab055bf05f54cd')
@property
def ver(self):
return self.version.string.split('-')[0]
@property
def g_root(self):
return join_path(self.prefix, 'g' + self.ver)
@property
def g_bsd(self):
return join_path(self.g_root, 'bsd')
def url_for_version(self, version):
return "file://{0}/g{1}.tgz".format(os.getcwd(), version)
def install(self, spec, prefix):
install_tree('.', self.g_root)
@run_after('install')
def bsd_install(self):
with working_dir(self.g_root):
bsd_install = Executable(join_path('bsd', 'install'))
bsd_install()
def setup_run_environment(self, env):
env.set('g' + self.ver + 'root', self.prefix)
env.prepend_path('GAUSS_EXEDIR', self.g_root)
env.prepend_path('GAUSS_EXEDIR', self.g_bsd)
env.prepend_path('PATH', self.g_root)
env.prepend_path('PATH', self.g_bsd)
env.set('GAUSS_LEXEDIR', join_path(self.g_root, 'linda-exe'))
env.set('GAUSS_ARCHDIR', join_path(self.g_root, 'arch'))
env.set('GAUSS_BSDDIR', self.g_bsd)
env.set('G' + self.ver + 'BASIS', join_path(self.g_root, 'basis'))
env.prepend_path('LD_LIBRARY_PATH', self.g_root)
env.prepend_path('LD_LIBRARY_PATH', self.g_bsd)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/lerc/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 Lerc(CMakePackage):
"""Limited Error Raster Compression.
LERC is an open-source image or raster format which supports rapid encoding
and decoding for any pixel type (not just RGB or Byte). Users set the maximum
compression error per pixel while encoding, so the precision of the original
input image is preserved (within user defined error bounds)."""
homepage = "https://github.com/Esri/lerc"
url = "https://github.com/Esri/lerc/archive/refs/tags/v3.0.tar.gz"
version('3.0', sha256='8c0148f5c22d823eff7b2c999b0781f8095e49a7d3195f13c68c5541dd5740a1')
depends_on('cmake@3.11:', type='build')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-genie3/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 RGenie3(RPackage):
"""GEne Network Inference with Ensemble of trees.
This package implements the GENIE3 algorithm for inferring gene
regulatory networks from expression data."""
bioc = "GENIE3"
version('1.16.0', commit='5543b1b883d3a1c92e955de6668444278edc2bdf')
version('1.12.0', commit='14289cee9bed113ab35ba03bcaac4a30e5784497')
version('1.6.0', commit='<KEY>')
version('1.4.3', commit='<KEY>')
version('1.2.1', commit='1b56fe8184d521d1bb247f000efe9e2b540604c9')
version('1.0.0', commit='eb7c95ed12ea50d61e8fa20bc2b25ae9d74c302f')
depends_on('r-reshape2', type=('build', 'run'))
depends_on('r-dplyr', type=('build', 'run'), when='@1.16.0:')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/libgpg-error/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 LibgpgError(AutotoolsPackage):
"""Common error values for all GnuPG components."""
homepage = "https://www.gnupg.org/related_software/libgpg-error/index.en.html"
url = "https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.37.tar.bz2"
maintainers = ['alalazo']
version('1.43', sha256='a9ab83ca7acc442a5bd846a75b920285ff79bdb4e3d34aa382be88ed2c3aebaf')
version('1.42', sha256='fc07e70f6c615f8c4f590a8e37a9b8dd2e2ca1e9408f8e60459c67452b925e23')
version('1.41', sha256='64b078b45ac3c3003d7e352a5e05318880a5778c42331ce1ef33d1a0d9922742')
version('1.40', sha256='e6b0392e852a8ad069242265c513c946b492b00816f3967a97d297886939623a')
version('1.37', sha256='b32d6ff72a73cf79797f7f2d039e95e9c6f92f0c1450215410840ab62aea9763')
version('1.36', sha256='babd98437208c163175c29453f8681094bcaf92968a15cafb1a276076b33c97c')
version('1.27', sha256='4f93aac6fecb7da2b92871bb9ee33032be6a87b174f54abf8ddf0911a22d29d2')
version('1.21', sha256='b7dbdb3cad63a740e9f0c632a1da32d4afdb694ec86c8625c98ea0691713b84d')
version('1.18', sha256='9ff1d6e61d4cef7c1d0607ceef6d40dc33f3da7a3094170c3718c00153d80810')
depends_on('awk', type='build')
# Patch for using gawk@5, c.f. https://dev.gnupg.org/T4459
patch('awk-5.patch', when='@1.36^gawk@5:')
def configure_args(self):
return [
'--enable-static',
'--enable-shared',
'--enable-tests' if self.run_tests else '--disable-tests'
]
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/libxi/package.py
|
<filename>var/spack/repos/builtin/packages/libxi/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 Libxi(AutotoolsPackage, XorgPackage):
"""libXi - library for the X Input Extension."""
homepage = "https://cgit.freedesktop.org/xorg/lib/libXi"
xorg_mirror_path = "lib/libXi-1.7.6.tar.gz"
version('1.7.6', sha256='4e88fa7decd287e58140ea72238f8d54e4791de302938c83695fc0c9ac102b7e')
depends_on('pkgconfig', type='build')
depends_on('libx11@1.6:')
depends_on('libxext@172.16.31.10:')
depends_on('libxfixes@5:')
depends_on('fixesproto@5.0:')
depends_on('xproto@7.0.13:')
depends_on('xextproto@7.0.3:')
depends_on('inputproto@172.16.58.3:')
@property
def libs(self):
return find_libraries(
'libXi', self.prefix, shared=True, recursive=True)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-dtplyr/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 RDtplyr(RPackage):
"""Data Table Back-End for 'dplyr'.
Provides a data.table backend for 'dplyr'. The goal of 'dtplyr' is to allow
you to write 'dplyr' code that is automatically translated to the
equivalent, but usually much faster, data.table code."""
cran = "dtplyr"
version('1.2.1', sha256='2640e9cde4eaa06f02cff29e3f2b99fdd08488df07ea2e6629b2ed6a8285d0f3')
version('1.2.0', sha256='a6dedfb6dd80dfc1d29d005ab634c060b7bfda8cb49835ece84d3b7d12077414')
version('1.1.0', sha256='99681b7285d7d5086e5595ca6bbeebf7f4e2ee358a32b694cd9d35916cdfc732')
depends_on('r@3.3:', type=('build', 'run'))
depends_on('r-crayon', type=('build', 'run'))
depends_on('r-data-table@1.12.4:', type=('build', 'run'))
depends_on('r-data-table@1.13.0:', type=('build', 'run'), when='@1.2.0:')
depends_on('r-dplyr@1.0.3:', type=('build', 'run'))
depends_on('r-ellipsis', type=('build', 'run'))
depends_on('r-glue', type=('build', 'run'))
depends_on('r-lifecycle', type=('build', 'run'))
depends_on('r-rlang', type=('build', 'run'))
depends_on('r-tibble', type=('build', 'run'))
depends_on('r-tidyselect', type=('build', 'run'))
depends_on('r-vctrs', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/canal/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 Canal(MavenPackage):
"""Alibaba MySQL binlog incremental subscription & consumer components."""
homepage = "https://github.com/alibaba/canal/wiki"
url = "https://github.com/alibaba/canal/archive/canal-1.1.4.tar.gz"
version('1.1.4', sha256='740e0adac56d7f281cba21eca173eef3e8d42aa3e0fb49709f92cb6a1451dfbc')
version('1.1.3', sha256='3fe75ca5eb5cb97eb35818426c1427542ccddb0de052cf154e948ef321822cbc')
version('1.1.2', sha256='097190f952bdf09b835ed68966f5a98fa8308322a6aab11c1bfd16cec1800cf2')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/brpc/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 Brpc(CMakePackage):
"""An industrial-grade RPC framework used throughout Baidu, with
1,000,000+ instances(not counting clients) and thousands kinds of
services, called "baidu-rpc" inside Baidu. Only C++ implementatioo
on is opensourced right now."""
homepage = "https://github.com/apache/incubator-brpc"
url = "https://github.com/apache/incubator-brpc/archive/0.9.7.tar.gz"
version('0.9.7', sha256='722cd342baf3b05189ca78ecf6c56ea6ffec22e62fc2938335e4e5bab545a49c')
version('0.9.6', sha256='b872ca844999e0ba768acd823b409761f126590fb34cb0183da915a595161446')
version('0.9.5', sha256='11ca8942242a4c542c11345b7463a4aea33a11ca33e91d9a2f64f126df8c70e9')
depends_on('gflags')
depends_on('protobuf')
depends_on('leveldb')
depends_on('openssl')
patch('narrow.patch', sha256='d7393029443853ddda6c09e3d2185ac2f60920a36a8b685eb83b6b80c1535539', when='@:0.9.7')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/aeskeyfind/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 Aeskeyfind(MakefilePackage):
"""This program illustrates automatic techniques for locating 128-bit
and 256-bit AES keys in a captured memory image."""
homepage = "https://github.com/makomk/aeskeyfind"
git = "https://github.com/makomk/aeskeyfind.git"
version('master', branch='master')
def install(self, spec, prefix):
mkdirp(prefix.bin)
install('aeskeyfind', prefix.bin)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-tiff/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 RTiff(RPackage):
"""Read and write TIFF images.
This package provides an easy and simple way to read, write and display
bitmap images stored in the TIFF format. It can read and write both files
and in-memory raw vectors."""
cran = "tiff"
version('0.1-11', sha256='b8c3ea15114d972f8140541c7b01f5ce2e5322af1f63c1a083aaf766fd3eec75')
version('0.1-10', sha256='535154e89e85e14fe697469d2c59826a44c7937e7eca2eaca1aee6b0fe320afe')
version('0.1-6', sha256='623bd9c16a426df7e6056738c5d91da86ea9b49df375eea6b5127e4e458dc4fb')
version('0.1-5', sha256='9514e6a9926fcddc29ce1dd12b1072ad8265900373f738de687ef4a1f9124e2b')
depends_on('r@2.9.0:', type=('build', 'run'))
depends_on("libtiff")
depends_on("jpeg")
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-stargazer/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 RStargazer(RPackage):
"""Well-Formatted Regression and Summary Statistics Tables.
Produces LaTeX code, HTML/CSS code and ASCII text for well-formatted tables
that hold regression analysis results from several models side-by-side, as
well as summary statistics."""
cran = "stargazer"
version('5.2.2', sha256='70eb4a13a6ac1bfb35af07cb8a63d501ad38dfd9817fc3fba6724260b23932de')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-phylobase/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 RPhylobase(RPackage):
"""Base Package for Phylogenetic Structures and Comparative Data.
Provides a base S4 class for comparative methods, incorporating one or more
trees and trait data."""
cran = "phylobase"
version('0.8.10', sha256='5a44380ff49bab333a56f6f96157324ade8afb4af0730e013194c4badb0bf94b')
depends_on('r-ade4', type=('build', 'run'))
depends_on('r-ape@3.0:', type=('build', 'run'))
depends_on('r-rcpp@0.11.0:', type=('build', 'run'))
depends_on('r-rncl@0.6.0:', type=('build', 'run'))
depends_on('r-rnexml', type=('build', 'run'))
|
player1537-forks/spack
|
lib/spack/spack/test/module_parsing.py
|
<filename>lib/spack/spack/test/module_parsing.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
from spack.util.module_cmd import (
get_path_args_from_module_line,
get_path_from_module_contents,
module,
path_from_modules,
)
test_module_lines = ['prepend-path LD_LIBRARY_PATH /path/to/lib',
'setenv MOD_DIR /path/to',
'setenv LDFLAGS -Wl,-rpath/path/to/lib',
'setenv LDFLAGS -L/path/to/lib',
'prepend-path PATH /path/to/bin']
_test_template = "'. %s 2>&1' % args[1]"
def test_module_function_change_env(tmpdir, working_env, monkeypatch):
monkeypatch.setattr(spack.util.module_cmd, '_cmd_template', _test_template)
src_file = str(tmpdir.join('src_me'))
with open(src_file, 'w') as f:
f.write('export TEST_MODULE_ENV_VAR=TEST_SUCCESS\n')
os.environ['NOT_AFFECTED'] = "NOT_AFFECTED"
module('load', src_file)
assert os.environ['TEST_MODULE_ENV_VAR'] == 'TEST_SUCCESS'
assert os.environ['NOT_AFFECTED'] == "NOT_AFFECTED"
def test_module_function_no_change(tmpdir, monkeypatch):
monkeypatch.setattr(spack.util.module_cmd, '_cmd_template', _test_template)
src_file = str(tmpdir.join('src_me'))
with open(src_file, 'w') as f:
f.write('echo TEST_MODULE_FUNCTION_PRINT')
old_env = os.environ.copy()
text = module('show', src_file)
assert text == 'TEST_MODULE_FUNCTION_PRINT\n'
assert os.environ == old_env
def test_get_path_from_module_faked(monkeypatch):
for line in test_module_lines:
def fake_module(*args):
return line
monkeypatch.setattr(spack.util.module_cmd, 'module', fake_module)
path = path_from_modules(['mod'])
assert path == '/path/to'
def test_get_path_from_module_contents():
# A line with "MODULEPATH" appears early on, and the test confirms that it
# is not extracted as the package's path
module_show_output = """
os.environ["MODULEPATH"] = "/path/to/modules1:/path/to/modules2";
----------------------------------------------------------------------------
/root/cmake/3.9.2.lua:
----------------------------------------------------------------------------
help([[CMake Version 3.9.2
]])
whatis("Name: CMake")
whatis("Version: 3.9.2")
whatis("Category: Tools")
whatis("URL: https://cmake.org/")
prepend_path("LD_LIBRARY_PATH","/bad/path")
prepend_path("PATH","/path/to/cmake-3.9.2/bin:/other/bad/path")
prepend_path("MANPATH","/path/to/cmake/cmake-3.9.2/share/man")
prepend_path("LD_LIBRARY_PATH","/path/to/cmake-3.9.2/lib64")
"""
module_show_lines = module_show_output.split('\n')
# PATH and LD_LIBRARY_PATH outvote MANPATH and the other PATH and
# LD_LIBRARY_PATH entries
assert (get_path_from_module_contents(module_show_lines, 'cmake-3.9.2') ==
'/path/to/cmake-3.9.2')
def test_get_path_from_empty_module():
assert get_path_from_module_contents('', 'test') is None
def test_pkg_dir_from_module_name():
module_show_lines = ['setenv FOO_BAR_DIR /path/to/foo-bar']
assert (get_path_from_module_contents(module_show_lines, 'foo-bar') ==
'/path/to/foo-bar')
assert (get_path_from_module_contents(module_show_lines, 'foo-bar/1.0') ==
'/path/to/foo-bar')
def test_get_argument_from_module_line():
simple_lines = ['prepend-path LD_LIBRARY_PATH /lib/path',
'prepend-path LD_LIBRARY_PATH /lib/path',
"prepend_path('PATH' , '/lib/path')",
'prepend_path( "PATH" , "/lib/path" )',
'prepend_path("PATH",' + "'/lib/path')"]
complex_lines = ['prepend-path LD_LIBRARY_PATH /lib/path:/pkg/path',
'prepend-path LD_LIBRARY_PATH /lib/path:/pkg/path',
"prepend_path('PATH' , '/lib/path:/pkg/path')",
'prepend_path( "PATH" , "/lib/path:/pkg/path" )',
'prepend_path("PATH",' + "'/lib/path:/pkg/path')"]
bad_lines = ['prepend_path(PATH,/lib/path)',
'prepend-path (LD_LIBRARY_PATH) /lib/path']
assert all(get_path_args_from_module_line(x) == ['/lib/path']
for x in simple_lines)
assert all(get_path_args_from_module_line(x) == ['/lib/path', '/pkg/path']
for x in complex_lines)
for bl in bad_lines:
with pytest.raises(ValueError):
get_path_args_from_module_line(bl)
def test_lmod_quote_parsing():
lines = ['setenv("SOME_PARTICULAR_DIR","-L/opt/cray/pe/mpich/8.1.4/gtl/lib")']
result = get_path_from_module_contents(lines, 'some-module')
assert '/opt/cray/pe/mpich/8.1.4/gtl' == result
|
player1537-forks/spack
|
lib/spack/spack/test/buildtask.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 pytest
import spack.installer as inst
import spack.repo
import spack.spec
def test_build_task_errors(install_mockery):
with pytest.raises(ValueError, match='must be a package'):
inst.BuildTask('abc', None, False, 0, 0, 0, [])
pkg = spack.repo.get('trivial-install-test-package')
with pytest.raises(ValueError, match='must have a concrete spec'):
inst.BuildTask(pkg, None, False, 0, 0, 0, [])
spec = spack.spec.Spec('trivial-install-test-package')
spec.concretize()
assert spec.concrete
with pytest.raises(ValueError, match='must have a build request'):
inst.BuildTask(spec.package, None, False, 0, 0, 0, [])
request = inst.BuildRequest(spec.package, {})
with pytest.raises(inst.InstallError, match='Cannot create a build task'):
inst.BuildTask(spec.package, request, False, 0, 0, inst.STATUS_REMOVED,
[])
def test_build_task_basics(install_mockery):
spec = spack.spec.Spec('dependent-install')
spec.concretize()
assert spec.concrete
# Ensure key properties match expectations
request = inst.BuildRequest(spec.package, {})
task = inst.BuildTask(spec.package, request, False, 0, 0,
inst.STATUS_ADDED, [])
assert task.explicit # package was "explicitly" requested
assert task.priority == len(task.uninstalled_deps)
assert task.key == (task.priority, task.sequence)
# Ensure flagging installed works as expected
assert len(task.uninstalled_deps) > 0
assert task.dependencies == task.uninstalled_deps
task.flag_installed(task.dependencies)
assert len(task.uninstalled_deps) == 0
assert task.priority == 0
def test_build_task_strings(install_mockery):
"""Tests of build_task repr and str for coverage purposes."""
# Using a package with one dependency
spec = spack.spec.Spec('dependent-install')
spec.concretize()
assert spec.concrete
# Ensure key properties match expectations
request = inst.BuildRequest(spec.package, {})
task = inst.BuildTask(spec.package, request, False, 0, 0,
inst.STATUS_ADDED, [])
# Cover __repr__
irep = task.__repr__()
assert irep.startswith(task.__class__.__name__)
assert "status='queued'" in irep # == STATUS_ADDED
assert "sequence=" in irep
# Cover __str__
istr = str(task)
assert "status=queued" in istr # == STATUS_ADDED
assert "#dependencies=1" in istr
assert "priority=" in istr
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-stack-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 PyStackData(PythonPackage):
"""Extract data from python stack frames and tracebacks for informative
displays."""
homepage = "http://github.com/alexmojaki/stack_data"
pypi = "stack_data/stack_data-0.2.0.tar.gz"
version('0.2.0', sha256='45692d41bd633a9503a5195552df22b583caf16f0b27c4e58c98d88c8b648e12')
depends_on('py-setuptools@44:', type='build')
depends_on('py-setuptools-scm+toml@3.4.3:', type='build')
depends_on('py-executing', type=('build', 'run'))
depends_on('py-asttokens', type=('build', 'run'))
depends_on('py-pure-eval', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/datamash/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 Datamash(AutotoolsPackage, GNUMirrorPackage):
"""GNU datamash is a command-line program which performs basic numeric,
textual and statistical operations on input textual data files.
"""
homepage = "https://www.gnu.org/software/datamash/"
gnu_mirror_path = "datamash/datamash-1.0.5.tar.gz"
version('1.3', sha256='eebb52171a4353aaad01921384098cf54eb96ebfaf99660e017f6d9fc96657a6')
version('1.1.0', sha256='a9e5acc86af4dd64c7ac7f6554718b40271aa67f7ff6e9819bdd919a25904bb0')
version('1.0.7', sha256='1a0b300611a5dff89e08e20773252b00f5e2c2d65b2ad789872fc7df94fa8978')
version('1.0.6', sha256='0154c25c45b5506b6d618ca8e18d0ef093dac47946ac0df464fb21e77b504118')
version('1.0.5', sha256='cb7c0b7bf654eea5bb80f10c1710c8dffab8106549fd6b4341cba140e15a9938')
build_directory = 'spack-build'
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/damask-grid/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)
class DamaskGrid(CMakePackage):
"""Grid solver for DAMASK"""
homepage = "https://damask.mpie.de"
url = "https://damask.mpie.de/download/damask-3.0.0.tar.xz"
maintainers = ['MarDiehl']
version('3.0.0-alpha4', sha256='0bb8bde43b27d852b1fb6e359a7157354544557ad83d87987b03f5d629ce5493')
version('3.0.0-alpha5', sha256='2d2b10901959c26a5bb5c52327cdafc7943bc1b36b77b515b0371221703249ae')
depends_on('pkgconfig', type='build')
depends_on('cmake@3.10:', type='build')
depends_on('petsc+mpi+hdf5')
depends_on('petsc@3.14.0:3.14,3.15.1:3.15', when='@3.0.0-alpha4')
depends_on('petsc@3.14.0:3.14,3.15.1:3.16', when='@3.0.0-alpha5')
depends_on('hdf5@1.10:+mpi+fortran')
depends_on('fftw+mpi')
patch('CMakeDebugRelease.patch', when='@3.0.0-alpha4')
variant('build_type', default='DebugRelease',
description='The build type to build',
values=('Debug', 'Release', 'DebugRelease'))
def patch(self):
filter_file(' -lz ', ' -lz ${FFTW_LIBS} ', 'CMakeLists.txt')
def cmake_args(self):
return [self.define('DAMASK_SOLVER', 'grid'),
self.define('FFTW_LIBS', self.spec['fftw:mpi'].libs.link_flags)]
@run_after('install')
@on_package_attributes(run_tests=True)
def execute(self):
with working_dir(self.build_directory):
damask_grid = Executable('src/DAMASK_grid')
damask_grid('--help')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/npm/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 shutil
from spack import *
# NOTE: not actually an Autotools package
class Npm(Package):
"""npm: A package manager for javascript."""
homepage = "https://github.com/npm/cli"
# base https://www.npmjs.com/
url = "https://registry.npmjs.org/npm/-/npm-6.13.4.tgz"
version('6.14.9', sha256='1e0e880ce0d5adf0120fb3f92fc8e5ea5bac73681d37282615d074ff670f7703')
version('6.14.8', sha256='fe8e873cb606c06f67f666b4725eb9122c8927f677c8c0baf1477f0ff81f5a2c')
version('6.13.7', sha256='6adf71c198d61a5790cf0e057f4ab72c6ef6c345d72bed8bb7212cb9db969494')
version('6.13.4', sha256='a063290bd5fa06a8753de14169b7b243750432f42d01213fbd699e6b85916de7')
version('3.10.9', sha256='fb0871b1aebf4b74717a72289fade356aedca83ee54e7386e38cb51874501dd6')
version('3.10.5', sha256='ff019769e186152098841c1fa6325e5a79f7903a45f13bd0046a4dc8e63f845f')
depends_on('node-js', type=('build', 'run'))
# npm 6.13.4 ships with node-gyp 5.0.5, which contains several Python 3
# compatibility issues on macOS. Manually update to node-gyp 6.0.1 for
# full Python 3 support.
resource(name='node-gyp', destination='node-gyp',
url='https://registry.npmjs.org/node-gyp/-/node-gyp-6.0.1.tgz',
sha256='bbc0e137e17a63676efc97a0e3b1fcf101498a1c2c01c3341cd9491f248711b8')
resource(name='env-paths', destination='env-paths',
url='https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz',
sha256='168b394fbca60ea81dc84b1824466df96246b9eb4d671c2541f55f408a264b4c')
phases = ['configure', 'build', 'install']
def patch(self):
shutil.rmtree('node_modules/node-gyp')
install_tree('node-gyp/package', 'node_modules/node-gyp')
filter_file(r'"node-gyp": "\^5\..*"', '"node-gyp": "^6.0.1"',
'package.json')
install_tree('env-paths/package', 'node_modules/env-paths')
def configure(self, spec, prefix):
configure('--prefix={0}'.format(prefix))
def build(self, spec, prefix):
make()
def install(self, spec, prefix):
make('install')
def setup_dependent_build_environment(self, env, dependent_spec):
npm_config_cache_dir = "%s/npm-cache" % dependent_spec.prefix
if not os.path.isdir(npm_config_cache_dir):
mkdirp(npm_config_cache_dir)
env.set('npm_config_cache', npm_config_cache_dir)
def setup_dependent_run_environment(self, env, dependent_spec):
npm_config_cache_dir = "%s/npm-cache" % dependent_spec.prefix
if not os.path.isdir(npm_config_cache_dir):
mkdirp(npm_config_cache_dir)
env.set('npm_config_cache', npm_config_cache_dir)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/byteman/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 Byteman(MavenPackage):
"""Byteman is a tool which makes it easy to trace, monitor and test
the behaviour of Java application and JDK runtime code."""
homepage = "https://www.jboss.org/byteman"
url = "https://github.com/bytemanproject/byteman/archive/4.0.12.tar.gz"
version('4.0.12', sha256='72fdc904d7b8df9e743fbb5ae84e51ffc81d32b6e0b0b80fc7ac165dd8c9c7c2')
version('4.0.11', sha256='8e4af6019702c8b22f354962f35f197f9ba2c8699235aac77ebd9263ac12261b')
version('4.0.10', sha256='1b3c9e66fc3f230e407904db1ac43eb5cd4c33620f0d0f9f6c0cb23e4d28784e')
version('4.0.9', sha256='4ffffa9e0bbc45d5c47d443dcae21191531e8b68ade9423d109d40826bf0bd2b')
version('4.0.8', sha256='f357d759c1dad52f4ae626d07fb2cf7c62855b7421723633d90ac49d83bd154b')
version('4.0.7', sha256='542d688c804cd7baa7efad59a94ef8e5d21cc81f3e897f31152c96a7df896aa5')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/hyphy/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 Hyphy(CMakePackage):
"""HyPhy: Hypothesis testing using Phylogenies"""
homepage = "https://www.hyphy.org/"
url = "https://github.com/veg/hyphy/archive/2.3.14.tar.gz"
version('2.3.14', sha256='9e6c817cb649986e3fe944bcaf88be3533e7e62968b9a486c719e951e5ed1cf6')
depends_on('cmake@3.0:', type='build')
depends_on('curl')
conflicts('%gcc@:4.8')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-fastica/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 RFastica(RPackage):
"""FastICA Algorithms to Perform ICA and Projection Pursuit.
Implementation of FastICA algorithm to perform Independent Component
Analysis (ICA) and Projection Pursuit."""
cran = "fastICA"
version('1.2-3', sha256='e9ef82644cb64bb49ae3b7b6e0885f4fb2dc08ae030f8c76fe8dd8507b658950')
version('1.2-2', sha256='32223593374102bf54c8fdca7b57231e4f4d0dd0be02d9f3500ad41b1996f1fe')
depends_on('r@3.0.0:', type=('build', 'run'))
depends_on('r@4.0.0:', type=('build', 'run'), when='@1.2-3:')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-clustergeneration/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 RClustergeneration(RPackage):
"""Random Cluster Generation (with Specified Degree of Separation).
We developed the clusterGeneration package to provide functions for
generating random clusters, generating random covariance/correlation
matrices, calculating a separation index (data and population version) for
pairs of clusters or cluster distributions, and 1-D and 2-D projection
plots to visualize clusters. The package also contains a function to
generate random clusters based on factorial designs with factors such as
degree of separation, number of clusters, number of variables, number of
noisy variables."""
cran = "clusterGeneration"
version('1.3.7', sha256='534f29d8f7ed11e6e9a496f15845b588ec7133f3da5e6def8140b88500e52d5c')
version('1.3.4', sha256='7c591ad95a8a9d7fb0e4d5d80dfd78f7d6a63cf7d11eb53dd3c98fdfb5b868aa')
depends_on('r@2.9.1:', type=('build', 'run'))
depends_on('r@3.5.0:', type=('build', 'run'), when='@1.3.7:')
depends_on('r-mass', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/ccfits/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 Ccfits(AutotoolsPackage):
"""CCfits is an object oriented interface to the cfitsio library.
It is designed to make the capabilities of cfitsio available to programmers
working in C++. It is written in ANSI C++ and implemented using the C++
Standard Library with namespaces, exception handling, and member template
functions. """
homepage = "https://heasarc.gsfc.nasa.gov/fitsio/CCfits/"
url = "https://heasarc.gsfc.nasa.gov/fitsio/CCfits/CCfits-2.5.tar.gz"
version('2.6', sha256='2bb439db67e537d0671166ad4d522290859e8e56c2f495c76faa97bc91b28612')
version('2.5', sha256='938ecd25239e65f519b8d2b50702416edc723de5f0a5387cceea8c4004a44740')
version('2.4', sha256='ba6c5012b260adf7633f92581279ea582e331343d8c973981aa7de07242bd7f8')
depends_on('cfitsio')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-a4preproc/package.py
|
<reponame>player1537-forks/spack<filename>var/spack/repos/builtin/packages/r-a4preproc/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 RA4preproc(RPackage):
"""Automated Affymetrix Array Analysis Preprocessing Package.
Utility functions to pre-process data for the Automated Affymetrix Array
Analysis set of packages."""
bioc = "a4Preproc"
version('1.42.0', commit='<PASSWORD>')
version('1.38.0', commit='<KEY>')
version('1.32.0', commit='<PASSWORD>')
version('1.30.0', commit='e6fb9fa2e7c703974e6ca10c0e9681b097b05978')
version('1.28.0', commit='435d66727f1187020d034a1beaf4cd8bd4f76981')
version('1.26.0', commit='<PASSWORD>')
version('1.24.0', commit='651014b8102807aea4f1274e34e083e70b5e7ee7')
depends_on('r-biocgenerics', type=('build', 'run'), when='@1.38.0:')
depends_on('r-biobase', type=('build', 'run'), when='@1.38.0:')
depends_on('r-annotationdbi', type=('build', 'run'), when='@:1.32.0')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/r-fda/package.py
|
<filename>var/spack/repos/builtin/packages/r-fda/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)
class RFda(RPackage):
"""Functional Data Analysis.
These functions were developed to support functional data
analysis as described in <NAME>. and <NAME>. (2005)
Functional Data Analysis. New York: Springer and in Ramsay, <NAME>.,
<NAME>, and Graves, Spencer (2009). """
cran = 'fda'
version('5.5.1', sha256='dcaa2f6ae226d35855bc79c6967f60d45404b984c0afaec215b139c4b8dea23a')
depends_on('r@3.5:', type=('build', 'run'))
depends_on('r-matrix', type=('build', 'run'))
depends_on('r-fds', type=('build', 'run'))
depends_on('r-desolve', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/neuron/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 Neuron(CMakePackage):
"""NEURON is a simulation environment for single and networks of neurons.
NEURON is a simulation environment for modeling individual and networks of
neurons. NEURON models individual neurons via the use of sections that are
automatically subdivided into individual compartments, instead of
requiring the user to manually create compartments.
"""
homepage = "https://www.neuron.yale.edu/"
url = "https://neuron.yale.edu/ftp/neuron/versions/v7.7/nrn-7.7.tar.gz"
git = "https://github.com/neuronsimulator/nrn"
maintainers = ['pramodk', 'nrnhines', 'iomaganaris', 'alexsavulescu']
version('develop', branch='master', submodules='True')
version("8.0.0", tag="8.0.0", submodules='True')
version("7.8.2", tag="7.8.2", submodules='True')
version("7.8.1", tag="7.8.1", submodules='True')
variant("coreneuron", default=False, description="Enable CoreNEURON as submodule")
variant("cross-compile", default=False, description="Build for cross-compile environment")
variant("interviews", default=False, description="Enable GUI with INTERVIEWS")
variant("legacy-unit", default=False, description="Enable legacy units")
variant("mpi", default=True, description="Enable MPI parallelism")
variant("python", default=True, description="Enable python")
variant("rx3d", default=False, description="Enable cython translated 3-d rxd")
variant("tests", default=False, description="Enable unit tests")
variant("caliper", default=False, description="Add LLNL/Caliper support")
depends_on("bison", type="build")
depends_on("flex", type="build")
depends_on("py-cython", when="+rx3d", type="build")
depends_on("gettext")
depends_on("mpi", when="+mpi")
depends_on("ncurses")
depends_on("python@2.7:", when="+python")
depends_on("py-pytest", when="+python+tests")
depends_on("py-mpi4py", when="+mpi+python+tests")
depends_on("readline")
depends_on("caliper", when="+caliper")
depends_on("py-numpy", type='run')
conflicts("+rx3d", when="~python")
patch("patch-v782-git-cmake-avx512.patch", when="@7.8.2")
def cmake_args(self):
spec = self.spec
def cmake_options(spec_options):
value = "TRUE" if spec_options in spec else "FALSE"
cmake_name = spec_options[1:].upper().replace("-", "_")
return "-DNRN_ENABLE_" + cmake_name + ":BOOL=" + value
args = [cmake_options(variant) for variant in ["+coreneuron",
"+interviews",
"+mpi",
"+python",
"+rx3d",
"+coreneuron",
"+tests"]]
args.append("-DNRN_ENABLE_BINARY_SPECIAL=ON")
if "~mpi" in spec and '+coreneuron' in spec:
args.append("-DCORENRN_ENABLE_MPI=OFF")
if "+python" in spec:
args.append("-DPYTHON_EXECUTABLE:FILEPATH="
+ spec["python"].command.path)
if spec.variants['build_type'].value == 'Debug':
args.append("-DCMAKE_C_FLAGS=-g -O0")
args.append("-DCMAKE_CXX_FLAGS=-g -O0")
args.append("-DCMAKE_BUILD_TYPE=Custom")
if "+legacy-unit" in spec:
args.append('-DNRN_DYNAMIC_UNITS_USE_LEGACY=ON')
if "+caliper" in spec:
args.append('-DCORENRN_CALIPER_PROFILING=ON')
return args
@run_after("install")
def filter_compilers(self):
"""run after install to avoid spack compiler wrappers
getting embded into nrnivmodl script"""
spec = self.spec
if "cray" in spec.architecture:
cc_compiler = "cc"
cxx_compiler = "CC"
elif spec.satisfies("+mpi"):
cc_compiler = spec["mpi"].mpicc
cxx_compiler = spec["mpi"].mpicxx
else:
cc_compiler = self.compiler.cc
cxx_compiler = self.compiler.cxx
kwargs = {"backup": False, "string": True}
nrnmech_makefile = join_path(self.prefix,
"./bin/nrnmech_makefile")
# assign_operator is changed to fix wheel support
if self.spec.satisfies("@:7"):
assign_operator = "?="
else:
assign_operator = "="
filter_file("CC {0} {1}".format(assign_operator, env["CC"]),
"CC = {0}".format(cc_compiler),
nrnmech_makefile,
**kwargs)
filter_file("CXX {0} {1}".format(assign_operator, env["CXX"]),
"CXX = {0}".format(cxx_compiler),
nrnmech_makefile,
**kwargs)
if spec.satisfies("+coreneuron"):
corenrn_makefile = join_path(self.prefix,
"share/coreneuron/nrnivmodl_core_makefile")
filter_file(env["CXX"], cxx_compiler, corenrn_makefile, **kwargs)
def setup_run_environment(self, env):
env.prepend_path("PATH", join_path(self.prefix, "bin"))
env.prepend_path("LD_LIBRARY_PATH", join_path(self.prefix, "lib"))
if self.spec.satisfies("+python"):
env.prepend_path("PYTHONPATH", self.spec.prefix.lib.python)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/cpp-termcolor/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 CppTermcolor(CMakePackage):
"""
Termcolor is a header-only C++ library for printing colored messages to the
terminal.
"""
homepage = "https://github.com/ikalnytskyi/termcolor"
url = "https://github.com/ikalnytskyi/termcolor/archive/refs/tags/v2.0.0.tar.gz"
maintainers = ['haampie']
version('2.0.0', sha256='4a73a77053822ca1ed6d4a2af416d31028ec992fb0ffa794af95bd6216bb6a20')
depends_on('cmake@3.0:', type='build')
def cmake_args(self):
return [
self.define('TERMCOLOR_TESTS', 'OFF')
]
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/at-spi2-atk/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 AtSpi2Atk(MesonPackage):
"""The At-Spi2 Atk package contains a library that bridges ATK to
At-Spi2 D-Bus service."""
homepage = "https://www.linuxfromscratch.org/blfs/view/cvs/x/at-spi2-atk.html"
url = "http://ftp.gnome.org/pub/gnome/sources/at-spi2-atk/2.26/at-spi2-atk-2.26.1.tar.xz"
list_url = "http://ftp.gnome.org/pub/gnome/sources/at-spi2-atk"
list_depth = 1
version('2.38.0', sha256='cfa008a5af822b36ae6287f18182c40c91dd699c55faa38605881ed175ca464f')
version('2.34.2', sha256='901323cee0eef05c01ec4dee06c701aeeca81a314a7d60216fa363005e27f4f0')
version('2.26.2', sha256='61891f0abae1689f6617a963105a3f1dcdab5970c4a36ded9c79a7a544b16a6e')
version('2.26.1', sha256='b4f0c27b61dbffba7a5b5ba2ff88c8cee10ff8dac774fa5b79ce906853623b75')
depends_on('pkgconfig', type='build')
depends_on('at-spi2-core@2.28.0:')
depends_on('atk@2.28.1:')
def url_for_version(self, version):
"""Handle gnome's version-based custom URLs."""
url = 'http://ftp.gnome.org/pub/gnome/sources/at-spi2-atk'
return url + '/%s/at-spi2-atk-%s.tar.xz' % (version.up_to(2), version)
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/orbit2/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 Orbit2(AutotoolsPackage):
"""ORBit is a fast and lightweight CORBA server."""
homepage = "https://developer.gnome.org"
url = "https://ftp.gnome.org/pub/GNOME/sources/ORBit2/2.14/ORBit2-2.14.19.tar.bz2"
version('2.14.19', sha256='55c900a905482992730f575f3eef34d50bda717c197c97c08fa5a6eafd857550')
depends_on('pkgconfig', type='build')
depends_on('glib')
depends_on('libidl')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/py-hep-ml/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 PyHepMl(PythonPackage):
"""Machine Learning for High Energy Physics"""
homepage = "https://github.com/arogozhnikov/hep_ml"
pypi = "hep_ml/hep_ml-0.7.0.tar.gz"
version('0.7.0', sha256='0402037064d78f5723106b385ad5f20df8f67cb312c57cb4ce3839c5616f328e')
depends_on('py-setuptools', type='build')
depends_on('py-numpy@1.9:', type=('build', 'run'))
depends_on('py-scipy@0.15.0:', type=('build', 'run'))
depends_on('py-pandas@0.14.0:', type=('build', 'run'))
depends_on('py-scikit-learn@0.19:', type=('build', 'run'))
depends_on('py-theano@1.0.2:', type=('build', 'run'))
depends_on('py-six', type=('build', 'run'))
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/perl-file-slurp/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 PerlFileSlurp(PerlPackage):
"""File::Slurp - Simple and Efficient Reading/Writing/Modifying of Complete
Files"""
homepage = "https://metacpan.org/pod/File::Slurp"
url = "https://cpan.metacpan.org/authors/id/C/CA/CAPOEIRAB/File-Slurp-9999.32.tar.gz"
version('9999.32', sha256='4c3c21992a9d42be3a79dd74a3c83d27d38057269d65509a2f555ea0fb2bc5b0')
|
player1537-forks/spack
|
var/spack/repos/builtin/packages/sblim-sfcc/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 SblimSfcc(AutotoolsPackage):
"""Small Footprint CIM Client Library"""
homepage = "https://sourceforge.net/projects/sblim"
url = "https://github.com/kkaempf/sblim-sfcc/archive/SFCC_2_2_1.tar.gz"
version('2_2_8', sha256='d8d0bf06a487483df507f512ddf0c7b2c1b878a1c9b039bf5c2357c4ba13b882')
version('2_2_7', sha256='bb85bc75efd112411eb76e83a38413a33b3fb8b6b725c8d08fe326efcbea427f')
version('2_2_6', sha256='65a8b70047c449f8b60e519ec1a47aa50b6476d3876a698e8484467650e9ee78')
depends_on('autoconf', type='build')
depends_on('automake', type='build')
depends_on('libtool', type='build')
depends_on('m4', type='build')
depends_on('curl')
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.