Skip to content

Commit a11e7d4

Browse files
author
Roland Hedberg
committed
Put version information in src/jwkest/__init__.py
1 parent 56fd6d7 commit a11e7d4

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,19 @@
1616
#
1717

1818
import glob
19+
import re
1920

2021
from setuptools import setup
2122

2223
__author__ = 'rohe0002'
2324

25+
with open('src/jwkest/__init__.py', 'r') as fd:
26+
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
27+
fd.read(), re.MULTILINE).group(1)
28+
2429
setup(
2530
name="pyjwkest",
26-
version="1.0.4.beta",
31+
version=version,
2732
description="Python implementation of JWT, JWE, JWS and JWK",
2833
author="Roland Hedberg",
2934
author_email="roland.hedberg@adm.umu.se",

src/jwkest/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
from binascii import unhexlify
1515

16+
__version__ = "1.0.4.beta"
17+
1618
logger = logging.getLogger(__name__)
1719

1820
JWT_TYPES = (u"JWT", u"application/jws", u"JWS", u"JWE")

0 commit comments

Comments
 (0)