Skip to content

Commit

Permalink
Updated versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickBaus committed Jul 15, 2021
1 parent 9b1a6e0 commit ec17452
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
import re
from setuptools import setup

with open('README.md', 'r') as f:
long_description = f.read()

# Read the version information from the verion file
VERSION_FILE="tinkerforge_async/_version.py"
VERSION_REGEX = r'^__version__ = [\'"]([^\'"]+)[\'"]$'
with open(VERSION_FILE, 'r') as f:
version = f.read()
result = re.search(VERSION_REGEX, version, re.M)
if result:
version = result.group(1)
else:
raise RuntimeError('No version string found in file %s.', VERSION_FILE)

setup(
name='tinkerforge_async',
version='1.1.4',
version=version,
author='Patrick Baus',
author_email='[email protected]',
url='https://github.com/PatrickBaus/TinkerforgeAsync',
Expand Down
2 changes: 1 addition & 1 deletion tinkerforge_async/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from _version import __version__

0 comments on commit ec17452

Please sign in to comment.