Skip to content

Commit 3d95f44

Browse files
committed
Add version.py
1 parent 853eb1b commit 3d95f44

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Diff for: setup.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
from __future__ import with_statement
23

34
# http://docs.python.org/distutils/
45
# http://packages.python.org/distribute/
@@ -7,10 +8,18 @@
78
except:
89
from distutils.core import setup
910

11+
import os.path
12+
13+
version_py = os.path.join(os.path.dirname(__file__), 'usbtmc', 'version.py')
14+
with open(version_py, 'r') as f:
15+
d = dict()
16+
exec(f.read(), d)
17+
version = d['__version__']
18+
1019
setup(
1120
name = 'python-usbtmc',
1221
description = 'Python USBTMC driver for controlling instruments over USB',
13-
version = '0.1',
22+
version = version,
1423
long_description = '''This Python package supports the USBTMC instrument
1524
control protocol for controlling instruments over USB.''',
1625
author = 'Alex Forencich',

Diff for: usbtmc/version.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '0.5'

0 commit comments

Comments
 (0)