This file is indexed.

/usr/share/doc/dh-virtualenv/html/usage.html is in dh-virtualenv 0.6-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
<!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>Building packages with dh-virtualenv &mdash; dh-virtualenv 0.5 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:     '0.5',
        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="dh-virtualenv 0.5 documentation" href="index.html" />
    <link rel="prev" title="Tutorial" href="tutorial.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="tutorial.html" title="Tutorial"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">dh-virtualenv 0.5 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="building-packages-with-dh-virtualenv">
<h1>Building packages with dh-virtualenv<a class="headerlink" href="#building-packages-with-dh-virtualenv" title="Permalink to this headline"></a></h1>
<p>Building packages with <em>dh-virtualenv</em> is relatively easy to start
with but it also supports lot of customization to fit in your general
needs.</p>
<p>By default, <em>dh-virtualenv</em> installs your packages under
<tt class="docutils literal"><span class="pre">/usr/share/python/&lt;packagename&gt;</span></tt>. The package name is provided by
the <tt class="docutils literal"><span class="pre">debian/control</span></tt> file.</p>
<div class="section" id="simple-usecase">
<h2>Simple usecase<a class="headerlink" href="#simple-usecase" title="Permalink to this headline"></a></h2>
<p>To signal debhelper to use <em>dh-virtualenv</em> for building your
package, you need to pass <tt class="docutils literal"><span class="pre">--with</span> <span class="pre">python-virtualenv</span></tt> to debhelper
sequencer.</p>
<p>In a nutshell, the simplest <tt class="docutils literal"><span class="pre">debian/rules</span></tt> file to build using
<em>dh-virtualenv</em> looks like this:</p>
<div class="highlight-make"><div class="highlight"><pre><span class="c">#!/usr/bin/make -f</span>

<span class="nf">%</span><span class="o">:</span>
      dh <span class="nv">$@</span> --with python-virtualenv
</pre></div>
</div>
<p>However, the tool makes a few assumptions of your project&#8217;s structure:</p>
<blockquote>
<div><ul class="simple">
<li>For installing requirements, you need to have a file called
<tt class="docutils literal"><span class="pre">requirements.txt</span></tt> in the root directory of your project. The
requirements file is not mandatory.</li>
<li>The project must have a <tt class="docutils literal"><span class="pre">setup.py</span></tt> file in the root of the
project. Sequencer will run <tt class="docutils literal"><span class="pre">setup.py</span> <span class="pre">install</span></tt> to install the
package inside the virtualenv.</li>
</ul>
</div></blockquote>
<p>After these are place, you can just build the package with your
favorite tool!</p>
</div>
<div class="section" id="command-line-options">
<h2>Command line options<a class="headerlink" href="#command-line-options" title="Permalink to this headline"></a></h2>
<p>To change the default behavior the <tt class="docutils literal"><span class="pre">dh_virtualenv</span></tt> command accepts a
few command line options:</p>
<dl class="cmdoption">
<dt id="cmdoption-p">
<tt class="descname">-p</tt><tt class="descclassname"> &lt;package&gt;</tt><tt class="descclassname">, </tt><tt class="descname">--package</tt><tt class="descclassname"> &lt;package&gt;</tt><a class="headerlink" href="#cmdoption-p" title="Permalink to this definition"></a></dt>
<dd><p>Act on the package named <em>&lt;package&gt;</em></p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-N">
<tt class="descname">-N</tt><tt class="descclassname"> &lt;package&gt;</tt><tt class="descclassname">, </tt><tt class="descname">--no-package</tt><tt class="descclassname"> &lt;package&gt;</tt><a class="headerlink" href="#cmdoption-N" title="Permalink to this definition"></a></dt>
<dd><p>Do not act on the specified package</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-v">
<tt class="descname">-v</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--verbose</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-v" title="Permalink to this definition"></a></dt>
<dd><p>Turn on verbose mode. This has a few effects: it sets root logger
level to <tt class="docutils literal"><span class="pre">DEBUG</span></tt> and passes verbose flag to <tt class="docutils literal"><span class="pre">pip</span></tt> when
installing packages. This can also be provided using the standard
<tt class="docutils literal"><span class="pre">DH_VERBOSE</span></tt> environment variable.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption--extra-index-url">
<tt class="descname">--extra-index-url</tt><tt class="descclassname"> &lt;url&gt;</tt><a class="headerlink" href="#cmdoption--extra-index-url" title="Permalink to this definition"></a></dt>
<dd><p>Use extra index url <em>&lt;url&gt;</em> when running <tt class="docutils literal"><span class="pre">pip</span></tt> to install
packages. This can be provided multiple times to pass multiple URLs
to <tt class="docutils literal"><span class="pre">pip</span></tt>. This is useful if you for example have a private Python
Package Index.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption--preinstall">
<tt class="descname">--preinstall</tt><tt class="descclassname"> &lt;package&gt;</tt><a class="headerlink" href="#cmdoption--preinstall" title="Permalink to this definition"></a></dt>
<dd><p>Package to install before processing the requirements. This flag
can be used to provide a package that is installed by <tt class="docutils literal"><span class="pre">pip</span></tt>
before processing requirements file. This is handy if you need to
install for example a custom setup script or other packages needed
to parse <tt class="docutils literal"><span class="pre">setup.py</span></tt>. This flag can be provided multiple times to
pass multiple packages for pre-install.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption--pypi-url">
<tt class="descname">--pypi-url</tt><tt class="descclassname"> &lt;URL&gt;</tt><a class="headerlink" href="#cmdoption--pypi-url" title="Permalink to this definition"></a></dt>
<dd><p>Base URL of the PyPI server. This flag can be used to pass in a
custom URL to a PyPI mirror. It&#8217;s useful if you for example have an
internal mirror of the PyPI or you run a special instance that only
exposes selected packages of PyPI. If this is not provided, the
default will be whatever <tt class="docutils literal"><span class="pre">pip</span></tt> uses as default (usually
<tt class="docutils literal"><span class="pre">http://pypi.python.org/simple</span></tt>).</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption--setuptools">
<tt class="descname">--setuptools</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption--setuptools" title="Permalink to this definition"></a></dt>
<dd><p>Use setuptools instead of distribute in the virtualenv</p>
</dd></dl>

</div>
<div class="section" id="advanced-usage">
<h2>Advanced usage<a class="headerlink" href="#advanced-usage" title="Permalink to this headline"></a></h2>
<p>To provide command line options to <tt class="docutils literal"><span class="pre">dh_virtualenv</span></tt> sequence the
override mechanism of the debhelper is the best tool.</p>
<p>Following <tt class="docutils literal"><span class="pre">debian/rules</span></tt> will provide <em>http://example.com</em> as
additional Python Package Index URI:</p>
<div class="highlight-make"><div class="highlight"><pre><span class="c">#!/usr/bin/make -f</span>

<span class="nf">%</span><span class="o">:</span>
      dh <span class="nv">$@</span> --with python-virtualenv

<span class="nf">override_dh_virtualenv</span><span class="o">:</span>
      dh_virtualenv --extra-index-url http://example.com
</pre></div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Building packages with dh-virtualenv</a><ul>
<li><a class="reference internal" href="#simple-usecase">Simple usecase</a></li>
<li><a class="reference internal" href="#command-line-options">Command line options</a></li>
<li><a class="reference internal" href="#advanced-usage">Advanced usage</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="tutorial.html"
                        title="previous chapter">Tutorial</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/usage.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="tutorial.html" title="Tutorial"
             >previous</a> |</li>
        <li><a href="index.html">dh-virtualenv 0.5 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2013, Spotify AB.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.
    </div>
  </body>
</html>