diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2016-01-13 22:37:16 +0100 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2016-01-13 22:37:16 +0100 |
commit | f134ff7ab32ab3e2de3a00db4db63e798cb32052 (patch) | |
tree | e30fd0f73ee3cdc52deeb967b85a2a83094e5e26 | |
parent | 76bf87b1f0104bd554f2c5886f9b6c626d20250a (diff) | |
download | markupsafe-f134ff7ab32ab3e2de3a00db4db63e798cb32052.tar.gz |
Only mention version once
-rw-r--r-- | markupsafe/__init__.py | 2 | ||||
-rw-r--r-- | setup.py | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/markupsafe/__init__.py b/markupsafe/__init__.py index ae4a118..68dc85f 100644 --- a/markupsafe/__init__.py +++ b/markupsafe/__init__.py @@ -14,7 +14,7 @@ from collections import Mapping from markupsafe._compat import text_type, string_types, int_types, \ unichr, iteritems, PY2 -__version__ = "0.23" +__version__ = "1.0" __all__ = ['Markup', 'soft_unicode', 'escape', 'escape_silent'] @@ -1,4 +1,6 @@ import os +import re +import ast import sys from setuptools import setup, Extension, Feature from distutils.command.build_ext import build_ext @@ -12,11 +14,15 @@ from distutils.errors import CCompilerError, DistutilsExecError, \ is_jython = 'java' in sys.platform is_pypy = hasattr(sys, 'pypy_version_info') +with open('markupsafe/__init__.py') as f: + version = ast.literal_eval(re.search( + '^__version__\s+=\s+(.*?)$(?sm)', f.read()).group(1)) + speedups = Feature( 'optional C speed-enhancement module', standard=True, - ext_modules = [ + ext_modules=[ Extension('markupsafe._speedups', ['markupsafe/_speedups.c']), ], ) @@ -71,7 +77,7 @@ def run_setup(with_binary): features['speedups'] = speedups setup( name='MarkupSafe', - version='0.23', + version=version, url='http://github.com/mitsuhiko/markupsafe', license='BSD', author='Armin Ronacher', |