diff options
author | Sebastian Silva <sebastian@sugarlabs.org> | 2011-11-16 07:56:19 (GMT) |
---|---|---|
committer | Sebastian Silva <sebastian@sugarlabs.org> | 2011-11-16 07:56:19 (GMT) |
commit | 82511a6fe2d29d50c1cdca4b2abb23ff681a1943 (patch) | |
tree | ff6359d68287417abfaaf49e492e2630239e60c9 /studio/static/doc/flask-docs/installation.html | |
parent | 61517139f02df2ce417f465dfabdbf5dbe8f4063 (diff) |
Major improvements in IDE usability.
Diffstat (limited to 'studio/static/doc/flask-docs/installation.html')
-rw-r--r-- | studio/static/doc/flask-docs/installation.html | 249 |
1 files changed, 0 insertions, 249 deletions
diff --git a/studio/static/doc/flask-docs/installation.html b/studio/static/doc/flask-docs/installation.html deleted file mode 100644 index bdb5661..0000000 --- a/studio/static/doc/flask-docs/installation.html +++ /dev/null @@ -1,249 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Installation — Flask 0.8 documentation</title> - - <link rel="stylesheet" href="_static/flasky.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '0.8', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <link rel="top" title="Flask 0.8 documentation" href="index.html" /> - <link rel="next" title="Quickstart" href="quickstart.html" /> - <link rel="prev" title="Foreword" href="foreword.html" /> - - - <link rel="apple-touch-icon" href="_static/touch-icon.png" /> - - <link media="only screen and (max-device-width: 480px)" href="_static/small_flask.css" type= "text/css" rel="stylesheet" /> - - </head> - <body> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="quickstart.html" title="Quickstart" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="foreword.html" title="Foreword" - accesskey="P">previous</a> |</li> - <li><a href="index.html">Flask 0.8 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="installation"> -<span id="id1"></span><h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1> -<p>Flask depends on two external libraries, <a class="reference external" href="http://werkzeug.pocoo.org/">Werkzeug</a> and <a class="reference external" href="http://jinja.pocoo.org/2/">Jinja2</a>. -Werkzeug is a toolkit for WSGI, the standard Python interface between web -applications and a variety of servers for both development and deployment. -Jinja2 renders templates.</p> -<p>So how do you get all that on your computer quickly? There are many ways -which this section will explain, but the most kick-ass method is -virtualenv, so let’s look at that first.</p> -<p>Either way, you will need Python 2.5 or higher to get started, so be sure -to have an up to date Python 2.x installation. At the time of writing, -the WSGI specification is not yet finalized for Python 3, so Flask cannot -support the 3.x series of Python.</p> -<div class="section" id="virtualenv"> -<span id="id2"></span><h2>virtualenv<a class="headerlink" href="#virtualenv" title="Permalink to this headline">¶</a></h2> -<p>Virtualenv is probably what you want to use during development, and in -production too if you have shell access there.</p> -<p>What problem does virtualenv solve? If you like Python as I do, -chances are you want to use it for other projects besides Flask-based -web applications. But the more projects you have, the more likely it is -that you will be working with different versions of Python itself, or at -least different versions of Python libraries. Let’s face it; quite often -libraries break backwards compatibility, and it’s unlikely that any serious -application will have zero dependencies. So what do you do if two or more -of your projects have conflicting dependencies?</p> -<p>Virtualenv to the rescue! It basically enables multiple side-by-side -installations of Python, one for each project. It doesn’t actually -install separate copies of Python, but it does provide a clever way -to keep different project environments isolated.</p> -<p>So let’s see how virtualenv works!</p> -<p>If you are on Mac OS X or Linux, chances are that one of the following two -commands will work for you:</p> -<div class="highlight-python"><pre>$ sudo easy_install virtualenv</pre> -</div> -<p>or even better:</p> -<div class="highlight-python"><pre>$ sudo pip install virtualenv</pre> -</div> -<p>One of these will probably install virtualenv on your system. Maybe it’s -even in your package manager. If you use Ubuntu, try:</p> -<div class="highlight-python"><pre>$ sudo apt-get install python-virtualenv</pre> -</div> -<p>If you are on Windows and don’t have the <cite>easy_install</cite> command, you must -install it first. Check the <a class="reference internal" href="#windows-easy-install"><em>easy_install on Windows</em></a> section for more -information about how to do that. Once you have it installed, run the -same commands as above, but without the <cite>sudo</cite> prefix.</p> -<p>Once you have virtualenv installed, just fire up a shell and create -your own environment. I usually create a project folder and an <cite>env</cite> -folder within:</p> -<div class="highlight-python"><pre>$ mkdir myproject -$ cd myproject -$ virtualenv env -New python executable in env/bin/python -Installing setuptools............done.</pre> -</div> -<p>Now, whenever you want to work on a project, you only have to activate -the corresponding environment. On OS X and Linux, do the following:</p> -<div class="highlight-python"><pre>$ . env/bin/activate</pre> -</div> -<p>(Note the space between the dot and the script name. The dot means that -this script should run in the context of the current shell. If this command -does not work in your shell, try replacing the dot with <tt class="docutils literal"><span class="pre">source</span></tt>)</p> -<p>If you are a Windows user, the following command is for you:</p> -<div class="highlight-python"><pre>$ env\scripts\activate</pre> -</div> -<p>Either way, you should now be using your virtualenv (see how the prompt of -your shell has changed to show the virtualenv).</p> -<p>Now you can just enter the following command to get Flask activated in -your virtualenv:</p> -<div class="highlight-python"><pre>$ easy_install Flask</pre> -</div> -<p>A few seconds later you are good to go.</p> -</div> -<div class="section" id="system-wide-installation"> -<h2>System Wide Installation<a class="headerlink" href="#system-wide-installation" title="Permalink to this headline">¶</a></h2> -<p>This is possible as well, but I do not recommend it. Just run -<cite>easy_install</cite> with root rights:</p> -<div class="highlight-python"><pre>$ sudo easy_install Flask</pre> -</div> -<p>(Run it in an Admin shell on Windows systems and without <cite>sudo</cite>).</p> -</div> -<div class="section" id="living-on-the-edge"> -<h2>Living on the Edge<a class="headerlink" href="#living-on-the-edge" title="Permalink to this headline">¶</a></h2> -<p>If you want to work with the latest version of Flask, there are two ways: you -can either let <cite>easy_install</cite> pull in the development version, or tell it -to operate on a git checkout. Either way, virtualenv is recommended.</p> -<p>Get the git checkout in a new virtualenv and run in development mode:</p> -<div class="highlight-python"><pre>$ git clone http://github.com/mitsuhiko/flask.git -Initialized empty Git repository in ~/dev/flask/.git/ -$ cd flask -$ virtualenv env -$ . env/bin/activate -New python executable in env/bin/python -Installing setuptools............done. -$ python setup.py develop -... -Finished processing dependencies for Flask</pre> -</div> -<p>This will pull in the dependencies and activate the git head as the current -version inside the virtualenv. Then you just have to <tt class="docutils literal"><span class="pre">git</span> <span class="pre">pull</span> <span class="pre">origin</span></tt> -to get the latest version.</p> -<p>To just get the development version without git, do this instead:</p> -<div class="highlight-python"><pre>$ mkdir flask -$ cd flask -$ virtualenv env -$ . env/bin/activate -New python executable in env/bin/python -Installing setuptools............done. -$ easy_install Flask==dev -... -Finished processing dependencies for Flask==dev</pre> -</div> -</div> -<div class="section" id="easy-install-on-windows"> -<span id="windows-easy-install"></span><h2><cite>easy_install</cite> on Windows<a class="headerlink" href="#easy-install-on-windows" title="Permalink to this headline">¶</a></h2> -<p>On Windows, installation of <cite>easy_install</cite> is a little bit trickier because -slightly different rules apply on Windows than on Unix-like systems, but -it’s not difficult. The easiest way to do it is to download the -<a class="reference external" href="http://peak.telecommunity.com/dist/ez_setup.py">ez_setup.py</a> file and run it. The easiest way to run the file is to -open your downloads folder and double-click on the file.</p> -<p>Next, add the <cite>easy_install</cite> command and other Python scripts to the -command search path, by adding your Python installation’s Scripts folder -to the <cite>PATH</cite> environment variable. To do that, right-click on the -“Computer” icon on the Desktop or in the Start menu, and choose -“Properties”. Then, on Windows Vista and Windows 7 click on “Advanced System -settings”; on Windows XP, click on the “Advanced” tab instead. Then click -on the “Environment variables” button and double click on the “Path” -variable in the “System variables” section. There append the path of your -Python interpreter’s Scripts folder; make sure you delimit it from -existing values with a semicolon. Assuming you are using Python 2.6 on -the default path, add the following value:</p> -<div class="highlight-python"><pre>;C:\Python26\Scripts</pre> -</div> -<p>Then you are done. To check that it worked, open the Command Prompt and -execute <tt class="docutils literal"><span class="pre">easy_install</span></tt>. If you have User Account Control enabled on -Windows Vista or Windows 7, it should prompt you for admin privileges.</p> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"><p class="logo"><a href="index.html"> - <img class="logo" src="_static/flask.png" alt="Logo"/> -</a></p> - <h3><a href="index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">Installation</a><ul> -<li><a class="reference internal" href="#virtualenv">virtualenv</a></li> -<li><a class="reference internal" href="#system-wide-installation">System Wide Installation</a></li> -<li><a class="reference internal" href="#living-on-the-edge">Living on the Edge</a></li> -<li><a class="reference internal" href="#easy-install-on-windows"><cite>easy_install</cite> on Windows</a></li> -</ul> -</li> -</ul> -<h3>Related Topics</h3> -<ul> - <li><a href="index.html">Documentation overview</a><ul> - <li>Previous: <a href="foreword.html" title="previous chapter">Foreword</a></li> - <li>Next: <a href="quickstart.html" title="next chapter">Quickstart</a></li> - </ul></li> -</ul> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/installation.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="footer"> - © Copyright 2010, Armin Ronacher. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>. - </div> - </body> -</html>
\ No newline at end of file |