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

Run setup.py through flake8

parent cb51ce93
...@@ -59,6 +59,7 @@ CLASSIFIERS = [] ...@@ -59,6 +59,7 @@ CLASSIFIERS = []
# Package requirements # Package requirements
INSTALL_REQUIRES = [ INSTALL_REQUIRES = [
"objpool"
] ]
# Provided as an attribute, so you can append to these instead # Provided as an attribute, so you can append to these instead
...@@ -67,18 +68,21 @@ standard_exclude = ["*.py", "*.pyc", "*$py.class", "*~", ".*", "*.bak"] ...@@ -67,18 +68,21 @@ standard_exclude = ["*.py", "*.pyc", "*$py.class", "*~", ".*", "*.bak"]
standard_exclude_directories = [".*", "CVS", "_darcs", "./build", "./dist", standard_exclude_directories = [".*", "CVS", "_darcs", "./build", "./dist",
"EGG-INFO", "*.egg-info"] "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 # 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 # you can't import this from another package, when you don't know if
# that package is installed yet. # that package is installed yet.
def find_package_data( def find_package_data(
where=".", where=".",
package="", package="",
exclude=standard_exclude, exclude=standard_exclude,
exclude_directories=standard_exclude_directories, exclude_directories=standard_exclude_directories,
only_in_packages=True, only_in_packages=True,
show_ignored=False): show_ignored=False):
""" """
Return a dictionary suitable for use in ``package_data`` Return a dictionary suitable for use in ``package_data``
in a distutils ``setup.py`` file. in a distutils ``setup.py`` file.
...@@ -114,8 +118,8 @@ def find_package_data( ...@@ -114,8 +118,8 @@ def find_package_data(
if os.path.isdir(fn): if os.path.isdir(fn):
bad_name = False bad_name = False
for pattern in exclude_directories: for pattern in exclude_directories:
if (fnmatchcase(name, pattern) if (fnmatchcase(name, pattern) or
or fn.lower() == pattern.lower()): fn.lower() == pattern.lower()):
bad_name = True bad_name = True
if show_ignored: if show_ignored:
print >> sys.stderr, ( print >> sys.stderr, (
...@@ -125,7 +129,7 @@ def find_package_data( ...@@ -125,7 +129,7 @@ def find_package_data(
if bad_name: if bad_name:
continue continue
if (os.path.isfile(os.path.join(fn, "__init__.py")) if (os.path.isfile(os.path.join(fn, "__init__.py"))
and not prefix): and not prefix):
if not package: if not package:
new_package = name new_package = name
else: else:
...@@ -138,8 +142,8 @@ def find_package_data( ...@@ -138,8 +142,8 @@ def find_package_data(
# is a file # is a file
bad_name = False bad_name = False
for pattern in exclude: for pattern in exclude:
if (fnmatchcase(name, pattern) if (fnmatchcase(name, pattern) or
or fn.lower() == pattern.lower()): fn.lower() == pattern.lower()):
bad_name = True bad_name = True
if show_ignored: if show_ignored:
print >> sys.stderr, ( print >> sys.stderr, (
...@@ -173,6 +177,5 @@ setup( ...@@ -173,6 +177,5 @@ setup(
install_requires=INSTALL_REQUIRES, 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