Skip to content

Commit bfaaa61

Browse files
committed
bump version to 0.3.0
1 parent 2f26726 commit bfaaa61

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

apds9960/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
from apds9960.device import APDS9960, uAPDS9960
22

33
__all__ = [ 'APDS9960', 'uAPDS9960', ]
4+
__version__ = '0.3.0'

setup.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@
22

33
from distutils.core import setup
44

5+
def version():
6+
with open("apds9960/__init__.py") as fd:
7+
for line in fd:
8+
if line.startswith('__version__'):
9+
delim = '"' if '"' in line else "'"
10+
return line.split(delim)[1]
11+
raise RuntimeError("Unable to find version string.")
12+
513
setup(
614
name = 'apds9960',
715
packages = ['apds9960'],
8-
version = '0.2',
16+
version = version(),
917
description = 'Python APDS-9960 Library',
1018
author = 'Thomas Liske',
1119
author_email = 'thomas@fiasko-nw.net',

0 commit comments

Comments
 (0)