diff --git a/README.md b/README.md index f532bb170..f4c150c16 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ pip install uavcan In order to deploy to PyPI via CI, do this: -1. Update the version number in `setup.py`, e.g. `1.0.0`. +1. Update the version number in `version.py`, e.g. `1.0.0`. 2. Create a new tag with the same version number, e.g. `git tag -a 1.0.0 -m "My release 1.0.0"` 3. Push to master. diff --git a/setup.py b/setup.py index 05d8cefdd..d709548c1 100755 --- a/setup.py +++ b/setup.py @@ -12,9 +12,14 @@ import sys from setuptools import setup +__version__ = None +VERSION_FILE = os.path.join(os.path.dirname(__file__), 'uavcan', 'version.py') +exec(open(VERSION_FILE).read()) # Adds __version__ to globals + + args = dict( name='uavcan', - version='1.0.0dev10', + version=__version__, description='Python implementation of the UAVCAN protocol stack', packages=[ 'uavcan', diff --git a/uavcan/__init__.py b/uavcan/__init__.py index 6508fc8de..51f1b3491 100644 --- a/uavcan/__init__.py +++ b/uavcan/__init__.py @@ -42,6 +42,7 @@ class UAVCANException(Exception): pass +from .version import __version__ import uavcan.node as node from uavcan.node import make_node import uavcan.dsdl as dsdl diff --git a/uavcan/version.py b/uavcan/version.py new file mode 100644 index 000000000..771633afa --- /dev/null +++ b/uavcan/version.py @@ -0,0 +1,10 @@ +# +# Copyright (C) 2014-2016 UAVCAN Development Team +# +# This software is distributed under the terms of the MIT License. +# +# Author: Pavel Kirienko +# Ben Dyer +# + +__version__ = '1.0.0.dev11'