Skip to content
Myr

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

1 file+14 added−18 removed

modified:docs/installation.rst+14 added-18 removed
7 unmodified lines
8way and why there are multiple ways.910Flask depends on two external libraries: `Werkzeug11<http://werkzeug.pocoo.org/>`_ and `Jinja2 <http://jinja.pocoo.org/2/>`_.12The first one is responsible for interfacing WSGI the latter for rendering12The first on is responsible for interfacing WSGI the latter to render13templates. Now you are maybe asking, what is WSGI? WSGI is a standard14in Python that is basically responsible for ensuring that your application15is behaving in a specific way so that you can run it on different15is behaving in a specific way that you can run it on different16environments (for example on a local development server, on an Apache2, on17lighttpd, on Google's App Engine or whatever you have in mind).1819So how do you get all that on your computer in no time? The most kick-ass
5 unmodified lines
25Virtualenv is what you want to use during development and in production if26you have shell access. So first: what does virtualenv do? If you are27like me and you like Python, chances are you want to use it for another28project as well. Now the more projects you have, the more likely it is29that you will be working with different versions of Python itself or at30least an individual library. Because let's face it: quite often libraries 31break backwards compatibility and it's unlikely that your application will32not have any dependencies, that just won't happen. So virtualenv to the29that you will be working with different versions of Python itself or a30library involved. Because let's face it: quite often libraries break31backwards compatibility and it's unlikely that your application will32not have any dependencies, that just won't happen. So virtualenv for the33rescue!3435It basically makes it possible to have multiple side-by-side36"installations" of Python, each for your own project. It's not actually
9 unmodified lines
46or even better::4748 $ sudo pip install virtualenv4950Chances are you have virtualenv installed on your system then. Maybe it's50Changes are you have virtualenv installed on your system then. Maybe it's51even in your package manager (on ubuntu try ``sudo apt-get install52python-virtualenv``).5354If you are on Windows and missing the `easy_install` command you have to
13 unmodified lines
6869Now you only have to activate it, whenever you work with it. On OS X and70Linux do the following::7172 $ . env/bin/activate72 $ source env/bin/activate7374(Note the whitespace between the dot and the script name. This means75execute this file in context of the shell. If the dot does not work for76whatever reason in your shell, try substituting it with ``source``)7774If you are a Windows user, the following command is for you::7576 $ env\scripts\activate77
18 unmodified lines
9697(Run it in an Admin shell on Windows systems and without the `sudo`).9899104Living on the Edge105------------------100Leaving on the Edge101-------------------102103You want to work with the latest version of Flask, there are two ways: you104can either let `easy_install` pull in the development version or tell it105to operate on a git checkout. Either way it's recommended to do that in a
4 unmodified lines
110 $ 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 lines
126127 $ 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 lines
147Once you have done that it's important to add the `easy_install` command148and other Python scripts to the path. To do that you have to add the149Python installation's Script folder to the `PATH` variable.150155To do that, right-click on your "Computer" desktop icon and click151To do that, click right on your "Computer" desktop icon and click152"Properties". On Windows Vista and Windows 7 then click on "Advanced System153settings", on Windows XP click on the "Advanced" tab instead. Then click154on the "Environment variables" button and double click on the "Path"155variable in the "System variables" section.
4 unmodified lines
160the following value::161162 ;C:\Python26\Scripts163168Then you are done. To check that it worked, open the cmd and execute164Then 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 admin166privileges.167168
1 unmodified line