setup.py
This file
Path
setup.py
113 lines · 3.0 KiB · Python
Last changed by
require 'six' in setup.py, add flask._compat for stuff not yet in 'six'Thomas Waldmannbefore adoption1b753cb
History of this fileTake it
The walk stopped after 200 commits: lines older than 7f4c12b point at it.
Break up a circular dependency on shutdownArmin Ronacherbefore adoption7f4c12b
lines 1–10why, 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````````````10Merge branch 'master' of github.com:mitsuhiko/flaskArmin Ronacherbefore adoption30d9efb
line 11why, one step back11.. code:: pythonBreak up a circular dependency on shutdownArmin Ronacherbefore adoption7f4c12b
lines 12–25why, one step back1213 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`````````````````25Merge branch 'master' of github.com:mitsuhiko/flaskArmin Ronacherbefore adoption30d9efb
line 26why, one step back26.. code:: bashBreak up a circular dependency on shutdownArmin Ronacherbefore adoption7f4c12b
line 27why, one step back27pip > easy_installKenneth Reitzbefore adoption3de8de1
line 28why, one step back28 $ pip install FlaskBreak up a circular dependency on shutdownArmin Ronacherbefore adoption7f4c12b
lines 29–61why, one step back29 $ 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"""41from setuptools import Command, setup4243class 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 = []5051 def initialize_options(self):52 pass5354 def finalize_options(self):55 pass5657 def run(self):58 import os, sys59 try:60 import pyflakes.scripts.pyflakes as flakes61 except ImportError:Merge branch 'master' of github.com:mitsuhiko/flaskArmin Ronacherbefore adoption3249eeb
line 62why, one step back62 print "Audit requires PyFlakes installed in your system."Break up a circular dependency on shutdownArmin Ronacherbefore adoption7f4c12b
lines 63–79why, one step back63 sys.exit(-1)6465 warns = 066 # Define top-level directories67 dirs = ('flask', 'examples', 'scripts')68 for dir in dirs:69 for root, _, files in os.walk(dir):70 for file in files:71 if file != '__init__.py' and file.endswith('.py') :72 warns += flakes.checkPath(os.path.join(root, file))73 if warns > 0:74 print "Audit finished with total %d warnings." % warns75 else:76 print "No problems found in sourcecode."7778setup(79 name='Flask',Merge branch 'master' of github.com:mitsuhiko/flaskArmin Ronacherbefore adoption7fc0ddb
line 80why, one step back80 version='0.10-dev',Break up a circular dependency on shutdownArmin Ronacherbefore adoption7f4c12b
lines 81–92why, one step back81 url='http://github.com/mitsuhiko/flask/',82 license='BSD',83 author='Armin Ronacher',84 author_email='armin.ronacher@active-4.com',85 description='A microframework based on Werkzeug, Jinja2 '86 'and good intentions',87 long_description=__doc__,88 packages=['flask', 'flask.ext', 'flask.testsuite'],89 include_package_data=True,90 zip_safe=False,91 platforms='any',92 install_requires=[require 'six' in setup.py, add flask._compat for stuff not yet in 'six'Thomas Waldmannbefore adoption1b753cb
line 93why, one step back93 'six>=1.3.0',Require Werkzeug>=0.7, #449.Ron DuPlainbefore adoptionb31f2d9
line 94why, one step back94 'Werkzeug>=0.7',Merge branch 'json-sessions'Armin Ronacherbefore adoptione1a5761
lines 95–96why, one step back95 'Jinja2>=2.4',96 'itsdangerous>=0.17'Break up a circular dependency on shutdownArmin Ronacherbefore adoption7f4c12b
lines 97–104why, one step back97 ],98 classifiers=[99 'Development Status :: 4 - Beta',100 'Environment :: Web Environment',101 'Intended Audience :: Developers',102 'License :: OSI Approved :: BSD License',103 'Operating System :: OS Independent',104 'Programming Language :: Python',Merge branch 'master' of github.com:mitsuhiko/flaskArmin Ronacherbefore adoption3249eeb
lines 105–107why, one step back105 'Programming Language :: Python :: 2.5',106 'Programming Language :: Python :: 2.6',107 'Programming Language :: Python :: 2.7',Break up a circular dependency on shutdownArmin Ronacherbefore adoption7f4c12b
lines 108–113why, one step back108 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',109 'Topic :: Software Development :: Libraries :: Python Modules'110 ],111 cmdclass={'audit': run_audit},112 test_suite='flask.testsuite.suite'113)