/usr/share/doc/python-fedmsg-doc/html/development.html is in python-fedmsg-doc 0.7.1-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 | <!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>Development — Fedora Messaging documentation</title>
<link rel="stylesheet" href="_static/site.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '',
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="Fedora Messaging documentation" href="index.html" />
<link rel="next" title="Deployment" href="deployment.html" />
<link rel="prev" title="Frequently Asked Questions" href="FAQ.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="deployment.html" title="Deployment"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="FAQ.html" title="Frequently Asked Questions"
accesskey="P">previous</a> |</li>
<li><a href="index.html">Fedora Messaging documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="development">
<h1>Development<a class="headerlink" href="#development" title="Permalink to this headline">¶</a></h1>
<div class="section" id="using-a-virtualenv">
<h2>Using a virtualenv<a class="headerlink" href="#using-a-virtualenv" title="Permalink to this headline">¶</a></h2>
<p>Although you don’t strictly <em>have</em> to, you should use
<a class="reference external" href="http://virtualenvwrapper.rtfd.org">virtualenvwrapper</a> for isolating your
development environment. It is to your benefit because you’ll be able to
install the latest fedmsg from a git checkout without messing with your system
fedmsg install (if you have one). The instructions here will assume you are
using that.</p>
<p>You can install it with:</p>
<div class="highlight-python"><pre>$ sudo yum install python-virtualenvwrapper</pre>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If you decide not to use python-virtualenvwrapper, you can always use
latest update of fedmsg in fedora. If you are doing this, simply ignore all
<tt class="docutils literal"><span class="pre">mkvirtualenv</span></tt> and <tt class="docutils literal"><span class="pre">workon</span></tt> commands in these instructions. You can
install fedmsg with <tt class="docutils literal"><span class="pre">sudo</span> <span class="pre">yum</span> <span class="pre">install</span> <span class="pre">fedmsg</span></tt>.</p>
</div>
</div>
<div class="section" id="development-dependencies">
<h2>Development Dependencies<a class="headerlink" href="#development-dependencies" title="Permalink to this headline">¶</a></h2>
<p>Get:</p>
<div class="highlight-python"><pre>$ sudo yum install python-virtualenv openssl-devel zeromq-devel gcc</pre>
</div>
</div>
<div class="section" id="cloning-the-upstream-git-repo">
<h2>Cloning the Upstream Git Repo<a class="headerlink" href="#cloning-the-upstream-git-repo" title="Permalink to this headline">¶</a></h2>
<p>The source code is on github. For read-only access, simply:</p>
<div class="highlight-python"><pre>$ git clone git://github.com/fedora-infra/fedmsg.git</pre>
</div>
<p>Of course, you may want to do the usual <a class="reference external" href="https://help.github.com/articles/fork-a-repo">fork and then clone</a> pattern if you intend to
submit patches/pull-requests (please do!).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If submitting patches, you should check <a class="reference internal" href="contributing.html"><em>Contributing</em></a> for
style guidelines.</p>
</div>
</div>
<div class="section" id="setting-up-your-virtualenv">
<h2>Setting up your virtualenv<a class="headerlink" href="#setting-up-your-virtualenv" title="Permalink to this headline">¶</a></h2>
<p>Create a new, empty virtualenv and install all the dependencies from <a class="reference external" href="http://pypi.python.org">pypi</a>:</p>
<div class="highlight-python"><pre>$ cd fedmsg
$ mkvirtualenv fedmsg
(fedmsg)$ python setup.py develop</pre>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If the mkvirtualenv command is unavailable try
<tt class="docutils literal"><span class="pre">source</span> <span class="pre">/usr/bin/virtualenvwrapper.sh</span></tt> on Fedora (if you do not run Fedora
you might have to adjust the command a little).</p>
</div>
<p>You should also run the tests, just to make sure everything is sane:</p>
<div class="highlight-python"><pre>(fedmsg)$ python setup.py test</pre>
</div>
</div>
<div class="section" id="try-out-the-shell-commands">
<h2>Try out the shell commands<a class="headerlink" href="#try-out-the-shell-commands" title="Permalink to this headline">¶</a></h2>
<p>Having set up your environment in the <cite>Hacking</cite> section above, open up three
terminals. In each of them, activate your virtualenv with:</p>
<div class="highlight-python"><pre>$ workon fedmsg</pre>
</div>
<p>and in one, type:</p>
<div class="highlight-python"><pre>(fedmsg)$ fedmsg-relay</pre>
</div>
<p>In the second, type:</p>
<div class="highlight-python"><pre>(fedmsg)$ fedmsg-tail --really-pretty</pre>
</div>
<p>In the third, type:</p>
<div class="highlight-python"><pre>(fedmsg)$ echo "Hello, world" | fedmsg-logger</pre>
</div>
<p>And you should see the message appear in the <tt class="docutils literal"><span class="pre">fedmsg-tail</span></tt> term.</p>
</div>
<div class="section" id="configuration">
<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
<p>There is a folder in the root of the upstream git checkout named <tt class="docutils literal"><span class="pre">fedmsg.d/</span></tt>.
<a class="reference internal" href="config.html#module-fedmsg.config" title="fedmsg.config"><tt class="xref py py-mod docutils literal"><span class="pre">fedmsg.config</span></tt></a> will try to read this whenever the fedmsg API is
invoked. If you’re starting a new project like a consumer or a webapp that is
sending fedmsg messages, you’ll need to copy the <tt class="docutils literal"><span class="pre">fedmsg.d/</span></tt> directory to the
root directory of that project. In <a class="reference internal" href="deployment.html"><em>Deployment</em></a>, that folder is kept in
<tt class="docutils literal"><span class="pre">/etc/fedmsg.d/</span></tt>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Watch out: if you have a <tt class="docutils literal"><span class="pre">/etc/fedmsg.d/</span></tt> folder and a local
<tt class="docutils literal"><span class="pre">./fedmsg.d/</span></tt>, fedmsg will read both. Global first, and then local.
Local values will overwrite system-wide ones.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The tutorial on <a class="reference external" href="http://threebean.org/blog/fedmsg-tutorial-consuming-fas-stg">consuming FAS messages from stg</a> might be of
further help. It was created before these instructions were written.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper"><h1 class='fedmsg-logo'><span></span>fedmsg</h1>
<iframe src="http://ghbtns.com/github-btn.html?user=fedora-infra&repo=fedmsg&type=watch&count=true&size=large"
allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Development</a><ul>
<li><a class="reference internal" href="#using-a-virtualenv">Using a virtualenv</a></li>
<li><a class="reference internal" href="#development-dependencies">Development Dependencies</a></li>
<li><a class="reference internal" href="#cloning-the-upstream-git-repo">Cloning the Upstream Git Repo</a></li>
<li><a class="reference internal" href="#setting-up-your-virtualenv">Setting up your virtualenv</a></li>
<li><a class="reference internal" href="#try-out-the-shell-commands">Try out the shell commands</a></li>
<li><a class="reference internal" href="#configuration">Configuration</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="FAQ.html"
title="previous chapter">Frequently Asked Questions</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="deployment.html"
title="next chapter">Deployment</a></p><h3>Edit this document</h3>
<p>Go to <a href="https://github.com/fedora-infra/fedmsg/blob/develop/doc/development.rst">Development</a>
on GitHub.
</p>
<p>Use the web interface to <b>fork</b> the repo, <b>edit</b> the file, and
<b>send a pull request</b>.</p>
<p>Your changes will be queued for review under project's
<a href="https://github.com/fedora-infra/fedmsg/pulls">Pull requests</a> tab on
Github.</p>
</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="deployment.html" title="Deployment"
>next</a> |</li>
<li class="right" >
<a href="FAQ.html" title="Frequently Asked Questions"
>previous</a> |</li>
<li><a href="index.html">Fedora Messaging documentation</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2012 Red Hat, Inc. and others..
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
<a href="http://github.com/fedora-infra/fedmsg">
<img style="position: absolute; top: 0; right: 0; border: 0;"
src="https://a248.e.akamai.net/camo.github.com/7afbc8b248c68eb468279e8c17986ad46549fb71/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67"
alt="Fork me on GitHub">
</a>
</body>
</html>
|