From bf7ef77cb24d4de7e1892dd647ef6fecaf69c9de Mon Sep 17 00:00:00 2001 From: Roland Hedberg Date: Thu, 3 Sep 2015 07:02:46 +0200 Subject: [PATCH] Made version spec part of saml2/init.py . --- setup.py | 8 +++++++- src/saml2/__init__.py | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 146faa5..682daa2 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +import re import sys @@ -45,9 +46,14 @@ tests_require = [ #'pytest-coverage', ] +version = '' +with open('src/saml2/__init__.py', 'r') as fd: + version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + setup( name='pysaml2', - version='3.0.1a', + version=version, description='Python implementation of SAML Version 2', # long_description = read("README"), author='Roland Hedberg', diff --git a/src/saml2/__init__.py b/src/saml2/__init__.py index 1167d04..7fbdd1a 100644 --- a/src/saml2/__init__.py +++ b/src/saml2/__init__.py @@ -17,6 +17,7 @@ provides methods and functions to convert SAML classes to and from strings. """ +__version__ = "3.0.1a" import logging import six