File: index.html

package info (click to toggle)
python-paver 1.2.1-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 1,220 kB
  • sloc: python: 4,678; makefile: 20
file content (332 lines) | stat: -rw-r--r-- 22,178 bytes parent folder | download | duplicates (3)
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<!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>Paver: Easy Scripting for Software Projects &mdash; Paver 1.2.1 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '1.2.1',
        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="Paver 1.2.1 documentation" href="#" />
    <link rel="next" title="Foreword: Why Paver?" href="foreword.html" /> 
  </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="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="foreword.html" title="Foreword: Why Paver?"
             accesskey="N">next</a> |</li>
        <li><a href="#">Paver 1.2.1 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="paver-easy-scripting-for-software-projects">
<h1>Paver: Easy Scripting for Software Projects<a class="headerlink" href="#paver-easy-scripting-for-software-projects" title="Permalink to this headline">¶</a></h1>
<a class="reference internal image-reference" href="_images/paver_banner.jpg"><img alt="_images/paver_banner.jpg" src="_images/paver_banner.jpg" style="width: 240px; height: 126px;" /></a>
<p><a class="reference external" href="http://paver.github.com/paver-docs-jp/">Japanese translation available</a>
thanks to Tetsuya Morimoto. Latest stable documentation is
<a class="reference external" href="http://packages.python.org/Paver/">on PyPI</a>, latest development docs are
<a class="reference external" href="http://paver.github.com/">on github pages</a></p>
<p>Paver is a Python-based software project scripting tool along the
lines of Make or Rake. It is not designed to handle the dependency
tracking requirements of, for example, a C program. It <em>is</em> designed
to help out with all of your other repetitive tasks (run documentation
generators, moving files around, downloading things), all with the
convenience of Python&#8217;s syntax and massive library of code.</p>
<p>If you&#8217;re developing applications in Python, you get even more...
Most public Python projects use distutils or setuptools to create source
tarballs for distribution. (Private projects can take advantage of
this, too!) Have you ever wanted to generate the docs before building the
source distribution? With Paver, you can, trivially. Here&#8217;s a complete
pavement.py:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">paver.easy</span> <span class="kn">import</span> <span class="o">*</span>
<span class="kn">from</span> <span class="nn">paver.setuputils</span> <span class="kn">import</span> <span class="n">setup</span>

<span class="n">setup</span><span class="p">(</span>
    <span class="n">name</span><span class="o">=</span><span class="s">&quot;MyCoolProject&quot;</span><span class="p">,</span>
    <span class="n">packages</span><span class="o">=</span><span class="p">[</span><span class="s">&#39;mycool&#39;</span><span class="p">],</span>
    <span class="n">version</span><span class="o">=</span><span class="s">&quot;1.0&quot;</span><span class="p">,</span>
    <span class="n">url</span><span class="o">=</span><span class="s">&quot;http://www.blueskyonmars.com/&quot;</span><span class="p">,</span>
    <span class="n">author</span><span class="o">=</span><span class="s">&quot;Kevin Dangoor&quot;</span><span class="p">,</span>
    <span class="n">author_email</span><span class="o">=</span><span class="s">&quot;dangoor@gmail.com&quot;</span>
<span class="p">)</span>

<span class="nd">@task</span>
<span class="nd">@needs</span><span class="p">([</span><span class="s">&#39;html&#39;</span><span class="p">,</span> <span class="s">&quot;distutils.command.sdist&quot;</span><span class="p">])</span>
<span class="k">def</span> <span class="nf">sdist</span><span class="p">():</span>
    <span class="sd">&quot;&quot;&quot;Generate docs and source distribution.&quot;&quot;&quot;</span>
    <span class="k">pass</span>
</pre></div>
</div>
<p>With that pavement file, you can just run <tt class="docutils literal"><span class="pre">paver</span> <span class="pre">sdist</span></tt>, and your docs
will be rebuilt automatically before creating the source distribution.
It&#8217;s also easy to move the generated docs into some other directory
(and, of course, you can tell Paver where your docs are stored,
if they&#8217;re not in the default location.)</p>
<div class="section" id="features">
<h2>Features<a class="headerlink" href="#features" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Build files are <a class="reference internal" href="features.html#justpython"><em>just Python</em></a></li>
<li><a class="reference internal" href="features.html#onefile"><em>One file with one syntax</em></a>, pavement.py, knows how to manage
your project</li>
<li><a class="reference internal" href="features.html#pathmodule"><em>File operations</em></a> are unbelievably easy, thanks to the
built-in version of Jason Orendorff&#8217;s path.py.</li>
<li>Need to do something that takes 5 lines of code?
<a class="reference internal" href="features.html#fivelines"><em>It&#8217;ll only take 5 lines of code.</em></a>.</li>
<li>Completely encompasses <a class="reference internal" href="setuptools.html#setuptools"><em>distutils and setuptools</em></a> so
that you can customize behavior as you need to.</li>
<li>Wraps <a class="reference internal" href="doctools.html#doctools"><em>Sphinx</em></a> for generating documentation, and adds utilities
that make it easier to incorporate fully tested sample code.</li>
<li>Wraps <a class="reference internal" href="svn.html#svn"><em>Subversion</em></a> for working with code that is checked out.</li>
<li>Wraps <a class="reference internal" href="virtualenv.html#virtualenv"><em>virtualenv</em></a> to allow you to trivially create a
bootstrap script that gets a virtual environment up and running. This is
a great way to install packages into a contained environment.</li>
<li>Can use all of these other libraries, but <a class="reference internal" href="features.html#nodeps"><em>requires none of them</em></a></li>
<li>Easily transition from setup.py without making your users learn about or
even install Paver! (See the <a class="reference internal" href="getting_started.html#gettingstarted"><em>Getting Started Guide</em></a>
for an example).</li>
</ul>
<p>See how it works! Check out the <a class="reference internal" href="getting_started.html#gettingstarted"><em>Getting Started Guide</em></a>.</p>
<p>Paver was created by <a class="reference external" href="http://blueskyonmars.com">Kevin Dangoor</a> of <a class="reference external" href="http://sitepen.com">SitePen</a>.</p>
</div>
<div class="section" id="status">
<h2>Status<a class="headerlink" href="#status" title="Permalink to this headline">¶</a></h2>
<p>Paver has been in use in production settings since mid-2008, and significant
attention is paid to backwards compatibility since the release of 1.0.</p>
<p>See the <a class="reference internal" href="changelog.html#changelog"><em>changelog</em></a> for more information about recent improvements.</p>
</div>
<div class="section" id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2>
<p>The easiest way to get Paver is if you have <a class="reference external" href="http://www.pip-installer.org">pip</a> or <a href="#id1"><span class="problematic" id="id2">distutils_</span></a> installed.</p>
<p><tt class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">Paver</span></tt></p>
<p>or</p>
<p><tt class="docutils literal"><span class="pre">easy_install</span> <span class="pre">Paver</span></tt></p>
<p>Without setuptools, it&#8217;s still pretty easy. Download the Paver .tgz file from
<a class="reference external" href="http://pypi.python.org/pypi/Paver/">Paver&#8217;s Cheeseshop page</a>, untar it and run:</p>
<p><tt class="docutils literal"><span class="pre">python</span> <span class="pre">setup.py</span> <span class="pre">install</span></tt></p>
</div>
<div class="section" id="help-and-development">
<h2>Help and Development<a class="headerlink" href="#help-and-development" title="Permalink to this headline">¶</a></h2>
<p>You can get help from the <a class="reference external" href="http://groups.google.com/group/paver">mailing list</a>.</p>
<p>If you&#8217;d like to help out with Paver, you can check the code out from github:</p>
<p><tt class="docutils literal"><span class="pre">git</span> <span class="pre">clone</span> <span class="pre">https://github.com/paver/paver.git</span></tt></p>
<p>Ideally, create a fork, fix an issue from <a class="reference external" href="https://github.com/paver/paver/issues">Paver&#8217;s list of issues</a> (or create an issue
Yourself) and send a pull request.</p>
<p>Your help is appreciated!</p>
<div class="section" id="running-test-suite">
<h3>Running test suite<a class="headerlink" href="#running-test-suite" title="Permalink to this headline">¶</a></h3>
<p>Paver contains both unit and integration test suite. Unittests are run by either
<tt class="docutils literal"><span class="pre">paver</span> <span class="pre">test</span></tt> or <tt class="docutils literal"><span class="pre">paver</span> <span class="pre">unit</span></tt>. Integration tests can be run by <tt class="docutils literal"><span class="pre">paver</span> <span class="pre">integrate</span></tt>.</p>
<p>Using older, system-wide installed paver to run tests on development version can lead
to bad interactions (see <a class="reference external" href="https://github.com/paver/paver/issues/33">issue 33</a>). Please, run paver test suite using development
version itself, by:</p>
<ul class="simple">
<li>Creating virtual environment with &#8211;no-site-packages</li>
</ul>
<p>and</p>
<ul class="simple">
<li>Installing development version with python setup.py develop</li>
</ul>
<p>or</p>
<ul class="simple">
<li>Using embedded minilib, thus invoking commands with setup.py instead of paver</li>
</ul>
</div>
</div>
<div class="section" id="license">
<h2>License<a class="headerlink" href="#license" title="Permalink to this headline">¶</a></h2>
<p>Paver is licensed under a BSD license. See the LICENSE.txt file in the
distribution.</p>
</div>
<div class="section" id="contents">
<h2>Contents<a class="headerlink" href="#contents" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="foreword.html">Foreword: Why Paver?</a><ul>
<li class="toctree-l2"><a class="reference internal" href="foreword.html#the-declarative-imperative-divide">The Declarative/Imperative Divide</a></li>
<li class="toctree-l2"><a class="reference internal" href="foreword.html#consistency-for-project-related-tasks">Consistency for Project Related Tasks</a></li>
<li class="toctree-l2"><a class="reference internal" href="foreword.html#that-s-why-paver-is-here">That&#8217;s Why Paver Is Here</a></li>
<li class="toctree-l2"><a class="reference internal" href="foreword.html#making-the-switch-is-easy">Making the Switch is Easy</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="features.html">Paver&#8217;s Features</a><ul>
<li class="toctree-l2"><a class="reference internal" href="features.html#files-are-just-python">Files Are Just Python</a></li>
<li class="toctree-l2"><a class="reference internal" href="features.html#one-file-with-one-syntax">One File with One Syntax</a></li>
<li class="toctree-l2"><a class="reference internal" href="features.html#easy-file-operations">Easy file operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="features.html#small-bits-of-behavior-take-small-amounts-of-work">Small bits of behavior take small amounts of work</a></li>
<li class="toctree-l2"><a class="reference internal" href="features.html#can-take-advantage-of-libraries-but-doesn-t-require-them">Can Take Advantage of Libraries But Doesn&#8217;t Require Them</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started with Paver</a><ul>
<li class="toctree-l2"><a class="reference internal" href="getting_started.html#the-old-way">The Old Way</a></li>
<li class="toctree-l2"><a class="reference internal" href="getting_started.html#the-new-way">The New Way</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="pavement.html">pavement.py in depth</a><ul>
<li class="toctree-l2"><a class="reference internal" href="pavement.html#defining-tasks">Defining Tasks</a></li>
<li class="toctree-l2"><a class="reference internal" href="pavement.html#manually-calling-tasks">Manually Calling Tasks</a></li>
<li class="toctree-l2"><a class="reference internal" href="pavement.html#how-task-names-work">How Task Names Work</a></li>
<li class="toctree-l2"><a class="reference internal" href="pavement.html#task-parameters">Task Parameters</a></li>
<li class="toctree-l2"><a class="reference internal" href="pavement.html#command-line-arguments">Command Line Arguments</a></li>
<li class="toctree-l2"><a class="reference internal" href="pavement.html#hiding-tasks">Hiding tasks</a></li>
<li class="toctree-l2"><a class="reference internal" href="pavement.html#more-complex-dependencies">More complex dependencies</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="paverstdlib.html">The Paver Standard Library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="setuptools.html">distutils and setuptools (paver.setuputils)</a></li>
<li class="toctree-l2"><a class="reference internal" href="files.html">File Handling in Paver (paver.path)</a></li>
<li class="toctree-l2"><a class="reference internal" href="doctools.html">Documentation Tools (paver.doctools)</a></li>
<li class="toctree-l2"><a class="reference internal" href="misctasks.html">Miscellaneous Tasks (paver.misctasks)</a></li>
<li class="toctree-l2"><a class="reference internal" href="virtualenv.html">Virtualenv Support (paver.virtual)</a></li>
<li class="toctree-l2"><a class="reference internal" href="virtualenv.html#using-virtualenv-with-tasks">Using virtualenv with tasks</a></li>
<li class="toctree-l2"><a class="reference internal" href="virtualenv.html#module-paver.virtual">paver.virtual Tasks</a></li>
<li class="toctree-l2"><a class="reference internal" href="svn.html">Using with Subversion (paver.svn)</a></li>
<li class="toctree-l2"><a class="reference internal" href="bzr.html">Using with Bazaar-NG (bzr) (paver.bzr)</a></li>
<li class="toctree-l2"><a class="reference internal" href="ssh.html">SSH Remote Access Support (paver.ssh)</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="cmdline.html">Paver Command Line</a></li>
<li class="toctree-l1"><a class="reference internal" href="tips.html">Tips and Tricks</a><ul>
<li class="toctree-l2"><a class="reference internal" href="tips.html#using-a-config-file-for-settings">Using a Config File For Settings</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="articles.html">Articles about Paver</a></li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Paver Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#june-2-2013">1.2.1 (June 2, 2013)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#february-24-2013">1.2 (February 24, 2013)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#august-25-2012">1.1.1 (August 25, 2012)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#july-30-2012">1.1.0 (July 30, 2012)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#october-21-2011">1.0.5 (October 21, 2011)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#january-16-2011">1.0.4 (January 16, 2011)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#june-1-2010">1.0.3 (June 1, 2010)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#march-8-2010">1.0.2 (March 8, 2010)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#may-4-2009">1.0.1 (May 4, 2009)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#march-22-2009">1.0 (March 22, 2009)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#b1-march-13-2009">1.0b1 (March 13, 2009)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#a4-march-6-2009">1.0a4 (March 6, 2009)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#a3-march-6-2009">1.0a3 (March 6, 2009)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#a2-february-26-2009">1.0a2 (February 26, 2009)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#a1-january-28-2009">1.0a1 (January 28, 2009)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#june-2-2008">0.8.1 (June 2, 2008)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#may-19-2008">0.8 (May 19, 2008)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#may-16-2008">0.7.3 (May 16, 2008)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#may-8-2008">0.7.2 (May 8, 2008)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#id22">0.7.1 (May 8, 2008)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#may-7-2008">0.7 (May 7, 2008)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#april-22-2008">0.4 (April 22, 2008)</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="credits.html">Credits</a></li>
</ul>
</div>
</div>
<div class="section" id="indices-and-tables">
<h2>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><a class="reference internal" href="genindex.html"><em>Index</em></a></li>
<li><a class="reference internal" href="py-modindex.html"><em>Module Index</em></a></li>
<li><a class="reference internal" href="search.html"><em>Search Page</em></a></li>
</ul>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="#">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Paver: Easy Scripting for Software Projects</a><ul>
<li><a class="reference internal" href="#features">Features</a></li>
<li><a class="reference internal" href="#status">Status</a></li>
<li><a class="reference internal" href="#installation">Installation</a></li>
<li><a class="reference internal" href="#help-and-development">Help and Development</a><ul>
<li><a class="reference internal" href="#running-test-suite">Running test suite</a></li>
</ul>
</li>
<li><a class="reference internal" href="#license">License</a></li>
<li><a class="reference internal" href="#contents">Contents</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
</ul>
</li>
</ul>

  <h4>Next topic</h4>
  <p class="topless"><a href="foreword.html"
                        title="next chapter">Foreword: Why Paver?</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/index.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="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="foreword.html" title="Foreword: Why Paver?"
             >next</a> |</li>
        <li><a href="#">Paver 1.2.1 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2008, SitePen, Inc..
      Last updated on Jun 02, 2013.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2b1.
    </div>
  </body>
</html>