Skip to content

Commit

Permalink
deduplicate version info
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Feb 6, 2015
1 parent 781e00e commit d09edda
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion setup.py
Expand Up @@ -35,12 +35,21 @@
.. _Jinja2 webpage: http://jinja.pocoo.org/
.. _documentation: http://jinja.pocoo.org/2/documentation/
"""
import re
import ast
from setuptools import setup


_version_re = re.compile(r'__version__\s+=\s+(.*)')

with open('jinja2/__init__.py', 'rb') as f:
version = str(ast.literal_eval(_version_re.search(
f.read().decode('utf-8')).group(1)))


setup(
name='Jinja2',
version='2.8.dev0',
version=version,
url='http://jinja.pocoo.org/',
license='BSD',
author='Armin Ronacher',
Expand Down

0 comments on commit d09edda

Please sign in to comment.