Skip to content

Commit bf7ef77

Browse files
author
Roland Hedberg
committed
Made version spec part of saml2/init.py .
1 parent cc3d682 commit bf7ef77

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env python
2+
import re
23

34
import sys
45

@@ -45,9 +46,14 @@ def run_tests(self):
4546
#'pytest-coverage',
4647
]
4748

49+
version = ''
50+
with open('src/saml2/__init__.py', 'r') as fd:
51+
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
52+
fd.read(), re.MULTILINE).group(1)
53+
4854
setup(
4955
name='pysaml2',
50-
version='3.0.1a',
56+
version=version,
5157
description='Python implementation of SAML Version 2',
5258
# long_description = read("README"),
5359
author='Roland Hedberg',

src/saml2/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
provides methods and functions to convert SAML classes to and from strings.
1818
"""
1919

20+
__version__ = "3.0.1a"
2021

2122
import logging
2223
import six

0 commit comments

Comments
 (0)