Spack packages now PEP8 compliant.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class Vim(Package):
|
||||
"""Vim is a highly configurable text editor built to enable efficient text
|
||||
editing. It is an improved version of the vi editor distributed with most
|
||||
@@ -51,7 +52,7 @@ class Vim(Package):
|
||||
|
||||
feature_sets = ('huge', 'big', 'normal', 'small', 'tiny')
|
||||
for fs in feature_sets:
|
||||
variant(fs, default=False, description="Use '%s' feature set" % fs)
|
||||
variant(fs, default=False, description="Use '%s' feature set" % fs)
|
||||
|
||||
variant('python', default=False, description="build with Python")
|
||||
depends_on('python', when='+python')
|
||||
@@ -66,42 +67,44 @@ class Vim(Package):
|
||||
# virtual dependency?
|
||||
|
||||
def install(self, spec, prefix):
|
||||
feature_set = None
|
||||
for fs in self.feature_sets:
|
||||
if "+" + fs in spec:
|
||||
if feature_set is not None:
|
||||
tty.error("Only one feature set allowed, both %s and %s specified"
|
||||
% (feature_set, fs))
|
||||
feature_set = fs
|
||||
if '+gui' in spec:
|
||||
if feature_set is not None:
|
||||
if feature_set is not 'huge':
|
||||
tty.error("+gui variant requires 'huge' feature set, %s was specified"
|
||||
% feature_set)
|
||||
feature_set = 'huge'
|
||||
if feature_set is None:
|
||||
feature_set = 'normal'
|
||||
feature_set = None
|
||||
for fs in self.feature_sets:
|
||||
if "+" + fs in spec:
|
||||
if feature_set is not None:
|
||||
tty.error(
|
||||
"Only one feature set allowed, specified %s and %s"
|
||||
% (feature_set, fs))
|
||||
feature_set = fs
|
||||
if '+gui' in spec:
|
||||
if feature_set is not None:
|
||||
if feature_set is not 'huge':
|
||||
tty.error(
|
||||
"+gui variant requires 'huge' feature set, "
|
||||
"%s was specified" % feature_set)
|
||||
feature_set = 'huge'
|
||||
if feature_set is None:
|
||||
feature_set = 'normal'
|
||||
|
||||
configure_args = []
|
||||
configure_args.append("--with-features=" + feature_set)
|
||||
configure_args = []
|
||||
configure_args.append("--with-features=" + feature_set)
|
||||
|
||||
if '+python' in spec:
|
||||
configure_args.append("--enable-pythoninterp=yes")
|
||||
else:
|
||||
configure_args.append("--enable-pythoninterp=dynamic")
|
||||
if '+python' in spec:
|
||||
configure_args.append("--enable-pythoninterp=yes")
|
||||
else:
|
||||
configure_args.append("--enable-pythoninterp=dynamic")
|
||||
|
||||
if '+ruby' in spec:
|
||||
configure_args.append("--enable-rubyinterp=yes")
|
||||
else:
|
||||
configure_args.append("--enable-rubyinterp=dynamic")
|
||||
if '+ruby' in spec:
|
||||
configure_args.append("--enable-rubyinterp=yes")
|
||||
else:
|
||||
configure_args.append("--enable-rubyinterp=dynamic")
|
||||
|
||||
if '+gui' in spec:
|
||||
configure_args.append("--enable-gui=auto")
|
||||
if '+gui' in spec:
|
||||
configure_args.append("--enable-gui=auto")
|
||||
|
||||
if '+cscope' in spec:
|
||||
configure_args.append("--enable-cscope")
|
||||
if '+cscope' in spec:
|
||||
configure_args.append("--enable-cscope")
|
||||
|
||||
configure("--prefix=%s" % prefix, *configure_args)
|
||||
configure("--prefix=%s" % prefix, *configure_args)
|
||||
|
||||
make()
|
||||
make("install")
|
||||
make()
|
||||
make("install")
|
||||
|
Reference in New Issue
Block a user