Skip to content

Commit 3cd1f82

Browse files
authored
Added versioneer to better manage the versions (#124)
* Added versioneer to better manage the versions
1 parent f83594f commit 3cd1f82

File tree

9 files changed

+2364
-8
lines changed

9 files changed

+2364
-8
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
picoscope/_version.py export-subst

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ python:
55
- "3.6"
66
- "3.7-dev"
77

8-
install: pip install flake8
8+
install: pip install flake8 versioneer
99

1010
script:
1111
- flake8 picoscope setup.py

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
include README.md
22
include LICENSE.md
33
include examples/*.py
4+
include versioneer.py
5+
include picoscope/_version.py

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,7 @@ Alternatively, you can follow more thorough instructions
102102
[here](http://scikit-image.org/docs/dev/contribute.html).
103103

104104
# Developer notes
105-
To update versions, change it in `picoscope/__init__.py`, `__version__ = "X.Y.Z"`
106-
107-
Once the versions have been updated, commit and create a new tag with git
105+
Commit and create a new tag with git
108106
```
109107
git commit
110108
git tag -a X.Y.Z -m "Short descriptive message"
@@ -120,4 +118,5 @@ or to push all tags
120118
git push --tags
121119
```
122120

121+
[versioneer](https://github.com/warner/python-versioneer) takes care of updating the version.
123122
New tags will be pushed to PyPi automatically by Travis.

picoscope/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
__author__ = "Colin O'Flynn, Mark Harfouche"
22
__license__ = "FreeBSD"
3-
__version__ = "0.7.1"
43

54
__all__ = ["ps2000",
65
"ps2000a",
@@ -10,3 +9,7 @@
109
"ps4000a",
1110
"ps5000a",
1211
"ps6000"]
12+
13+
from ._version import get_versions
14+
__version__ = get_versions()['version']
15+
del get_versions

0 commit comments

Comments
 (0)