/
index.html
206 lines (166 loc) · 5.74 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>zc.buildout lightning talk</title>
<base href="reveal.js/">
<meta name="description" content="A talk for PyCon UK 2012">
<meta name="author" content="Wes Mason">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link href='http://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/default.css" id="theme">
<link rel="stylesheet" href="../css/talk.css">
<!-- For syntax highlighting -->
<script>
// If the query includes 'print-pdf' we'll use the PDF print sheet
document.write( '<link rel="stylesheet" href="css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Used to fade in a background when a specific slide state is reached -->
<div class="state-background"></div>
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section data-markdown>
## zc.buildout for builds and profit
Wes Mason
[@1stvamp](http://twitter.com/1stvamp)
[www.serverdensity.com](http://www.serverdensity.com/)
</section>
<section data-markdown id="slide2">
## What?
- [www.buildout.org](http://www.buildout.org/)
- Build tool (e.g. like make/cmake/rake)
- Started out as Zope/Plone build tool (but don't let that put you off)
</section>
<section>
<section data-markdown>
## Config files
- INI / RFC 822 style
- `buildout.cfg`
</section>
<section data-markdown>
[buildout]
develop = .
parts = python
test
eggs = coverage
Django
[versions]
Django = 1.2
coverage = 3.5.2
[python]
...
[test]
...
</section>
</section>
<section data-markdown>
## Dependencies
- Install dependencies, version pinning etc.
- Sandboxing (like virtualenvs, *but no longer in 2.x*)
- `buildout` can be bootstrapped itself and sandboxed
$ python boostrap.py
$ bin/buildout
</section>
<section>
<section data-markdown>
## Recipes
- Many "recipes" available from PyPi for Python projects with config/setup
- Build and install non-Python stuff along side your project
- Various tasks for making your project
</section>
<section data-markdown>
[buildout]
parts = var-dir
var-directory = ${buildout:directory}/var
[var-dir]
recipe = z3c.recipe.mkdir
paths = ${buildout:var-directory}/celery
</section>
</section>
<section>
<section data-markdown>
## bin scripts
- Wrap console scripts in sandboxed `bin/` dir
- `buildout` will do this automatically
- You can also create special wrappers yourself:
- `zc.recipe.egg`
- `z3c.recipe.scripts`
- Even interpreters
</section>
<section data-markdown>
[python]
recipe = z3c.recipe.scripts:interpreter
eggs = ${buildout:eggs}
extra-paths = ${buildout:directory}/src/myapp/somemodule
script-initialization = os.environ['PROJ_ENV'] = "${config:environment}"
</section>
</section>
<section>
<section data-markdown>
## Config files (again)
- Extendable configs
- Lets you create configs for specific setups
- `production.cfg`
</section>
<section data-markdown>
[buildout]
find-links =
http://my-private-pypi.somecompany.com/
extends = buildout.cfg
[config]
environment = production
</section>
<section data-markdown>
$ bin/buildout -c production.cfg
...
$ bin/python
Python 2.7.1
>>> import os
>>> os.environ['PROJ_ENV']
'production'
</section>
</section>
</div>
<!-- The navigational controls UI -->
<aside class="controls">
<a class="left" href="#">◄</a>
<a class="right" href="#">►</a>
<a class="up" href="#">▲</a>
<a class="down" href="#">▼</a>
</aside>
<!-- Presentation progress bar -->
<div class="progress"><span></span></div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.min.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
overview: true,
rollingLinks: false,
theme: Reveal.getQueryHash().theme || 'default', // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/linear(2d)
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: '../lib/js/showdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'lib/js/data-markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '/socket.io/socket.io.js', async: true, condition: function() { return window.location.host === 'localhost:1947'; } },
{ src: 'plugin/speakernotes/client.js', async: true, condition: function() { return window.location.host === 'localhost:1947'; } },
]
});
</script>
</body>
</html>