Merge more upstream changes
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by cgrinds · committed by Armin Ronacher · parent 9cf2ea2 · Browse files · 1 file·+14 added−18 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+14 added−18 removed
- other:+14 added−18 removed
Provenance
- Commit
5876a8f- Tree
1d35d35- Author
cgrinds <cgrinds@gmail.com>- Committer
Armin Ronacher <armin.ronacher@active-4.com>- Parent
9cf2ea2
1 file changed+14 added−18 removed
modified:docs/installation.rst+14 added-18 removed
7 unmodified lines8 way and why there are multiple ways.9 10 Flask depends on two external libraries: `Werkzeug11 <http://werkzeug.pocoo.org/>`_ and `Jinja2 <http://jinja.pocoo.org/2/>`_.12-The first one is responsible for interfacing WSGI the latter for rendering12+The first on is responsible for interfacing WSGI the latter to render13 templates. Now you are maybe asking, what is WSGI? WSGI is a standard14 in Python that is basically responsible for ensuring that your application15-is behaving in a specific way so that you can run it on different15+is behaving in a specific way that you can run it on different16 environments (for example on a local development server, on an Apache2, on17 lighttpd, on Google's App Engine or whatever you have in mind).18 19 So how do you get all that on your computer in no time? The most kick-ass5 unmodified lines25 Virtualenv is what you want to use during development and in production if26 you have shell access. So first: what does virtualenv do? If you are27 like me and you like Python, chances are you want to use it for another28 project as well. Now the more projects you have, the more likely it is29-that you will be working with different versions of Python itself or at30-least an individual library. Because let's face it: quite often libraries 31-break backwards compatibility and it's unlikely that your application will32-not have any dependencies, that just won't happen. So virtualenv to the29+that you will be working with different versions of Python itself or a30+library involved. Because let's face it: quite often libraries break31+backwards compatibility and it's unlikely that your application will32+not have any dependencies, that just won't happen. So virtualenv for the33 rescue!34 35 It basically makes it possible to have multiple side-by-side36 "installations" of Python, each for your own project. It's not actually9 unmodified lines46 or even better::47 48 $ sudo pip install virtualenv49 50-Chances are you have virtualenv installed on your system then. Maybe it's50+Changes are you have virtualenv installed on your system then. Maybe it's51 even in your package manager (on ubuntu try ``sudo apt-get install52 python-virtualenv``).53 54 If you are on Windows and missing the `easy_install` command you have to13 unmodified lines68 69 Now you only have to activate it, whenever you work with it. On OS X and70 Linux do the following::71 72- $ . env/bin/activate72+ $ source env/bin/activate73 74-(Note the whitespace between the dot and the script name. This means75-execute this file in context of the shell. If the dot does not work for76-whatever reason in your shell, try substituting it with ``source``)77-74 If you are a Windows user, the following command is for you::75 76 $ env\scripts\activate77 18 unmodified lines96 97 (Run it in an Admin shell on Windows systems and without the `sudo`).98 99 104-Living on the Edge105-------------------100+Leaving on the Edge101+-------------------102 103 You want to work with the latest version of Flask, there are two ways: you104 can either let `easy_install` pull in the development version or tell it105 to operate on a git checkout. Either way it's recommended to do that in a4 unmodified lines110 $ git clone http://github.com/mitsuhiko/flask.git111 Initialized empty Git repository in ~/dev/flask/.git/112 $ cd flask113 $ virtualenv env118- $ . env/bin/activate114+ $ source env/bin/activate115 New python executable in env/bin/python116 Installing setuptools............done.117 $ python setup.py develop118 ...7 unmodified lines126 127 $ mkdir flask128 $ cd flask129 $ virtualenv env134- $ . env/bin/activate130+ $ source env/bin/activate131 New python executable in env/bin/python132 Installing setuptools............done.133 $ easy_install Flask==dev134 ...12 unmodified lines147 Once you have done that it's important to add the `easy_install` command148 and other Python scripts to the path. To do that you have to add the149 Python installation's Script folder to the `PATH` variable.150 155-To do that, right-click on your "Computer" desktop icon and click151+To do that, click right on your "Computer" desktop icon and click152 "Properties". On Windows Vista and Windows 7 then click on "Advanced System153 settings", on Windows XP click on the "Advanced" tab instead. Then click154 on the "Environment variables" button and double click on the "Path"155 variable in the "System variables" section.4 unmodified lines160 the following value::161 162 ;C:\Python26\Scripts163 168-Then you are done. To check that it worked, open the cmd and execute164+Then you are done. To check if it worked, open the cmd and execute165 "easy_install". If you have UAC enabled it should prompt you for admin166 privileges.167 168 1 unmodified line