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

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

Merge pull request #667 from maxcountryman/secure-url-forKenneth Reitzbefore adoptionb975dd4

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

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

lines 11–12why, one step back
11Save in a hello.py:
12

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

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

Merge pull request #667 from maxcountryman/secure-url-forKenneth Reitzbefore adoptionb975dd4

lines 14–26why, one step back
14
15 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`````````````````

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

lines 27–28why, one step back
27
28And run it:

Merge pull request #667 from maxcountryman/secure-url-forKenneth Reitzbefore adoptionb975dd4

line 29why, one step back
29

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

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

Merge pull request #667 from maxcountryman/secure-url-forKenneth Reitzbefore adoptionb975dd4

lines 31–44why, one step back
31
32 $ 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"""

Merge branch 'sprint-branch'Armin Ronacherbefore adoption29e63e0

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

Merge pull request #667 from maxcountryman/secure-url-forKenneth Reitzbefore adoptionb975dd4

lines 46–47why, one step back
46from setuptools import Command, setup
47

Depend on click nowArmin Ronacherbefore adoption0ac492a

line 48why, one step back
48

Merge pull request #667 from maxcountryman/secure-url-forKenneth Reitzbefore adoptionb975dd4

lines 49–63why, one step back
49class 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):

Depend on click nowArmin Ronacherbefore adoption0ac492a

lines 64–65why, one step back
64 import os
65 import sys

Merge pull request #667 from maxcountryman/secure-url-forKenneth Reitzbefore adoptionb975dd4

lines 66–68why, one step back
66 try:
67 import pyflakes.scripts.pyflakes as flakes68 except ImportError:

Merge branch 'sprint-branch'Armin Ronacherbefore adoption29e63e0

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

Merge pull request #667 from maxcountryman/secure-url-forKenneth Reitzbefore adoptionb975dd4

lines 70–77why, one step back
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:

Depend on click nowArmin Ronacherbefore adoption0ac492a

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

Merge pull request #667 from maxcountryman/secure-url-forKenneth Reitzbefore adoptionb975dd4

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

Merge branch 'sprint-branch'Armin Ronacherbefore adoption29e63e0

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

Merge pull request #667 from maxcountryman/secure-url-forKenneth Reitzbefore adoptionb975dd4

line 82why, one step back
82 else:

Merge branch 'sprint-branch'Armin Ronacherbefore adoption29e63e0

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

Merge pull request #667 from maxcountryman/secure-url-forKenneth Reitzbefore adoptionb975dd4

lines 84–86why, one step back
84
85setup(86 name='Flask',

Master is 0.11-devArmin Ronacherbefore adoption977e766

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

Merge pull request #667 from maxcountryman/secure-url-forKenneth Reitzbefore adoptionb975dd4

lines 88–101why, one step back
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',

Depend on click nowArmin Ronacherbefore adoption0ac492a

line 102why, one step back
102 'itsdangerous>=0.21',

Greatly refactored click integration and documented it a bit more.Armin Ronacherbefore adoption3569fc2

line 103why, one step back
103 'click>=0.6',

Merge pull request #667 from maxcountryman/secure-url-forKenneth Reitzbefore adoptionb975dd4

lines 104–111why, one step back
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',

Merge branch '0.10-maintenance'Armin Ronacherbefore adoption89731d8

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

Merge pull request #667 from maxcountryman/secure-url-forKenneth Reitzbefore adoptionb975dd4

lines 113–115why, one step back
113 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
114 'Topic :: Software Development :: Libraries :: Python Modules'115 ],

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

lines 116–117why, one step back
116 entry_points='''
117 [console_scripts]

Depend on click nowArmin Ronacherbefore adoption0ac492a

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

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

line 119why, one step back
119 ''',

Merge pull request #667 from maxcountryman/secure-url-forKenneth Reitzbefore adoptionb975dd4

lines 120–122why, one step back
120 cmdclass={'audit': run_audit},
121 test_suite='flask.testsuite.suite'122)