flask/setup.py

113 lines
3.0 KiB
Python
Raw Normal View History

2010-04-16 20:24:12 +08:00
"""
Flask
-----
Flask is a microframework for Python based on Werkzeug, Jinja 2 and good
intentions. And before you ask: It's BSD licensed!
Flask is Fun
````````````
::
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run()
And Easy to Setup
`````````````````
::
2012-02-07 09:19:32 +08:00
$ pip install Flask
2010-04-16 20:24:12 +08:00
$ python hello.py
* Running on http://localhost:5000/
Links
`````
* `website <http://flask.pocoo.org/>`_
* `documentation <http://flask.pocoo.org/docs/>`_
2010-04-21 00:40:58 +08:00
* `development version
<http://github.com/mitsuhiko/flask/zipball/master#egg=Flask-dev>`_
2010-04-16 20:24:12 +08:00
"""
from setuptools import Command, setup
class run_audit(Command):
"""Audits source code using PyFlakes for following issues:
- Names which are used but not defined or used before they are defined.
- Names which are redefined without having been used.
"""
description = "Audit source code with PyFlakes"
user_options = []
def initialize_options(self):
2011-09-18 18:05:15 +08:00
pass
def finalize_options(self):
pass
def run(self):
import os, sys
try:
import pyflakes.scripts.pyflakes as flakes
except ImportError:
print "Audit requires PyFlakes installed in your system."
sys.exit(-1)
warns = 0
2011-09-18 18:05:15 +08:00
# Define top-level directories
dirs = ('flask', 'examples', 'scripts')
for dir in dirs:
2011-09-18 18:05:15 +08:00
for root, _, files in os.walk(dir):
for file in files:
if file != '__init__.py' and file.endswith('.py') :
warns += flakes.checkPath(os.path.join(root, file))
if warns > 0:
2011-09-27 20:36:06 +08:00
print "Audit finished with total %d warnings." % warns
else:
2011-09-27 20:36:06 +08:00
print "No problems found in sourcecode."
2010-04-06 19:23:18 +08:00
setup(
name='Flask',
2012-08-11 09:37:03 +08:00
version='0.10-dev',
2010-04-06 19:23:18 +08:00
url='http://github.com/mitsuhiko/flask/',
license='BSD',
author='Armin Ronacher',
author_email='armin.ronacher@active-4.com',
2010-04-21 00:40:58 +08:00
description='A microframework based on Werkzeug, Jinja2 '
'and good intentions',
2010-04-16 20:24:12 +08:00
long_description=__doc__,
2011-09-22 20:08:52 +08:00
packages=['flask', 'flask.ext', 'flask.testsuite'],
2011-09-22 20:08:03 +08:00
include_package_data=True,
2010-04-06 19:23:18 +08:00
zip_safe=False,
platforms='any',
install_requires=[
2012-04-24 09:46:53 +08:00
'Werkzeug>=0.7',
2012-08-11 10:09:14 +08:00
'Jinja2>=2.4',
'itsdangerous>=0.17'
2010-04-16 20:24:12 +08:00
],
classifiers=[
2010-05-12 07:29:25 +08:00
'Development Status :: 4 - Beta',
2010-04-16 20:24:12 +08:00
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
2010-04-16 20:24:12 +08:00
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
2010-05-31 23:53:10 +08:00
],
cmdclass={'audit': run_audit},
test_suite='flask.testsuite.suite'
2010-04-06 19:23:18 +08:00
)