Skip to content
Myr

setup.py

This file

Path

setup.py

122 lines · 3.1 KiB · Python

Last changed by

Updated setup.py a bit. This fixes #1018Armin Ronacherbefore adoption2639a23

History of this file

Take it

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````````````1011Save in a hello.py:1213.. code:: python1415    from flask import Flask16    app = Flask(__name__)1718    @app.route("/")19    def hello():20        return "Hello World!"2122    if __name__ == "__main__":23        app.run()2425And Easy to Setup26`````````````````2728And run it:2930.. code:: bash3132    $ pip install Flask33    $ python hello.py34     * Running on http://localhost:5000/3536Links37`````3839* `website <http://flask.pocoo.org/>`_40* `documentation <http://flask.pocoo.org/docs/>`_41* `development version42  <http://github.com/mitsuhiko/flask/zipball/master#egg=Flask-dev>`_4344"""45from __future__ import print_function46from setuptools import Command, setup474849class run_audit(Command):50    """Audits source code using PyFlakes for following issues:51        - Names which are used but not defined or used before they are defined.52        - Names which are redefined without having been used.53    """54    description = "Audit source code with PyFlakes"55    user_options = []5657    def initialize_options(self):58        pass5960    def finalize_options(self):61        pass6263    def run(self):64        import os65        import sys66        try:67            import pyflakes.scripts.pyflakes as flakes68        except ImportError:69            print("Audit requires PyFlakes installed in your system.")70            sys.exit(-1)7172        warns = 073        # Define top-level directories74        dirs = ('flask', 'examples', 'scripts')75        for dir in dirs:76            for root, _, files in os.walk(dir):77                for file in files:78                    if file != '__init__.py' and file.endswith('.py'):79                        warns += flakes.checkPath(os.path.join(root, file))80        if warns > 0:81            print("Audit finished with total %d warnings." % warns)82        else:83            print("No problems found in sourcecode.")8485setup(86    name='Flask',87    version='0.11-dev',88    url='http://github.com/mitsuhiko/flask/',89    license='BSD',90    author='Armin Ronacher',91    author_email='armin.ronacher@active-4.com',92    description='A microframework based on Werkzeug, Jinja2 '93                'and good intentions',94    long_description=__doc__,95    packages=['flask', 'flask.ext', 'flask.testsuite'],96    include_package_data=True,97    zip_safe=False,98    platforms='any',99    install_requires=[100        'Werkzeug>=0.7',101        'Jinja2>=2.4',102        'itsdangerous>=0.21',103        'click>=0.6',104    ],105    classifiers=[106        'Development Status :: 4 - Beta',107        'Environment :: Web Environment',108        'Intended Audience :: Developers',109        'License :: OSI Approved :: BSD License',110        'Operating System :: OS Independent',111        'Programming Language :: Python',112        'Programming Language :: Python :: 3',113        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',114        'Topic :: Software Development :: Libraries :: Python Modules'115    ],116    entry_points='''117        [console_scripts]118        flask=flask.cli:main119    ''',120    cmdclass={'audit': run_audit},121    test_suite='flask.testsuite.suite'122)