Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 113 lines (94 sloc) 3.074 kb
0bb8b4f @mitsuhiko Beefed up setup.py
authored
1 """
2 Flask
3 -----
4
5 Flask is a microframework for Python based on Werkzeug, Jinja 2 and good
6 intentions. And before you ask: It's BSD licensed!
7
8 Flask is Fun
9 ````````````
10
11 ::
12
13 from flask import Flask
14 app = Flask(__name__)
15
16 @app.route("/")
17 def hello():
18 return "Hello World!"
19
20 if __name__ == "__main__":
21 app.run()
22
23 And Easy to Setup
24 `````````````````
25
26 ::
27
3de8de1 @kennethreitz pip > easy_install
kennethreitz authored
28 $ pip install Flask
0bb8b4f @mitsuhiko Beefed up setup.py
authored
29 $ python hello.py
30 * Running on http://localhost:5000/
31
32 Links
33 `````
34
35 * `website <http://flask.pocoo.org/>`_
36 * `documentation <http://flask.pocoo.org/docs/>`_
3c821a0 @florentx Fix typos and remove unused import.
florentx authored
37 * `development version
38 <http://github.com/mitsuhiko/flask/zipball/master#egg=Flask-dev>`_
0bb8b4f @mitsuhiko Beefed up setup.py
authored
39
40 """
f52f4fd @plaes Added initial version of 'setup.py audit'
plaes authored
41 from setuptools import Command, setup
42
43 class 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 = []
50
51 def initialize_options(self):
d4d6cc8 @plaes Clean up auditing command
plaes authored
52 pass
f52f4fd @plaes Added initial version of 'setup.py audit'
plaes authored
53
54 def finalize_options(self):
55 pass
56
57 def run(self):
58 import os, sys
59 try:
60 import pyflakes.scripts.pyflakes as flakes
61 except ImportError:
35383ee @passy Removed triple-quotes from print statement in setup.py
passy authored
62 print "Audit requires PyFlakes installed in your system."
f52f4fd @plaes Added initial version of 'setup.py audit'
plaes authored
63 sys.exit(-1)
64
65 warns = 0
d4d6cc8 @plaes Clean up auditing command
plaes authored
66 # Define top-level directories
67 dirs = ('flask', 'examples', 'scripts')
f52f4fd @plaes Added initial version of 'setup.py audit'
plaes authored
68 for dir in dirs:
d4d6cc8 @plaes Clean up auditing command
plaes authored
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))
f52f4fd @plaes Added initial version of 'setup.py audit'
plaes authored
73 if warns > 0:
04b90f5 @mitsuhiko Parentheses are for Python3
authored
74 print "Audit finished with total %d warnings." % warns
f52f4fd @plaes Added initial version of 'setup.py audit'
plaes authored
75 else:
04b90f5 @mitsuhiko Parentheses are for Python3
authored
76 print "No problems found in sourcecode."
b15ad39 @mitsuhiko Added setup.py and README
authored
77
78 setup(
79 name='Flask',
b879193 @mitsuhiko Set current dev version number to 0.10
authored
80 version='0.10-dev',
b15ad39 @mitsuhiko Added setup.py and README
authored
81 url='http://github.com/mitsuhiko/flask/',
82 license='BSD',
83 author='Armin Ronacher',
84 author_email='armin.ronacher@active-4.com',
3c821a0 @florentx Fix typos and remove unused import.
florentx authored
85 description='A microframework based on Werkzeug, Jinja2 '
86 'and good intentions',
0bb8b4f @mitsuhiko Beefed up setup.py
authored
87 long_description=__doc__,
d4d7570 @mitsuhiko Added ext to the packages
authored
88 packages=['flask', 'flask.ext', 'flask.testsuite'],
0c75be1 @mitsuhiko Whitespace normalize
authored
89 include_package_data=True,
b15ad39 @mitsuhiko Added setup.py and README
authored
90 zip_safe=False,
91 platforms='any',
1fff3e5 @mitsuhiko Fixed a doc display bug and setup.py workaround for dev version.
authored
92 install_requires=[
b31f2d9 @rduplain Require Werkzeug>=0.7, #449.
rduplain authored
93 'Werkzeug>=0.7',
3f82d1b @mitsuhiko Switch to itsdangerous
authored
94 'Jinja2>=2.4',
fe85970 @mitsuhiko Various improvements in regards to the itsdangerous usage, bumped to …
authored
95 'itsdangerous>=0.17'
0bb8b4f @mitsuhiko Beefed up setup.py
authored
96 ],
97 classifiers=[
b0ab127 @mitsuhiko Added logo with new slogan
authored
98 'Development Status :: 4 - Beta',
0bb8b4f @mitsuhiko Beefed up setup.py
authored
99 'Environment :: Web Environment',
100 'Intended Audience :: Developers',
101 'License :: OSI Approved :: BSD License',
102 'Operating System :: OS Independent',
103 'Programming Language :: Python',
8216e03 @teebes Specifying supported Python versions in setup.py metadata
teebes authored
104 'Programming Language :: Python :: 2.5',
105 'Programming Language :: Python :: 2.6',
106 'Programming Language :: Python :: 2.7',
0bb8b4f @mitsuhiko Beefed up setup.py
authored
107 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
108 'Topic :: Software Development :: Libraries :: Python Modules'
707b307 @mitsuhiko use setup.py test. This fixes #56
authored
109 ],
f52f4fd @plaes Added initial version of 'setup.py audit'
plaes authored
110 cmdclass={'audit': run_audit},
4cb6eea @mitsuhiko Split up testsuite and moved it to flask.testsuite. This fixes #246
authored
111 test_suite='flask.testsuite.suite'
b15ad39 @mitsuhiko Added setup.py and README
authored
112 )
Something went wrong with that request. Please try again.