Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 8f675175e56ebdd85c85d4d0d2fddee5 > files > 113

python-rosinstall-0.6.26-1.20130318git6d482b2.fc18.noarch.rpm



<!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>Developer’s Guide &mdash; rosinstall 0.6 documentation</title>
    
    <link rel="stylesheet" href="_static/haiku.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="_static/print.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '0.6',
        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>
    <script type="text/javascript" src="_static/theme_extras.js"></script>
    <link rel="top" title="rosinstall 0.6 documentation" href="index.html" />
    <link rel="next" title="Packages" href="modules.html" />
    <link rel="prev" title="rosinstall file format" href="rosinstall_file_format.html" /> 
  </head>
  <body>
      <div class="header"><h1 class="heading"><a href="index.html">
          <span>rosinstall 0.6 documentation</span></a></h1>
        <h2 class="heading"><span>Developer’s Guide</span></h2>
      </div>
      <div class="topnav">
      
        <p>
        «&#160;&#160;<a href="rosinstall_file_format.html">rosinstall file format</a>
        &#160;&#160;::&#160;&#160;
        <a class="uplink" href="index.html">Contents</a>
        &#160;&#160;::&#160;&#160;
        <a href="modules.html">Packages</a>&#160;&#160;»
        </p>

      </div>
      <div class="content">
        
        
  <div class="section" id="developer-s-guide">
<h1>Developer&#8217;s Guide<a class="headerlink" href="#developer-s-guide" title="Permalink to this headline">¶</a></h1>
<div class="section" id="code-api">
<h2>Code API<a class="headerlink" href="#code-api" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="modules.html">Packages</a></li>
</ul>
</div>
</div>
<div class="section" id="changelog">
<h2>Changelog<a class="headerlink" href="#changelog" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Changelog</a></li>
</ul>
</div>
</div>
<div class="section" id="bug-reports-and-feature-requests">
<h2>Bug reports and feature requests<a class="headerlink" href="#bug-reports-and-feature-requests" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><a class="reference external" href="https://kforge.ros.org/vcstools/trac/newticket?component=rosinstall&amp;type=defect">Submit a bug report</a></li>
<li><a class="reference external" href="https://kforge.ros.org/vcstools/trac/newticket?component=rosinstall&amp;type=enhancement">Submit a feature request</a></li>
</ul>
</div>
<div class="section" id="developer-setup">
<h2>Developer Setup<a class="headerlink" href="#developer-setup" title="Permalink to this headline">¶</a></h2>
<p>The rosinstall source can be downloaded using Mercurial:</p>
<div class="highlight-python"><pre>$ hg clone https://kforge.ros.org/vcstools/rosinstall</pre>
</div>
<p>You will also need vcstools, which you can either install using pip or download using:</p>
<div class="highlight-python"><pre>$ hg clone https://kforge.ros.org/vcstools/hg</pre>
</div>
<p>If you download it without installing it, you need to export its location to your <span class="target" id="index-0"></span><tt class="xref std std-envvar docutils literal"><span class="pre">PYTHONPATH</span></tt>:</p>
<div class="highlight-python"><pre>$ cd vcstools
$ . setup.sh</pre>
</div>
<p>To work on the bash completion, there is a separate repository:</p>
<div class="highlight-python"><pre>$ hg clone https://kforge.ros.org/vcstools/ri_bash_completion</pre>
</div>
<p>That one does not contain python code.</p>
<p>rosinstall uses <a class="reference external" href="http://pypi.python.org/pypi/setuptools">setuptools</a>,
which you will need to download and install in order to run the
packaging.  We use setuptools instead of distutils in order to be able
use <tt class="docutils literal"><span class="pre">setup()</span></tt> keys like <tt class="docutils literal"><span class="pre">install_requires</span></tt>.</p>
<p>Configure your <span class="target" id="index-1"></span><tt class="xref std std-envvar docutils literal"><span class="pre">PYTHONPATH</span></tt>:</p>
<div class="highlight-python"><pre>$ cd rosinstall
$ . setup.sh</pre>
</div>
<p>OR:</p>
<div class="highlight-python"><pre>$ cd rosinstall
$ python setup.py install</pre>
</div>
<p>The first will prepend <tt class="docutils literal"><span class="pre">rosinstall/src</span></tt> to your <span class="target" id="index-2"></span><tt class="xref std std-envvar docutils literal"><span class="pre">PYTHONPATH</span></tt>. The second will install rosinstall into your dist/site-packages.</p>
</div>
<div class="section" id="testing">
<h2>Testing<a class="headerlink" href="#testing" title="Permalink to this headline">¶</a></h2>
<p>Install test dependencies</p>
<div class="highlight-python"><pre>$ pip install nose
$ pip install mock</pre>
</div>
<p>rosinstall uses <a class="reference external" href="http://readthedocs.org/docs/nose/en/latest/">Python nose</a> for testing, which is
a fairly simple and straightforward test framework.  The rosinstall
mainly use <tt class="xref py py-mod docutils literal"><span class="pre">unittest</span></tt> to construct test fixtures, but with nose
you can also just write a function that starts with the name <tt class="docutils literal"><span class="pre">test</span></tt>
and use normal <tt class="docutils literal"><span class="pre">assert</span></tt> statements.</p>
<p>rosinstall also uses <a class="reference external" href="http://www.voidspace.org.uk/python/mock/">mock</a>
to create mocks for testing.</p>
<p>You can run the tests, including coverage, as follows:</p>
<div class="highlight-python"><pre>$ cd rosinstall
$ make test</pre>
</div>
</div>
<div class="section" id="documentation">
<h2>Documentation<a class="headerlink" href="#documentation" title="Permalink to this headline">¶</a></h2>
<p>Sphinx is used to provide API documentation for rosinstall.  The documents
are stored in the <tt class="docutils literal"><span class="pre">doc</span></tt> sub-directory.</p>
<p>You can build the docs as follows:</p>
<div class="highlight-python"><pre>$ cd rosinstall/doc
$ make html</pre>
</div>
</div>
<div class="section" id="inofficial-file-format">
<span id="inofficial-format"></span><h2>Inofficial file format<a class="headerlink" href="#inofficial-file-format" title="Permalink to this headline">¶</a></h2>
<p>The willow garage build system relies on these two extensions to the rosinstall file format.
Basic element types include &#8216;tar&#8217;, and meta properties can be attached.</p>
<p>Example:</p>
<div class="highlight-python"><pre>- svn:
  local-name: rosorg
  meta:
    repo-name: ros-docs
  uri: https://code.ros.org/svn/ros/stacks/rosorg/trunk
- tar:
  local-name: foo.tar.bvz2
  version: foo-1.2.0</pre>
</div>
<p>The meta element has no further semantics to rosinstall, it is just passed through.
The tar element is an unsupported but required feature of vcstools, with the peculiar
semantics that &#8216;version&#8217; must refer to a folder inside the tar root.</p>
</div>
</div>


      </div>
      <div class="bottomnav">
      
        <p>
        «&#160;&#160;<a href="rosinstall_file_format.html">rosinstall file format</a>
        &#160;&#160;::&#160;&#160;
        <a class="uplink" href="index.html">Contents</a>
        &#160;&#160;::&#160;&#160;
        <a href="modules.html">Packages</a>&#160;&#160;»
        </p>

      </div>

    <div class="footer">
        &copy; Copyright 2011, Willow Garage.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>