On Mon, 12 Apr 2010, Bill Janssen wrote:

Andi Vajda <va...@apache.org> wrote:


On Mon, 12 Apr 2010, Bill Janssen wrote:

It would be helpful to have a variable jcc.VERSION initialized with the
jcc version, either as a string or a tuple sequence.

The following is already available. Is it good enough ?

  >>> from pkg_resources import require
  >>> require('jcc')
[JCC 2.5 
(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/JCC-2.5-py2.6-macosx-10.6-x86_64.egg)]
  >>> require('jcc')[0].parsed_version
('00000002', '00000005', '*final')

I believe this is another setuptools thing.  So, not really -- what if
you didn't use setuptools?

Ah yes, that could be.
Anyhow, I added a JCC_VERSION string to the modules using JCC. That string is the same as the version string, jcc_ver, used in JCC's setup.py.

   >>> import lucene
   >>> lucene.VERSION
   '3.1'
   >>> lucene.JCC_VERSION
   '2.5'

Andi..

Reply via email to