Skip to content

Commit

Permalink
Merge pull request #17 from WouterToering/fix_broken_release
Browse files Browse the repository at this point in the history
Use python module for version information
  • Loading branch information
WouterToering authored Nov 13, 2020
2 parents 5731260 + 7702090 commit e7f6283
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

5 changes: 2 additions & 3 deletions bynder_sdk/util.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
with open('VERSION') as fh:
SDK_VERSION = fh.read().strip()
from bynder_sdk.version import VERSION

UA_HEADER = {
'User-Agent': 'bynder-python-sdk/{}'.format(SDK_VERSION)
'User-Agent': 'bynder-python-sdk/{}'.format(VERSION)
}


Expand Down
1 change: 1 addition & 0 deletions bynder_sdk/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION = '1.1.4'
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@

from setuptools import find_packages, setup

with open("VERSION") as fh:
__version__ = fh.read().strip()
with open('bynder_sdk/version.py', 'r', encoding='utf-8') as version_file:
version = re.search(
r'VERSION = [\'"]([^\'"]+)', version_file.read(), re.MULTILINE
).group(1)

with open("README.md", 'r') as readme:
LONG_DESC = readme.read()

build_version = __version__
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)

Expand Down Expand Up @@ -134,7 +135,7 @@ def run(self):

setup(
name='bynder-sdk',
version=build_version,
version=version,
description=(
'Bynder SDK can be used to speed up the'
' integration of Bynder in Python'
Expand Down

0 comments on commit e7f6283

Please sign in to comment.