fix setup.py with new __init__.py boilerplate

This commit is contained in:
Justin Davis 2013-12-05 13:17:23 -08:00
parent 2e36e0c910
commit 79596dc613

View File

@ -12,7 +12,7 @@ def get_version(package):
Return package version as listed in `__version__` in `init.py`.
"""
init_py = open(os.path.join(package, '__init__.py')).read()
return re.match("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
def get_packages(package):