title: Python project versioning
body: <h2>The problem:</h2>
  
  <p>I need to set versioning in my <code>python</code>project.<br>
  Every time I make a release - I merge my <strong>production</strong> and <strong>development</strong> branches in my VCS.<br>
  I need to make the least amount of corrections in setting up version of the project and automate the process.  </p>
  
  <h2>What I`ve done:</h2>
  
  <ul>
  <li>I`ve read <a href="http://www.python.org/dev/peps/pep-0396/" rel="noreferrer">PEP 396</a> about module versioning (it is not exactly what I need)  </li>
  <li>I figured out how to set up a version for the project with <code>setup.py</code> file in <a href="http://docs.python.org/2/distutils/setupscript.html" rel="noreferrer">this documentation</a></li>
  <li>I figured out how <code>django</code> works with its versions <a href="https://github.com/django/django/blob/master/django/__init__.py" rel="noreferrer">here</a>  </li>
  </ul>
  
  <h2>My next steps:</h2>
  
  <p>I need for my release:  </p>
  
  <ul>
  <li>release date  </li>
  <li>revision  </li>
  <li>version number  </li>
  </ul>
  
  <p>So I plan to make my release number format <code>major.minor.changeset</code>, because keeping the release date in the version makes it pretty long.
  I want to create <code>version.py</code> file:</p>
  
  <pre><code>MAJOR_VERSION = 1
  MINOR_VERSION = 1
  RELEASE_DATE = '28 .08.2013 '
  
  
  def get_revision ():
      ...
  
  def get_version ():
     ....
  </code></pre>
  
  <p>And import the version from there when I need it (but I'm affraid that someone can forget to set up proper date), and put the file <code>CHANGE.TXT</code> next to it which describes release changes.</p>
  
  <h2>The question:</h2>
  
  <p>I want to know how do you set versions in your <code>python</code> projects and how should I convert my idea to simplify my scheme.</p>