limscoder / amfast

An Adobe AMF serialization and RPC implementation for Python, written as a C extension for speed.
MIT License
5 stars 6 forks source link

Include version information in package #65

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice to provide version information in the package:

>>> amfast.__version__
'0.5.1'

If you want to get a little more complicated than just updating a version 
string,
Twisted has a nice Version class that pulls the svn revision if you are running 
from a 
checkout, so you get something like this:
>>> amfast.__version__
'0.5.1+r526'

The attached diff modifies setup.py to automatically pull in the current 
version info if you set 
it in amfast.__init__.py
Also included version.py (nicked from Twisted).

>>> import amfast
>>> amfast.version # this is a Version object
Version('amfast', 0, 5, 1)  # (SVN r526)
>>> print amfast.version
[amfast, version 0.5.1+r526]
>>> print amfast.__version__
'0.5.1+r526'
>>> amfast.version.base()
'0.5.1'

Original issue reported on code.google.com by simi...@gmail.com on 2 Jun 2010 at 2:03

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r528.

Original comment by dthomp...@gmail.com on 31 Jul 2010 at 4:11