Spack packages now PEP8 compliant.

This commit is contained in:
Todd Gamblin
2016-08-10 01:50:00 -07:00
parent 867121ca68
commit 240f1fd223
381 changed files with 2457 additions and 1617 deletions

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class A(Package):
"""Simple package with no dependencies"""

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class B(Package):
"""Simple package with no dependencies"""

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class C(Package):
"""Simple package with no dependencies"""

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class Callpath(Package):
homepage = "https://github.com/tgamblin/callpath"
url = "http://github.com/tgamblin/callpath-1.0.tar.gz"

View File

@@ -25,6 +25,7 @@
from spack import *
import os
def check(condition, msg):
"""Raise an install error if condition is False."""
if not condition:
@@ -40,15 +41,14 @@ class CmakeClient(Package):
depends_on('cmake', type='build')
def setup_environment(self, spack_env, run_env):
spack_cc # Ensure spack module-scope variable is avaiabl
check(from_cmake == "from_cmake",
"setup_environment couldn't read global set by cmake.")
check(self.spec['cmake'].link_arg == "test link arg",
"link arg on dependency spec not readable from setup_environment.")
"link arg on dependency spec not readable from "
"setup_environment.")
def setup_dependent_environment(self, spack_env, run_env, dspec):
spack_cc # Ensure spack module-scope variable is avaiable
@@ -56,8 +56,8 @@ def setup_dependent_environment(self, spack_env, run_env, dspec):
"setup_dependent_environment couldn't read global set by cmake.")
check(self.spec['cmake'].link_arg == "test link arg",
"link arg on dependency spec not readable from setup_dependent_environment.")
"link arg on dependency spec not readable from "
"setup_dependent_environment.")
def setup_dependent_package(self, module, dspec):
spack_cc # Ensure spack module-scope variable is avaiable
@@ -65,9 +65,8 @@ def setup_dependent_package(self, module, dspec):
"setup_dependent_package couldn't read global set by cmake.")
check(self.spec['cmake'].link_arg == "test link arg",
"link arg on dependency spec not readable from setup_dependent_package.")
"link arg on dependency spec not readable from "
"setup_dependent_package.")
def install(self, spec, prefix):
# check that cmake is in the global scope.

View File

@@ -25,6 +25,7 @@
from spack import *
import os
def check(condition, msg):
"""Raise an install error if condition is False."""
if not condition:
@@ -39,7 +40,6 @@ class Cmake(Package):
version('3.4.3', '4cb3ff35b2472aae70f542116d616e63',
url='https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz')
def setup_environment(self, spack_env, run_env):
spack_cc # Ensure spack module-scope variable is avaiable
spack_env.set('for_install', 'for_install')
@@ -48,7 +48,6 @@ def setup_dependent_environment(self, spack_env, run_env, dspec):
spack_cc # Ensure spack module-scope variable is avaiable
spack_env.set('from_cmake', 'from_cmake')
def setup_dependent_package(self, module, dspec):
spack_cc # Ensure spack module-scope variable is avaiable
@@ -57,7 +56,6 @@ def setup_dependent_package(self, module, dspec):
self.spec.link_arg = "test link arg"
def install(self, spec, prefix):
mkdirp(prefix.bin)

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class DirectMpich(Package):
homepage = "http://www.example.com"
url = "http://www.example.com/direct_mpich-1.0.tar.gz"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class Dyninst(Package):
homepage = "https://paradyn.org"
url = "http://www.paradyn.org/release8.1/DyninstAPI-8.1.1.tgz"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class E(Package):
"""Simple package with no dependencies"""

View File

@@ -25,6 +25,7 @@
##############################################################################
from spack import *
class Externalmodule(Package):
homepage = "http://somewhere.com"
url = "http://somewhere.com/module-1.0.tar.gz"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class Externalprereq(Package):
homepage = "http://somewhere.com"
url = "http://somewhere.com/prereq-1.0.tar.gz"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class Externaltest(Package):
homepage = "http://somewhere.com"
url = "http://somewhere.com/test-1.0.tar.gz"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class Externaltool(Package):
homepage = "http://somewhere.com"
url = "http://somewhere.com/tool-1.0.tar.gz"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class Externalvirtual(Package):
homepage = "http://somewhere.com"
url = "http://somewhere.com/stuff-1.0.tar.gz"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class Fake(Package):
homepage = "http://www.fake-spack-example.org"
url = "http://www.fake-spack-example.org/downloads/fake-1.0.tar.gz"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class GitTest(Package):
"""Mock package that uses git for fetching."""
homepage = "http://www.git-fetch-example.com"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class HgTest(Package):
"""Test package that does fetching with mercurial."""
homepage = "http://www.hg-fetch-example.com"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class Hypre(Package):
"""Hypre is included here as an example of a package that depends on
both LAPACK and BLAS."""

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class IndirectMpich(Package):
"""Test case for a package that depends on MPI and one of its
dependencies requires a *particular version* of MPI.

View File

@@ -23,11 +23,11 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
import os
# Only build certain parts of dwarf because the other ones break.
dwarf_dirs = ['libdwarf', 'dwarfdump2']
class Libdwarf(Package):
homepage = "http://www.prevanders.net/dwarf.html"
url = "http://www.prevanders.net/libdwarf-20130729.tar.gz"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class Libelf(Package):
homepage = "http://www.mr511.de/software/english.html"
url = "http://www.mr511.de/software/libelf-0.8.13.tar.gz"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class Mpich(Package):
homepage = "http://www.mpich.org"
url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class Mpich2(Package):
homepage = "http://www.mpich.org"
url = "http://www.mpich.org/static/downloads/1.5/mpich2-1.5.tar.gz"

View File

@@ -22,12 +22,10 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import imp
from llnl.util.filesystem import join_path
from spack.util.naming import mod_to_class
from spack import *
import spack.architecture
class Multimethod(Package):
"""This package is designed for use with Spack's multimethod test.
It has a bunch of test cases for the @when decorator that the
@@ -52,7 +50,6 @@ def no_version_2(self):
def no_version_2(self):
return 4
#
# These functions overlap, so there is ambiguity, but we'll take
# the first one.
@@ -65,7 +62,6 @@ def version_overlap(self):
def version_overlap(self):
return 2
#
# More complicated case with cascading versions.
#
@@ -84,7 +80,6 @@ def mpi_version(self):
def mpi_version(self):
return 1
#
# Use these to test whether the default method is called when no
# match is found. This also tests whether we can switch methods
@@ -101,8 +96,6 @@ def has_a_default(self):
def has_a_default(self):
return 'intel'
#
# Make sure we can switch methods on different target
#
@@ -112,15 +105,16 @@ def has_a_default(self):
targets = targets[:-1]
for target in targets:
@when('target='+target.name)
@when('target=' + target.name)
def different_by_target(self):
if isinstance(self.spec.architecture.target,basestring):
if isinstance(self.spec.architecture.target, basestring):
return self.spec.architecture.target
else:
return self.spec.architecture.target.name
#
# Make sure we can switch methods on different dependencies
#
@when('^mpich')
def different_by_dep(self):
return 'mpich'
@@ -129,7 +123,6 @@ def different_by_dep(self):
def different_by_dep(self):
return 'zmpi'
#
# Make sure we can switch on virtual dependencies
#

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class NetlibBlas(Package):
homepage = "http://www.netlib.org/lapack/"
url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class NetlibLapack(Package):
homepage = "http://www.netlib.org/lapack/"
url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class OpenblasWithLapack(Package):
"""Dummy version of OpenBLAS that also provides LAPACK, for testing."""
homepage = "http://www.openblas.net"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class Openblas(Package):
"""OpenBLAS: An optimized BLAS library"""
homepage = "http://www.openblas.net"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class OptionalDepTest2(Package):
"""Depends on the optional-dep-test package"""

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class OptionalDepTest3(Package):
"""Depends on the optional-dep-test package"""

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class OptionalDepTest(Package):
"""Description"""

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class Python(Package):
"""Dummy Python package to demonstrate preferred versions."""
homepage = "http://www.python.org"
@@ -40,4 +41,3 @@ class Python(Package):
def install(self, spec, prefix):
pass

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class SvnTest(Package):
"""Mock package that uses svn for fetching."""
url = "http://www.example.com/svn-test-1.0.tar.gz"

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class TrivialInstallTestPackage(Package):
"""This package is a stub with a trivial install method. It allows us
to test the install and uninstall logic of spack."""

View File

@@ -24,6 +24,7 @@
##############################################################################
from spack import *
class Zmpi(Package):
"""This is a fake MPI package used to demonstrate virtual package providers
with dependencies."""