Setting package-wide variables during python setup.py install
<p>Is there a way that when a user types</p>

<pre><code>python setup.py install
</code></pre>

<p>to install a Python package, <code>setup.py</code> can be made to set specific variables at the base of the pacakge? A common example would be to basically set <code>mypackage.__revision__</code> to be the svn revision of the checkout if one is working from svn. Another example case would be if the user can choose a global option, so that the option <code>mypackage.__option__</code> be set according to a flag passed to setup.py, e.g.</p>

<pre><code>python setup.py install --set-flag=10
</code></pre>

<p>Then when using the package, <code>mypackage.__option__</code> would equal <code>10</code>.</p>
