Edgewall Software

Opened 9 years ago

Closed 9 years ago

Last modified 4 years ago

#103 closed defect (fixed)

Genshi doesn't export version information

Reported by: techie Owned by: cmlenz
Priority: trivial Milestone: 0.4
Component: General Version: 0.3.6
Keywords: Cc:


>>> import genshi
>>> genshi.__version__
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute '__version__'

Attachments (0)

Change History (2)

comment:1 Changed 9 years ago by cmlenz

If you have setuptools, and have installed Genshi using setuptools (which is the default when setuptools is found when you run setup.py), you can do:

import pkg_resources

This could probably be done in __init__.py, but I'm not sure what to do when Genshi is installed without setuptools—which is still an option.

comment:2 Changed 9 years ago by cmlenz

  • Resolution set to fixed
  • Status changed from new to closed

[516] adds the __version__ attribute for a setuptools-based install. I don't really want to have multiple places to change the version number, so this will have to do for now.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain cmlenz.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.