Skip to content

Commit 81e5bfa

Browse files
author
huyng
authored
Merge pull request #11 from yahoo/fix_versioning
Fix versioning
2 parents af0f7b2 + fbde27c commit 81e5bfa

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

graphkit/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Licensed under the terms of the Apache License, Version 2.0. See the LICENSE file associated with the project for terms.
33

44
__author__ = 'hnguyen'
5+
__version__ = '1.2.2'
56

67
from .functional import operation, compose
78

setup.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/usr/bin/env python
22
# Copyright 2016, Yahoo Inc.
33
# Licensed under the terms of the Apache License, Version 2.0. See the LICENSE file associated with the project for terms.
4-
54
import os
5+
import re
6+
import io
67
from setuptools import setup
78

89
LONG_DESCRIPTION = """
@@ -13,15 +14,14 @@
1314
and many other domains.
1415
"""
1516

16-
# Grab the version as the tag name from the Travis build, or else use a default.
17-
if os.path.isfile('VERSION'):
18-
VERSION = open('VERSION').read()
19-
else:
20-
VERSION = os.environ.get('TRAVIS_TAG', '1.1')
17+
# Grab the version using convention described by flask
18+
# https://github.com/pallets/flask/blob/master/setup.py#L10
19+
with io.open('graphkit/__init__.py', 'rt', encoding='utf8') as f:
20+
version = re.search(r'__version__ = \'(.*?)\'', f.read()).group(1)
2121

2222
setup(
2323
name='graphkit',
24-
version=VERSION,
24+
version=version,
2525
description='Lightweight computation graphs for Python',
2626
long_description=LONG_DESCRIPTION,
2727
author='Huy Nguyen, Arel Cordero, Pierre Garrigues, Rob Hess, Tobi Baumgartner, Clayton Mellina',

0 commit comments

Comments
 (0)