summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/vim/package.py
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-08-10 01:50:00 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-08-10 16:33:39 -0700
commit240f1fd2239552f37d0f8a8841496414b163ef10 (patch)
tree9bf142e5208ec715ae1ba0a556799276a77b27a6 /var/spack/repos/builtin/packages/vim/package.py
parent867121ca68e436e95fe338b4ca80ab154dd6388a (diff)
downloadspack-240f1fd2239552f37d0f8a8841496414b163ef10.tar.gz
spack-240f1fd2239552f37d0f8a8841496414b163ef10.tar.bz2
spack-240f1fd2239552f37d0f8a8841496414b163ef10.tar.xz
spack-240f1fd2239552f37d0f8a8841496414b163ef10.zip
Spack packages now PEP8 compliant.
Diffstat (limited to 'var/spack/repos/builtin/packages/vim/package.py')
-rw-r--r--var/spack/repos/builtin/packages/vim/package.py83
1 files changed, 43 insertions, 40 deletions
diff --git a/var/spack/repos/builtin/packages/vim/package.py b/var/spack/repos/builtin/packages/vim/package.py
index e0dfb64879..01eccfab57 100644
--- a/var/spack/repos/builtin/packages/vim/package.py
+++ b/var/spack/repos/builtin/packages/vim/package.py
@@ -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'
-
- 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 '+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 '+cscope' in spec:
- configure_args.append("--enable-cscope")
-
- configure("--prefix=%s" % prefix, *configure_args)
-
- make()
- make("install")
+ 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)
+
+ 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 '+gui' in spec:
+ configure_args.append("--enable-gui=auto")
+
+ if '+cscope' in spec:
+ configure_args.append("--enable-cscope")
+
+ configure("--prefix=%s" % prefix, *configure_args)
+
+ make()
+ make("install")