Browse Source

Depend on click now

pull/1039/head
Armin Ronacher 11 years ago
parent
commit
0ac492a0ac
  1. 11
      setup.py

11
setup.py

@ -41,6 +41,7 @@ Links
from __future__ import print_function from __future__ import print_function
from setuptools import Command, setup from setuptools import Command, setup
class run_audit(Command): class run_audit(Command):
"""Audits source code using PyFlakes for following issues: """Audits source code using PyFlakes for following issues:
- Names which are used but not defined or used before they are defined. - Names which are used but not defined or used before they are defined.
@ -56,7 +57,8 @@ class run_audit(Command):
pass pass
def run(self): def run(self):
import os, sys import os
import sys
try: try:
import pyflakes.scripts.pyflakes as flakes import pyflakes.scripts.pyflakes as flakes
except ImportError: except ImportError:
@ -69,7 +71,7 @@ class run_audit(Command):
for dir in dirs: for dir in dirs:
for root, _, files in os.walk(dir): for root, _, files in os.walk(dir):
for file in files: for file in files:
if file != '__init__.py' and file.endswith('.py') : if file != '__init__.py' and file.endswith('.py'):
warns += flakes.checkPath(os.path.join(root, file)) warns += flakes.checkPath(os.path.join(root, file))
if warns > 0: if warns > 0:
print("Audit finished with total %d warnings." % warns) print("Audit finished with total %d warnings." % warns)
@ -93,7 +95,8 @@ setup(
install_requires=[ install_requires=[
'Werkzeug>=0.7', 'Werkzeug>=0.7',
'Jinja2>=2.4', 'Jinja2>=2.4',
'itsdangerous>=0.21' 'itsdangerous>=0.21',
'click',
], ],
classifiers=[ classifiers=[
'Development Status :: 4 - Beta', 'Development Status :: 4 - Beta',
@ -108,7 +111,7 @@ setup(
], ],
entry_points=''' entry_points='''
[console_scripts] [console_scripts]
flask-run=flask.run:main flask=flask.cli:main
''', ''',
cmdclass={'audit': run_audit}, cmdclass={'audit': run_audit},
test_suite='flask.testsuite.suite' test_suite='flask.testsuite.suite'

Loading…
Cancel
Save