forked from orbit-oss/flask
Avoid duplication of version info
This commit is contained in:
parent
eb2a4521ff
commit
85b20f8d49
1 changed files with 11 additions and 3 deletions
14
setup.py
14
setup.py
|
|
@ -42,13 +42,21 @@ Links
|
||||||
<http://github.com/mitsuhiko/flask/zipball/master#egg=Flask-dev>`_
|
<http://github.com/mitsuhiko/flask/zipball/master#egg=Flask-dev>`_
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from __future__ import print_function
|
import re
|
||||||
from setuptools import Command, setup
|
import ast
|
||||||
|
from setuptools import setup
|
||||||
|
|
||||||
|
|
||||||
|
_version_re = re.compile(r'__version__\s+=\s+(.*)')
|
||||||
|
|
||||||
|
with open('flask/__init__.py', 'rb') as f:
|
||||||
|
version = str(ast.literal_eval(_version_re.search(
|
||||||
|
f.read().decode('utf-8')).group(1)))
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='Flask',
|
name='Flask',
|
||||||
version='0.11.dev0',
|
version=version,
|
||||||
url='http://github.com/mitsuhiko/flask/',
|
url='http://github.com/mitsuhiko/flask/',
|
||||||
license='BSD',
|
license='BSD',
|
||||||
author='Armin Ronacher',
|
author='Armin Ronacher',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue