Commit 9dd8f240 authored by Ilias Tsitsimpis's avatar Ilias Tsitsimpis Committed by Christos Stavrakakis

Run setup.py through flake8

parent cb51ce93
......@@ -59,6 +59,7 @@ CLASSIFIERS = []
# Package requirements
INSTALL_REQUIRES = [
"objpool"
]
# Provided as an attribute, so you can append to these instead
......@@ -67,18 +68,21 @@ standard_exclude = ["*.py", "*.pyc", "*$py.class", "*~", ".*", "*.bak"]
standard_exclude_directories = [".*", "CVS", "_darcs", "./build", "./dist",
"EGG-INFO", "*.egg-info"]
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
# (c) 2005 Ian Bicking and contributors;
# written for Paste (http://pythonpaste.org)
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license.php
# Note: you may want to copy this into your setup.py file verbatim, as
# you can't import this from another package, when you don't know if
# that package is installed yet.
def find_package_data(
where=".",
package="",
exclude=standard_exclude,
exclude_directories=standard_exclude_directories,
only_in_packages=True,
show_ignored=False):
where=".",
package="",
exclude=standard_exclude,
exclude_directories=standard_exclude_directories,
only_in_packages=True,
show_ignored=False):
"""
Return a dictionary suitable for use in ``package_data``
in a distutils ``setup.py`` file.
......@@ -114,8 +118,8 @@ def find_package_data(
if os.path.isdir(fn):
bad_name = False
for pattern in exclude_directories:
if (fnmatchcase(name, pattern)
or fn.lower() == pattern.lower()):
if (fnmatchcase(name, pattern) or
fn.lower() == pattern.lower()):
bad_name = True
if show_ignored:
print >> sys.stderr, (
......@@ -125,7 +129,7 @@ def find_package_data(
if bad_name:
continue
if (os.path.isfile(os.path.join(fn, "__init__.py"))
and not prefix):
and not prefix):
if not package:
new_package = name
else:
......@@ -138,8 +142,8 @@ def find_package_data(
# is a file
bad_name = False
for pattern in exclude:
if (fnmatchcase(name, pattern)
or fn.lower() == pattern.lower()):
if (fnmatchcase(name, pattern) or
fn.lower() == pattern.lower()):
bad_name = True
if show_ignored:
print >> sys.stderr, (
......@@ -173,6 +177,5 @@ setup(
install_requires=INSTALL_REQUIRES,
entry_points={
},
entry_points={},
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment