summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2016-10-05 12:00:31 -0500
committerTodd Gamblin <tgamblin@llnl.gov>2016-10-05 10:00:31 -0700
commitd5e5e4ed1aef6ade3ddef34c4ad7a57988fd8d74 (patch)
tree5d4faa19ffcb0fd9d7eb01e54554c9dd1ecb0207
parentac3e21f8d4be5786761b5009690e09f6ec564c79 (diff)
downloadspack-d5e5e4ed1aef6ade3ddef34c4ad7a57988fd8d74.tar.gz
spack-d5e5e4ed1aef6ade3ddef34c4ad7a57988fd8d74.tar.bz2
spack-d5e5e4ed1aef6ade3ddef34c4ad7a57988fd8d74.tar.xz
spack-d5e5e4ed1aef6ade3ddef34c4ad7a57988fd8d74.zip
Add missing dependencies for Flake8 (#1883)
* Warn user if flake8 can't find setuptools * Add missing dependencies of flake8 * Updates to py-autopep8, make packages activateable * Check for presence of setuptools for Sphinx too * Fix bug in order of commands
-rwxr-xr-xshare/spack/qa/check_dependencies26
-rwxr-xr-xshare/spack/qa/run-flake8-tests8
-rw-r--r--var/spack/repos/builtin/packages/py-autopep8/package.py47
-rw-r--r--var/spack/repos/builtin/packages/py-configparser/package.py46
-rw-r--r--var/spack/repos/builtin/packages/py-enum34/package.py45
-rw-r--r--var/spack/repos/builtin/packages/py-flake8/package.py39
-rw-r--r--var/spack/repos/builtin/packages/py-mccabe/package.py53
-rw-r--r--var/spack/repos/builtin/packages/py-ordereddict/package.py41
-rw-r--r--var/spack/repos/builtin/packages/py-pep8/package.py15
-rw-r--r--var/spack/repos/builtin/packages/py-pycodestyle/package.py52
-rw-r--r--var/spack/repos/builtin/packages/py-pyflakes/package.py52
11 files changed, 394 insertions, 30 deletions
diff --git a/share/spack/qa/check_dependencies b/share/spack/qa/check_dependencies
index cf3d204f48..e999463b03 100755
--- a/share/spack/qa/check_dependencies
+++ b/share/spack/qa/check_dependencies
@@ -65,6 +65,32 @@ for dep in "$@"; do
exit 1
fi
+
+ # Flake8 and Sphinx require setuptools in order to run.
+ # Otherwise, they print out this error message:
+ #
+ # Traceback (most recent call last):
+ # File: "/usr/bin/flake8", line 5, in <module>
+ # from pkg_resources import load_entry_point
+ # ImportError: No module named pkg_resources
+ #
+ # Print a more useful error message if setuptools not found.
+ if [[ $dep == flake8 || $dep == sphinx* ]]; then
+ # Find which Python is being run
+ # Spack-installed packages have a hard-coded shebang
+ python_cmd=$(head -n 1 $(which $dep) | cut -c 3-)
+ # May not have a shebang
+ if [[ $python_cmd != *python* ]]; then
+ python_cmd=python
+ fi
+ # Check if setuptools is in the PYTHONPATH
+ if ! $python_cmd -c "import setuptools" 2> /dev/null; then
+ echo "ERROR: setuptools is required to run $dep."
+ echo "Please add it to your PYTHONPATH."
+
+ exit 1
+ fi
+ fi
done
echo "Dependencies found."
diff --git a/share/spack/qa/run-flake8-tests b/share/spack/qa/run-flake8-tests
index 350ef3161f..6fe97160e3 100755
--- a/share/spack/qa/run-flake8-tests
+++ b/share/spack/qa/run-flake8-tests
@@ -23,10 +23,6 @@ deps=(
# Check for dependencies
"$QA_DIR/check_dependencies" "${deps[@]}" || exit 1
-# Move to root directory of Spack
-# Allows script to be run from anywhere
-cd "$SPACK_ROOT"
-
# Gather array of changed files
changed=($("$QA_DIR/changed_files" "*.py"))
@@ -36,6 +32,10 @@ if [[ ! "${changed[@]}" ]]; then
exit 0
fi
+# Move to root directory of Spack
+# Allows script to be run from anywhere
+cd "$SPACK_ROOT"
+
function cleanup {
# Restore original package files after modifying them.
for file in "${changed[@]}"; do
diff --git a/var/spack/repos/builtin/packages/py-autopep8/package.py b/var/spack/repos/builtin/packages/py-autopep8/package.py
index f6c08e2728..6d093f32f6 100644
--- a/var/spack/repos/builtin/packages/py-autopep8/package.py
+++ b/var/spack/repos/builtin/packages/py-autopep8/package.py
@@ -1,16 +1,53 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
from spack import *
class PyAutopep8(Package):
- """Automatic pep8 formatter"""
+ """autopep8 automatically formats Python code to conform to the
+ PEP 8 style guide."""
+
homepage = "https://github.com/hhatto/autopep8"
- url = "https://github.com/hhatto/autopep8/archive/ver1.2.2.tar.gz"
+ url = "https://github.com/hhatto/autopep8/archive/v1.2.4.tar.gz"
+ version('1.2.4', '0458db85159a9e1b45f3e71ce6c158da')
version('1.2.2', 'def3d023fc9dfd1b7113602e965ad8e1')
- extends('python')
+ extends('python', ignore='bin/pep8')
+ depends_on('python@2.6:2.7,3.2:')
+
+ depends_on('py-pycodestyle@1.5.7:1.7.0', type=nolink)
+
depends_on('py-setuptools', type='build')
- depends_on('py-pep8', type=nolink)
+
+ def url_for_version(self, version):
+ url = "https://github.com/hhatto/autopep8/archive/{0}{1}.tar.gz"
+ if version >= Version('1.2.3'):
+ return url.format('v', version)
+ else:
+ return url.format('ver', version)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-configparser/package.py b/var/spack/repos/builtin/packages/py-configparser/package.py
new file mode 100644
index 0000000000..1ad4ed619e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-configparser/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyConfigparser(Package):
+ """This library brings the updated configparser from Python 3.5 to
+ Python 2.6-3.5."""
+
+ homepage = "https://pypi.python.org/pypi/configparser"
+ url = "https://pypi.python.org/packages/source/c/configparser/configparser-3.5.0.tar.gz"
+
+ version('3.5.0', 'cfdd915a5b7a6c09917a64a573140538',
+ url="https://pypi.python.org/packages/7c/69/c2ce7e91c89dc073eb1aa74c0621c3eefbffe8216b3f9af9d3885265c01c/configparser-3.5.0.tar.gz")
+
+ extends('python')
+ depends_on('python@2.6:2.7,3.4:')
+
+ depends_on('py-ordereddict', when='^python@2.6:2.6.999', type=nolink)
+
+ depends_on('py-setuptools', type='build')
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-enum34/package.py b/var/spack/repos/builtin/packages/py-enum34/package.py
new file mode 100644
index 0000000000..2f294bac12
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-enum34/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyEnum34(Package):
+ """Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4."""
+
+ homepage = "https://pypi.python.org/pypi/enum34"
+ url = "https://pypi.python.org/packages/source/e/enum34/enum34-1.1.6.tar.gz"
+
+ version('1.1.6', '5f13a0841a61f7fc295c514490d120d0',
+ url="https://pypi.python.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz")
+
+ extends('python')
+ depends_on('python@2.4:2.8,3.3:')
+
+ depends_on('py-ordereddict', when='^python@:2.6.999', type=nolink)
+
+ depends_on('py-setuptools', type='build')
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-flake8/package.py b/var/spack/repos/builtin/packages/py-flake8/package.py
index 2fabe03d66..8bb36bc02f 100644
--- a/var/spack/repos/builtin/packages/py-flake8/package.py
+++ b/var/spack/repos/builtin/packages/py-flake8/package.py
@@ -28,13 +28,40 @@ from spack import *
class PyFlake8(Package):
"""Flake8 is a wrapper around PyFlakes, pep8 and Ned Batchelder's
McCabe script."""
- homepage = "http://flake8.readthedocs.io/en/latest/"
- url = "https://pypi.python.org/packages/source/f/flake8/flake8-2.5.4.tar.gz"
- version('2.5.4', 'a4585b3569b95c3f66acb8294a7f06ef')
+ homepage = "https://github.com/PyCQA/flake8"
+ url = "https://github.com/PyCQA/flake8/archive/3.0.4.tar.gz"
- extends('python')
- depends_on('py-setuptools', type='build')
+ version('3.0.4', 'cf2a7d8c92070f7b62253404ffb54df7')
+ version('2.5.4', '366dd1de6c300254c830b81e66979f06')
+
+ extends('python', ignore='bin/(pyflakes|pycodestyle)')
+ depends_on('python@2.7:2.8,3.4:')
+
+ # Most Python packages only require py-setuptools as a build dependency.
+ # However, py-flake8 requires py-setuptools during runtime as well.
+ depends_on('py-setuptools', type=nolink)
+
+ # pyflakes >= 0.8.1, != 1.2.0, != 1.2.1, != 1.2.2, < 1.3.0
+ depends_on('py-pyflakes@0.8.1:1.1.0,1.2.3:1.2.3', when='@3.0.4', type=nolink) # noqa
+ # pyflakes >= 0.8.1, < 1.1
+ depends_on('py-pyflakes@0.8.1:1.0.0', when='@2.5.4', type=nolink)
+
+ # pycodestyle >= 2.0.0, < 2.1.0
+ depends_on('py-pycodestyle@2.0.0:2.0.999', when='@3.0.4', type=nolink)
+ # pep8 >= 1.5.7, != 1.6.0, != 1.6.1, != 1.6.2
+ depends_on('py-pycodestyle@1.5.7,1.7.0:', when='@2.5.4', type=nolink)
+
+ # mccabe >= 0.5.0, < 0.6.0
+ depends_on('py-mccabe@0.5.0:0.5.999', when='@3.0.4', type=nolink)
+ # mccabe >= 0.2.1, < 0.5
+ depends_on('py-mccabe@0.2.1:0.4.0', when='@2.5.4', type=nolink)
+
+ depends_on('py-configparser', when='^python@:3.3.999', type=nolink)
+ depends_on('py-enum34', when='^python@:3.1.999', type=nolink)
+
+ # TODO: Add test dependencies
+ # depends_on('py-nose', type='test')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-mccabe/package.py b/var/spack/repos/builtin/packages/py-mccabe/package.py
new file mode 100644
index 0000000000..ec913acb16
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-mccabe/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyMccabe(Package):
+ """Ned's script to check McCabe complexity."""
+
+ homepage = "https://github.com/PyCQA/mccabe"
+ url = "https://github.com/PyCQA/mccabe/archive/0.5.2.tar.gz"
+
+ version('0.5.2', '3cdf2d7faa1464b18905fe9a7063a632')
+ version('0.5.1', '864b364829156701bec797712be8ece0')
+ version('0.5.0', '71c0ce5e5c4676753525154f6c5d3af8')
+ version('0.4.0', '9cf5712e5f1785aaa27273a4328babe4')
+ version('0.3.1', '45c48c0978e6fc1f31fedcb918178abb')
+ version('0.3', 'c583f58ea28be12842c001473d77504d')
+ version('0.2.1', 'fcba311ebd999f48359a8ab28da94b30')
+ version('0.2', '36d4808c37e187dbb1fe2373a0ac6645')
+ version('0.1', '3c9e8e72612a9c01d865630cc569150a')
+
+ extends('python')
+ depends_on('python@2.7:2.8,3.3:')
+
+ depends_on('py-setuptools', type='build')
+
+ # TODO: Add test dependencies
+ # depends_on('py-pytest', type='test')
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-ordereddict/package.py b/var/spack/repos/builtin/packages/py-ordereddict/package.py
new file mode 100644
index 0000000000..6e038b789c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-ordereddict/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyOrdereddict(Package):
+ """A drop-in substitute for Py2.7's new collections.
+ OrderedDict that works in Python 2.4-2.6."""
+
+ homepage = "https://pypi.python.org/pypi/ordereddict"
+ url = "https://pypi.python.org/packages/source/o/ordereddict/ordereddict-1.1.tar.gz"
+
+ version('1.1', 'a0ed854ee442051b249bfad0f638bbec')
+
+ extends('python')
+ depends_on('python@2.4:2.6.999')
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-pep8/package.py b/var/spack/repos/builtin/packages/py-pep8/package.py
deleted file mode 100644
index 87d1da9ab0..0000000000
--- a/var/spack/repos/builtin/packages/py-pep8/package.py
+++ /dev/null
@@ -1,15 +0,0 @@
-from spack import *
-
-
-class PyPep8(Package):
- """python pep8 format checker"""
- homepage = "https://github.com/PyCQA/pycodestyle"
- url = "https://github.com/PyCQA/pycodestyle/archive/1.7.0.tar.gz"
-
- version('1.7.0', '31070a3a6391928893cbf5fa523eb8d9')
-
- extends('python')
- depends_on('py-setuptools', type='build')
-
- def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pycodestyle/package.py b/var/spack/repos/builtin/packages/py-pycodestyle/package.py
new file mode 100644
index 0000000000..964822aac9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pycodestyle/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyPycodestyle(Package):
+ """pycodestyle is a tool to check your Python code against some of the
+ style conventions in PEP 8. Note: formerly called pep8."""
+
+ homepage = "https://github.com/PyCQA/pycodestyle"
+ url = "https://github.com/PyCQA/pycodestyle/archive/2.0.0.tar.gz"
+
+ version('2.0.0', '5c3e90001f538bf3b7896d60e92eb6f6')
+ version('1.7.0', '31070a3a6391928893cbf5fa523eb8d9')
+ version('1.6.2', '8df18246d82ddd3d19ffe7518f983955')
+ version('1.6.1', '9d59bdc7c60f46f7cee86c732e28aa1a')
+ version('1.6', '340fa7e39bb44fb08db6eddf7cdc880a')
+ version('1.5.7', '6d0f5fc7d95755999bc9275cad5cbf3e')
+ version('1.5.6', 'c5c30e3d267b48bf3dfe7568e803a813')
+ version('1.5.5', 'cfa12df9b86b3a1dfb13aced1927e12f')
+ version('1.5.4', '3977a760829652543544074c684610ee')
+
+ extends('python')
+
+ # Most Python packages only require py-setuptools as a build dependency.
+ # However, py-pycodestyle requires py-setuptools during runtime as well.
+ depends_on('py-setuptools', type=nolink)
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-pyflakes/package.py b/var/spack/repos/builtin/packages/py-pyflakes/package.py
new file mode 100644
index 0000000000..50bc8ab462
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyflakes/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyPyflakes(Package):
+ """A simple program which checks Python source files for errors.."""
+
+ homepage = "https://github.com/PyCQA/pyflakes"
+ url = "https://github.com/PyCQA/pyflakes/archive/1.3.0.tar.gz"
+
+ version('1.3.0', 'a76173deb7a84fe860c0b60e2fbcdfe2')
+ version('1.2.3', '2ac2e148a5c46b6bb06c4785be76f7cc')
+ version('1.2.2', 'fe759b9381a6500e67a2ddbbeb5161a4')
+ version('1.2.1', '444a06b256e0a70e41c11698b7190e84')
+ version('1.2.0', '5d1c87bf09696c4c35dc3103f2a1185c')
+ version('1.1.0', '4e18bf78c0455ebcd41e5d6104392c88')
+ version('1.0.0', 'e2ea22a825c5100f12e54b71771cde71')
+ version('0.9.2', 'd02d5f68e944085fd6ec163a34737a96')
+ version('0.9.1', '8108d2248e93ca6a315fa2dd31ee9bb1')
+ version('0.9.0', '43c2bcee88606bde55dbf25a253ef886')
+
+ extends('python')
+
+ # Most Python packages only require py-setuptools as a build dependency.
+ # However, py-pyflakes requires py-setuptools during runtime as well.
+ depends_on('py-setuptools', type=nolink)
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))