Do not load the eopayment to read the version, do it textually using regular expressions

This commit is contained in:
Benjamin Dauvergne 2012-01-31 10:59:10 +01:00
parent d4d1e7610f
commit 40a4e5ffa1
1 changed files with 7 additions and 2 deletions

View File

@ -6,10 +6,15 @@ Setup script for eopayment
import distutils
import distutils.core
import eopayment
import re
def get_version():
text = file('eopayment/__init__.py').read()
m = re.search("__version__ = ['\"](.*)['\"]", text)
return m.group(1)
distutils.core.setup(name='eopayment',
version=eopayment.__version__,
version=get_version(),
license='GPLv3 or later',
description='Common API to use all French online payment credit card processing services',
long_description=