comparison INSTALL.rst @ 160:de09d41bae23

Moved all installation instructions to a new `INSTALL` file.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 01 Jan 2015 19:35:18 -0800
parents
children
comparison
equal deleted inserted replaced
159:232989a6df36 160:de09d41bae23
1
2
3 From the package server
4 -----------------------
5
6 The simplest way to install PieCrust is to install it from PyPi_, the Python
7 package index:
8
9 ::
10
11 easy_install piecrust
12
13 or:
14
15 ::
16
17 pip install piecrust
18
19 You'll need to have Python3 installed (support for Python2 may come later).
20
21 .. _Pypi: https://pypi.python.org/pypi
22
23
24 From a tarball
25 --------------
26
27 You can also install PieCrust using a snapshot of the code. See the `download
28 page`_ where you can either get the `very latest`_, or any of the previous
29 official releases. Then you can point ``pip`` to the tarball (either one you
30 previously downloaded, or directly from BitBucket):
31
32 ::
33
34 pip install https://bitbucket.org/ludovicchabant/piecrust2/get/tip.tar.gz
35
36 You'll need to have Python3 installed (support for Python2 may come later).
37
38 .. _download page: https://bitbucket.org/ludovicchabant/piecrust2/downloads
39 .. _very latest: https://bitbucket.org/ludovicchabant/piecrust2/get/tip.tar.gz
40
41
42 Using a virtual environment
43 ---------------------------
44
45 This method is not as simple as the previous ones, but is probably the
46 recommended one. All the methods so far will install PieCrust globally on your
47 system, which is fine if you're installing it on your own computer, but may
48 cause problems later. For instance, PieCrust may have some dependencies in
49 common with some other Python programs you have installed, and things may break
50 when you update one of them. Alternatively, you may just want to install
51 PieCrust on a computer you don't fully control, like in a shared hosting
52 environment. Or maybe you just like things to be tidy.
53
54 For this you'll need ``virtualenv``. A virtual environment is simply a folder
55 on your computer that contains a portable, fully functional Python environment
56 -- one that would, in this case, contain a certain version of PieCrust, along
57 with all its dependencies, separate from your global Python installation.
58
59 You'll also need to have Python3 installed (support for Python2 may come later).
60
61 On Mac/Linux:
62
63 ::
64
65 virtualenv -p python3 venv
66 . venv/bin/activate
67 pip install piecrust
68
69 On Windows:
70
71 ::
72
73 virtualenv -p python3 venv
74 venv\Scripts\activate
75 pip install piecrust
76
77
78 If the first command fails, chances are that you don't have ``virtualenv``
79 installed. You should be able to install it with:
80
81 ::
82
83 pip install virtualenv
84
85 Some Linux/UNIX-based systems have it in their package manager, so if that
86 doesn't work you can try:
87
88 ::
89
90 apt-get install virtualenv
91
92 If both fail, you may have to get it "by hand", by `downloading the code from
93 PyPi`_, extracting the archive, and running it from there. For instance, on
94 Linux/UNIX:
95
96 ::
97
98 wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.11.6.tar.gz
99 tar xzf virtualenv-1.11.6.tar.gz
100 python virtualenv-1.11.6/virtualenv.py venv
101
102 From there, you can continue with activating the virtual environment and
103 install PieCrust in it, as shown previously.
104
105
106 .. _downloading the code from PyPi: https://pypi.python.org/pypi/virtualenv#downloads
107
108
109 From source
110 -----------
111
112 If you intend to stay close to the development branch of PieCrust, or if you
113 want to contribute to the project with some coding of you own, you may want to
114 clone the repository locally and run PieCrust from there.
115
116 In order to install PieCrust's dependencies, it's recommended to use a virtual
117 environment (see above). If you're familiar with Python development, you should
118 know all about this already. Also, so far, PieCrust is a Python3-only project
119 (support for Python2 may come later) so make sure you have that installed.
120
121 Using Mercurial:
122
123 ::
124
125 hg clone https://bitbucket.org/ludovicchabant/piecrust2
126
127 Using Git:
128
129 ::
130
131 git clone https://github.com/ludovicchabant/PieCrust2.git
132
133
134 Then create the virtual environment and install dependencies.
135
136 On Mac/Linux:
137
138 ::
139
140 cd <your clone of PieCrust2>
141 virtualenv -p pyton3 venv
142 . venv/bin/activate
143 pip install -r requirements.txt
144
145 On Windows:
146
147 ::
148
149 cd <your clone of PieCrust2>
150 virtualenv -p python3 venv
151 venv\Scripts\activate
152 pip install -r requirements.txt
153
154 To run PieCrust, run ``bin/chef`` (on Mac/Linux) or ``bin\chef.cmd`` (on
155 Windows), which is basically the same as running ``python chef.py``. Make sure
156 that you're running this with the virtual environment active.
157
158 When you want to update PieCrust, do ``hg pull -u`` or ``git pull``, depending
159 on which source control system you used to clone the repository, and then
160 update any dependencies that may have changed:
161
162 ::
163
164 pip install -r requirements.txt -U
165