comparison README.rst @ 134:742009d964ef

More installation information in the README file.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 25 Nov 2014 22:36:40 -0800
parents 8f7ba2c95025
children de09d41bae23
comparison
equal deleted inserted replaced
133:9e4c2e68a129 134:742009d964ef
14 14
15 If you want to quickly give it a spin: 15 If you want to quickly give it a spin:
16 16
17 :: 17 ::
18 18
19 bin/chef init mywebsite 19 pip install piecrust
20 chef init mywebsite
20 cd mywebsite 21 cd mywebsite
21 ../bin/chef serve 22 chef serve
22 23
23 It should create a new empty site in a ``mywebsite`` folder, and then start 24 It should create a new empty site in a ``mywebsite`` folder, and start a small
24 your default browser to show it to you. Use ``chef prepare page`` and ``chef 25 web server to preview it. You can then point your browser to ``localhost:8080``
25 prepare post`` to create pages and posts, and edit those in your favorite text 26 to see the default home page.
26 editor.
27 27
28 When you're happy, run ``../bin/chef bake`` to generate the final static 28 Use ``chef prepare page`` and ``chef prepare post`` to create pages and posts,
29 website, which you'll find in ``_counter``. 29 and edit those in your favorite text editor.
30
31 When you're happy, run ``chef bake`` to generate the final static website,
32 which you'll find in ``_counter``. At this point you can upload the contents of
33 ``_counter`` to your server.
30 34
31 35
32 Changes 36 Changes
33 ======= 37 =======
34 38
35 Check out the CHANGELOG file for new features, bug fixes and breaking changes. 39 Check out the ``CHANGELOG`` file for new features, bug fixes and breaking changes.
36 40
41
42 Installation
43 ============
44
45 From the package server
46 -----------------------
47
48 The simplest way to install PieCrust is to install it from PyPi_, the Python
49 package index:
50
51 ::
52
53 easy_install piecrust
54
55 or:
56
57 ::
58
59 pip install piecrust
60
61 .. _Pypi: https://pypi.python.org/pypi
62
63
64 From a tarball
65 --------------
66
67 You can also install PieCrust using a snapshot of the code. See the `download
68 page`_ where you can either get the `very latest`_, or any of the previous
69 official releases. Then you can point ``pip`` to the tarball (either one you
70 previously downloaded, or directly from BitBucket):
71
72 ::
73
74 pip install https://bitbucket.org/ludovicchabant/piecrust2/get/tip.tar.gz
75
76
77 .. _download page: https://bitbucket.org/ludovicchabant/piecrust2/downloads
78 .. _very latest: https://bitbucket.org/ludovicchabant/piecrust2/get/tip.tar.gz
79
80
81 Using a virtual environment
82 ---------------------------
83
84 This method is not as simple as the previous ones, but is probably the
85 recommended one. All the methods so far will install PieCrust globally on your
86 system, which is fine if you're installing it on your own computer, but may
87 cause problems later. For instance, PieCrust may have some dependencies in
88 common with some other Python programs you have installed, and things may break
89 when you update one of them. Alternatively, you may just want to install
90 PieCrust on a computer you don't fully control, like in a shared hosting
91 environment. Or maybe you just like things to be tidy.
92
93 For this you'll need ``virtualenv``. A virtual environment is simply a folder
94 on your computer that contains a portable, fully functional Python environment
95 -- one that would, in this case, contain a certain version of PieCrust, along
96 with all its dependencies, separate from your global Python installation.
97
98 On Mac/Linux:
99
100 ::
101
102 virtualenv venv
103 . venv/bin/activate
104 pip install piecrust
105
106 On Windows:
107
108 ::
109
110 virtualenv venv
111 venv\Scripts\activate
112 pip install piecrust
113
114
115 If the first command fails, chances are that you don't have ``virtualenv``
116 installed. You should be able to install it with:
117
118 ::
119
120 pip install virtualenv
121
122 Some Linux/UNIX-based systems have it in their package manager, so if that
123 doesn't work you can try:
124
125 ::
126
127 apt-get install virtualenv
128
129 If both fail, you may have to get it "by hand", by `downloading the code from
130 PyPi`_, extracting the archive, and running it from there. For instance, on
131 Linux/UNIX:
132
133 ::
134
135 wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.11.6.tar.gz
136 tar xzf virtualenv-1.11.6.tar.gz
137 python virtualenv-1.11.6/virtualenv.py venv
138
139 From there, you can continue with activating the virtual environment and
140 install PieCrust in it, as shown previously.
141
142
143 .. _downloading the code from PyPi: https://pypi.python.org/pypi/virtualenv#downloads
144