diff --git a/setup.py b/setup.py index 54926ac..1f6fda5 100644 --- a/setup.py +++ b/setup.py @@ -15,12 +15,25 @@ # You should have received a copy of the GNU Lesser General Public License # along with Postorius. If not, see . +import re +import sys from setuptools import setup, find_packages +# Calculate the version number without importing the postorius package. +with open('src/postorius/__init__.py') as fp: + for line in fp: + mo = re.match("__version__ = '(?P[^']+?)'", line) + if mo: + __version__ = mo.group('version') + break + else: + print('No version number found') + sys.exit(1) + setup( name="postorius", - version='1.1.0', + version=__version__, description="A web user interface for GNU Mailman", long_description=open('README.rst').read(), maintainer="The Mailman GSOC Coders", @@ -29,7 +42,7 @@ url=" https://gitlab.com/mailman/postorius", classifiers=[ "Programming Language :: Python", - ], + ], packages=find_packages('src'), package_dir={'': 'src'}, include_package_data=True, diff --git a/src/postorius/__init__.py b/src/postorius/__init__.py index 3ad2e92..a22762b 100644 --- a/src/postorius/__init__.py +++ b/src/postorius/__init__.py @@ -18,5 +18,5 @@ from __future__ import absolute_import, unicode_literals -__version__ = '1.1.0' +__version__ = '1.1.1' default_app_config = 'postorius.apps.PostoriusConfig'