Skip to content
Myr

setup.py

This file

Path

setup.py

118 lines · 3.1 KiB · Python

Last changed by

Depend on click nowArmin Ronacherbefore adoption0ac492a

History of this file

Take it

The walk stopped after 200 commits: lines older than 301e244 point at it.

Consistent use of encoding namingArmin Ronacherbefore adoption301e244

lines 1–10why, one step back
1"""
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````````````10

Merge branch 'master' of github.com:mitsuhiko/flaskArmin Ronacherbefore adoption30d9efb

line 11why, one step back
11.. code:: python

Consistent use of encoding namingArmin Ronacherbefore adoption301e244

lines 12–25why, one step back
12
13 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`````````````````25

Merge branch 'master' of github.com:mitsuhiko/flaskArmin Ronacherbefore adoption30d9efb

line 26why, one step back
26.. code:: bash

Consistent use of encoding namingArmin Ronacherbefore adoption301e244

lines 27–40why, one step back
27
28 $ pip 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"""

Merge branch 'sprint-branch'Armin Ronacherbefore adoption29e63e0

line 41why, one step back
41from __future__ import print_function

Consistent use of encoding namingArmin Ronacherbefore adoption301e244

lines 42–43why, one step back
42from setuptools import Command, setup
43

Depend on click nowArmin Ronacherbefore adoption0ac492a

line 44why, one step back
44

Consistent use of encoding namingArmin Ronacherbefore adoption301e244

lines 45–59why, one step back
45class run_audit(Command):
46 """Audits source code using PyFlakes for following issues:47 - Names which are used but not defined or used before they are defined.48 - Names which are redefined without having been used.49 """50 description = "Audit source code with PyFlakes"51 user_options = []5253 def initialize_options(self):54 pass5556 def finalize_options(self):57 pass5859 def run(self):

Depend on click nowArmin Ronacherbefore adoption0ac492a

lines 60–61why, one step back
60 import os
61 import sys

Consistent use of encoding namingArmin Ronacherbefore adoption301e244

lines 62–64why, one step back
62 try:
63 import pyflakes.scripts.pyflakes as flakes64 except ImportError:

Merge branch 'sprint-branch'Armin Ronacherbefore adoption29e63e0

line 65why, one step back
65 print("Audit requires PyFlakes installed in your system.")

Consistent use of encoding namingArmin Ronacherbefore adoption301e244

lines 66–73why, one step back
66 sys.exit(-1)
6768 warns = 069 # Define top-level directories70 dirs = ('flask', 'examples', 'scripts')71 for dir in dirs:72 for root, _, files in os.walk(dir):73 for file in files:

Depend on click nowArmin Ronacherbefore adoption0ac492a

line 74why, one step back
74 if file != '__init__.py' and file.endswith('.py'):

Consistent use of encoding namingArmin Ronacherbefore adoption301e244

lines 75–76why, one step back
75 warns += flakes.checkPath(os.path.join(root, file))
76 if warns > 0:

Merge branch 'sprint-branch'Armin Ronacherbefore adoption29e63e0

line 77why, one step back
77 print("Audit finished with total %d warnings." % warns)

Consistent use of encoding namingArmin Ronacherbefore adoption301e244

line 78why, one step back
78 else:

Merge branch 'sprint-branch'Armin Ronacherbefore adoption29e63e0

line 79why, one step back
79 print("No problems found in sourcecode.")

Consistent use of encoding namingArmin Ronacherbefore adoption301e244

lines 80–82why, one step back
80
81setup(82 name='Flask',

Master is 0.11-devArmin Ronacherbefore adoption977e766

line 83why, one step back
83 version='0.11-dev',

Consistent use of encoding namingArmin Ronacherbefore adoption301e244

lines 84–97why, one step back
84 url='http://github.com/mitsuhiko/flask/',
85 license='BSD',86 author='Armin Ronacher',87 author_email='armin.ronacher@active-4.com',88 description='A microframework based on Werkzeug, Jinja2 '89 'and good intentions',90 long_description=__doc__,91 packages=['flask', 'flask.ext', 'flask.testsuite'],92 include_package_data=True,93 zip_safe=False,94 platforms='any',95 install_requires=[96 'Werkzeug>=0.7',97 'Jinja2>=2.4',

Depend on click nowArmin Ronacherbefore adoption0ac492a

lines 98–99why, one step back
98 'itsdangerous>=0.21',
99 'click',

Consistent use of encoding namingArmin Ronacherbefore adoption301e244

lines 100–107why, one step back
100 ],
101 classifiers=[102 'Development Status :: 4 - Beta',103 'Environment :: Web Environment',104 'Intended Audience :: Developers',105 'License :: OSI Approved :: BSD License',106 'Operating System :: OS Independent',107 'Programming Language :: Python',

Merge branch '0.10-maintenance'Armin Ronacherbefore adoption89731d8

line 108why, one step back
108 'Programming Language :: Python :: 3',

Consistent use of encoding namingArmin Ronacherbefore adoption301e244

lines 109–111why, one step back
109 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
110 'Topic :: Software Development :: Libraries :: Python Modules'111 ],

Added the new flask run module to start the server.Armin Ronacherbefore adoption7503bde

lines 112–113why, one step back
112 entry_points='''
113 [console_scripts]

Depend on click nowArmin Ronacherbefore adoption0ac492a

line 114why, one step back
114 flask=flask.cli:main

Added the new flask run module to start the server.Armin Ronacherbefore adoption7503bde

line 115why, one step back
115 ''',

Consistent use of encoding namingArmin Ronacherbefore adoption301e244

lines 116–118why, one step back
116 cmdclass={'audit': run_audit},
117 test_suite='flask.testsuite.suite'118)