Merge branch 'develop' of github.com:scalability-llnl/spack into develop

This commit is contained in:
Todd Gamblin 2015-07-14 23:43:59 -07:00
commit 2e90599283
5 changed files with 70 additions and 3 deletions

View File

@ -56,11 +56,16 @@ def spack_python_files(self):
yield os.path.join(root, filename)
def test_python_versions(self):
def all_package_py_files(self):
for name in spack.db.all_package_names():
yield spack.db.filename_for_package_name(name)
def check_python_versions(self, files):
# dict version -> filename -> reasons
all_issues = {}
for fn in self.spack_python_files():
for fn in files:
with open(fn) as pyfile:
versions = pyqver2.get_versions(pyfile.read())
for ver, reasons in versions.items():
@ -93,3 +98,11 @@ def test_python_versions(self):
print fmt % msg
self.assertTrue(len(all_issues) == 0)
def test_core_module_compatibility(self):
self.check_python_versions(self.spack_python_files())
def test_package_module_compatibility(self):
self.check_python_versions(self.all_package_py_files())

View File

@ -0,0 +1,14 @@
from spack import *
class ExuberantCtags(Package):
"""The canonical ctags generator"""
homepage = "ctags.sourceforge.net"
url = "http://downloads.sourceforge.net/project/ctags/ctags/5.8/ctags-5.8.tar.gz"
version('5.8', 'c00f82ecdcc357434731913e5b48630d')
def install(self, spec, prefix):
configure('--prefix=%s' % prefix)
make()
make("install")

View File

@ -0,0 +1,24 @@
from spack import *
import os
class Global(Package):
""" The Gnu Global tagging system """
# FIXME: add a proper url for your package's homepage here.
homepage = "http://www.gnu.org/software/global"
url = "http://tamacom.com/global/global-6.5.tar.gz"
version('6.5', 'dfec818b4f53d91721e247cf7b218078')
depends_on('exuberant-ctags')
def install(self, spec, prefix):
config_args = ['--prefix={}'.format(prefix)]
config_args.append('--with-exuberant-ctags={}'.format(
os.path.join(spec['exuberant-ctags'].prefix.bin, 'ctags')))
configure(*config_args)
make()
make("install")

View File

@ -0,0 +1,15 @@
from spack import *
class PyYapf(Package):
""" Yet Another Python Formatter """
homepage = "https://github.com/google/yapf"
# base https://pypi.python.org/pypi/cffi
url = "https://github.com/google/yapf/archive/v0.2.1.tar.gz"
version('0.2.1', '348ccf86cf2057872e4451b204fb914c')
extends('python')
depends_on('py-setuptools')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)

View File

@ -27,7 +27,8 @@ class Vim(Package):
feature_sets = ('huge', 'big', 'normal', 'small', 'tiny')
for fs in feature_sets:
variant(fs, default=False, description="Use '{}' feature set".format(fs))
print fs
variant(fs, default=False, description="Use '%s' feature set" % fs)
variant('python', default=False, description="build with Python")
depends_on('python', when='+python')