setup.py
This file
Path
setup.py
116 lines · 3.0 KiB · Python
Last changed by
Added initial version of 'setup.py audit'Priit Laesbefore adoptionf52f4fd
History of this fileTake it
The walk stopped after 200 commits: lines older than 7599046 point at it.
Started working on refactoring Jinja integrationArmin Ronacherbefore adoption7599046
lines 1–40why, one step back1"""2Flask3-----45Flask is a microframework for Python based on Werkzeug, Jinja 2 and good6intentions. And before you ask: It's BSD licensed!78Flask is Fun9````````````1011::1213 from flask import Flask14 app = Flask(__name__)1516 @app.route("/")17 def hello():18 return "Hello World!"1920 if __name__ == "__main__":21 app.run()2223And Easy to Setup24`````````````````2526::2728 $ easy_install Flask29 $ python hello.py30 * Running on http://localhost:5000/3132Links33`````3435* `website <http://flask.pocoo.org/>`_36* `documentation <http://flask.pocoo.org/docs/>`_37* `development version38 <http://github.com/mitsuhiko/flask/zipball/master#egg=Flask-dev>`_3940"""Added initial version of 'setup.py audit'Priit Laesbefore adoptionf52f4fd
line 41why, one step back41from setuptools import Command, setupStarted working on refactoring Jinja integrationArmin Ronacherbefore adoption7599046
line 42why, one step back42Added initial version of 'setup.py audit'Priit Laesbefore adoptionf52f4fd
lines 43–49why, one step back43class run_audit(Command):44 """Audits source code using PyFlakes for following issues:45 - Names which are used but not defined or used before they are defined.46 - Names which are redefined without having been used.47 """48 description = "Audit source code with PyFlakes"49 user_options = []Started working on refactoring Jinja integrationArmin Ronacherbefore adoption7599046
line 50why, one step back50Added initial version of 'setup.py audit'Priit Laesbefore adoptionf52f4fd
lines 51–79why, one step back51 def initialize_options(self):52 all = None5354 def finalize_options(self):55 pass5657 def run(self):58 import os, sys59 try:60 import pyflakes.scripts.pyflakes as flakes61 except ImportError:62 print "Audit requires PyFlakes installed in your system."""63 sys.exit(-1)6465 dirs = ['flask', 'tests']66 # Add example directories67 for dir in ['flaskr', 'jqueryexample', 'minitwit']:68 dirs.append(os.path.join('examples', dir))69 # TODO: Add test subdirectories70 warns = 071 for dir in dirs:72 for filename in os.listdir(dir):73 if filename.endswith('.py') and filename != '__init__.py':74 warns += flakes.checkPath(os.path.join(dir, filename))75 if warns > 0:76 print ("Audit finished with total %d warnings." % warns)77 else:78 print ("No problems found in sourcecode.")79Started working on refactoring Jinja integrationArmin Ronacherbefore adoption7599046
lines 80–88why, one step back80def run_tests():81 import os, sys82 sys.path.append(os.path.join(os.path.dirname(__file__), 'tests'))83 from flask_tests import suite84 return suite()858687setup(88 name='Flask',HEAD is 0.7-devArmin Ronacherbefore adoption16b101e
line 89why, one step back89 version='0.7',Started working on refactoring Jinja integrationArmin Ronacherbefore adoption7599046
lines 90–96why, one step back90 url='http://github.com/mitsuhiko/flask/',91 license='BSD',92 author='Armin Ronacher',93 author_email='armin.ronacher@active-4.com',94 description='A microframework based on Werkzeug, Jinja2 '95 'and good intentions',96 long_description=__doc__,Added missing comments, fixed setup.py and made tests passArmin Ronacherbefore adoption4f8ee8f
line 97why, one step back97 packages=['flask'],Started working on refactoring Jinja integrationArmin Ronacherbefore adoption7599046
lines 98–113why, one step back98 zip_safe=False,99 platforms='any',100 install_requires=[101 'Werkzeug>=0.6.1',102 'Jinja2>=2.4'103 ],104 classifiers=[105 'Development Status :: 4 - Beta',106 'Environment :: Web Environment',107 'Intended Audience :: Developers',108 'License :: OSI Approved :: BSD License',109 'Operating System :: OS Independent',110 'Programming Language :: Python',111 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',112 'Topic :: Software Development :: Libraries :: Python Modules'113 ],Added initial version of 'setup.py audit'Priit Laesbefore adoptionf52f4fd
line 114why, one step back114 cmdclass={'audit': run_audit},Started working on refactoring Jinja integrationArmin Ronacherbefore adoption7599046
lines 115–116why, one step back115 test_suite='__main__.run_tests'116)