diff --git a/docs/conf.py b/docs/conf.py index e2002a8d..1bd00f7f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -53,7 +53,7 @@ # The short X.Y version. import re -with file(os.path.join(path_dir, 'intercom', 'intercom.py')) as init: +with open(os.path.join(path_dir, 'intercom', 'intercom.py')) as init: source = init.read() m = re.search("__version__ = '(\d+\.\d+\.\d+)'", source, re.M) version = m.groups()[0] diff --git a/setup.py b/setup.py index 7f2d57e9..295f201f 100644 --- a/setup.py +++ b/setup.py @@ -10,9 +10,9 @@ from setuptools import find_packages from setuptools import setup -with file(os.path.join('intercom', 'intercom.py')) as init: +with open(os.path.join('intercom', '__init__.py')) as init: source = init.read() - m = re.search("__version__ = '(\d+\.\d+\.\d+)'", source, re.M) + m = re.search("__version__ = '(.+)'", source, re.M) __version__ = m.groups()[0] setup(