summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/preferred_packages.py38
-rw-r--r--lib/spack/spack/spec.py8
-rw-r--r--var/spack/repos/builtin/packages/python/package.py5
3 files changed, 26 insertions, 25 deletions
diff --git a/lib/spack/spack/preferred_packages.py b/lib/spack/spack/preferred_packages.py
index eaea016a85..4ff0f18b31 100644
--- a/lib/spack/spack/preferred_packages.py
+++ b/lib/spack/spack/preferred_packages.py
@@ -33,8 +33,8 @@ class PreferredPackages(object):
self.preferred = spack.config.get_config('packages')
self._spec_for_pkgname_cache = {}
- #Given a package name, sort component (e.g, version, compiler, ...), and
- # a second_key (used by providers), return the list
+ # Given a package name, sort component (e.g, version, compiler, ...), and
+ # a second_key (used by providers), return the list
def _order_for_package(self, pkgname, component, second_key, test_all=True):
pkglist = [pkgname]
if test_all:
@@ -47,10 +47,10 @@ class PreferredPackages(object):
continue
return [str(s).strip() for s in order]
return []
-
- # A generic sorting function. Given a package name and sort
- # component, return less-than-0, 0, or greater-than-0 if
+
+ # A generic sorting function. Given a package name and sort
+ # component, return less-than-0, 0, or greater-than-0 if
# a is respectively less-than, equal to, or greater than b.
def _component_compare(self, pkgname, component, a, b, reverse_natural_compare, second_key):
if a is None:
@@ -76,7 +76,7 @@ class PreferredPackages(object):
cmp_a = orderlist.index(str(a))
cmp_b = orderlist.index(str(b))
reverse = 1
-
+
if cmp_a < cmp_b:
return -1 * reverse
elif cmp_a > cmp_b:
@@ -87,7 +87,7 @@ class PreferredPackages(object):
# A sorting function for specs. Similar to component_compare, but
# a and b are considered to match entries in the sorting list if they
- # satisfy the list component.
+ # satisfy the list component.
def _spec_compare(self, pkgname, component, a, b, reverse_natural_compare, second_key):
if not a or not a.concrete:
return -1
@@ -121,7 +121,7 @@ class PreferredPackages(object):
key = (pkgname, component, second_key)
if not key in self._spec_for_pkgname_cache:
pkglist = self._order_for_package(pkgname, component, second_key)
- if not pkglist:
+ if not pkglist:
if component in self._default_order:
pkglist = self._default_order[component]
if component == 'compiler':
@@ -132,9 +132,9 @@ class PreferredPackages(object):
self._spec_for_pkgname_cache[key] = [spack.spec.Spec(s) for s in pkglist]
return self._spec_for_pkgname_cache[key]
-
+
def provider_compare(self, pkgname, provider_str, a, b):
- """Return less-than-0, 0, or greater than 0 if a is respecively less-than, equal-to, or
+ """Return less-than-0, 0, or greater than 0 if a is respecively less-than, equal-to, or
greater-than b. A and b are possible implementations of provider_str.
One provider is less-than another if it is preferred over the other.
For example, provider_compare('scorep', 'mpi', 'mvapich', 'openmpi') would return -1 if
@@ -148,28 +148,28 @@ class PreferredPackages(object):
def version_compare(self, pkgname, a, b):
- """Return less-than-0, 0, or greater than 0 if version a of pkgname is
- respecively less-than, equal-to, or greater-than version b of pkgname.
+ """Return less-than-0, 0, or greater than 0 if version a of pkgname is
+ respecively less-than, equal-to, or greater-than version b of pkgname.
One version is less-than another if it is preferred over the other."""
return self._spec_compare(pkgname, 'version', a, b, True, None)
-
+
def variant_compare(self, pkgname, a, b):
- """Return less-than-0, 0, or greater than 0 if variant a of pkgname is
- respecively less-than, equal-to, or greater-than variant b of pkgname.
+ """Return less-than-0, 0, or greater than 0 if variant a of pkgname is
+ respecively less-than, equal-to, or greater-than variant b of pkgname.
One variant is less-than another if it is preferred over the other."""
return self._component_compare(pkgname, 'variant', a, b, False, None)
def architecture_compare(self, pkgname, a, b):
- """Return less-than-0, 0, or greater than 0 if architecture a of pkgname is
- respecively less-than, equal-to, or greater-than architecture b of pkgname.
+ """Return less-than-0, 0, or greater than 0 if architecture a of pkgname is
+ respecively less-than, equal-to, or greater-than architecture b of pkgname.
One architecture is less-than another if it is preferred over the other."""
return self._component_compare(pkgname, 'architecture', a, b, False, None)
def compiler_compare(self, pkgname, a, b):
- """Return less-than-0, 0, or greater than 0 if compiler a of pkgname is
- respecively less-than, equal-to, or greater-than compiler b of pkgname.
+ """Return less-than-0, 0, or greater than 0 if compiler a of pkgname is
+ respecively less-than, equal-to, or greater-than compiler b of pkgname.
One compiler is less-than another if it is preferred over the other."""
return self._spec_compare(pkgname, 'compiler', a, b, False, None)
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 6f55065f01..b8c0d0ef9c 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -428,7 +428,7 @@ class Spec(object):
for dep in dep_like:
spec = dep if isinstance(dep, Spec) else Spec(dep)
self._add_dependency(spec)
-
+
#
# Private routines here are called by the parser when building a spec.
@@ -1410,7 +1410,7 @@ class Spec(object):
self.architecture != other.architecture and self.compiler != other.compiler and \
self.variants != other.variants and self._normal != other._normal and \
self.concrete != other.concrete and self.external != other.external)
-
+
# Local node attributes get copied first.
self.name = other.name
self.versions = other.versions.copy()
@@ -1585,7 +1585,7 @@ class Spec(object):
$@ Version with '@' prefix
$% Compiler with '%' prefix
$%@ Compiler with '%' prefix & compiler version with '@' prefix
- $+ Options
+ $+ Options
$= Architecture with '=' prefix
$# 7-char prefix of DAG hash with '-' prefix
$$ $
@@ -1738,7 +1738,7 @@ class Spec(object):
#Package name sort order is not configurable, always goes alphabetical
if self.name != other.name:
return cmp(self.name, other.name)
-
+
#Package version is second in compare order
pkgname = self.name
if self.versions != other.versions:
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index 58d401244e..dd240d1ea0 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -34,8 +34,9 @@ class Python(Package):
env['PYTHONHOME'] = prefix
env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
- # Rest of install is pretty standard except setup.py needs to be able to read the CPPFLAGS
- # and LDFLAGS as it scans for the library and headers to build
+ # Rest of install is pretty standard except setup.py needs to
+ # be able to read the CPPFLAGS and LDFLAGS as it scans for the
+ # library and headers to build
configure_args= [
"--prefix=%s" % prefix,
"--with-threads",