Skip to content

Commit 0816136

Browse files
committed
Generate version info from git tags
Use the "setuptools_scm" package to automatically generate the version of the package as well as the corresponding variable available in the code. This fixes issue #86 while still leaving open the Sphinx part.
1 parent 4ca7b3c commit 0816136

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

bioformats/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from __future__ import absolute_import, unicode_literals
1313

1414
try:
15-
from _version import __version__
15+
from ._version import version as __version__
1616
except ImportError:
1717
# We're running in a tree that doesn't have a _version.py, so we don't know what our version is.
1818
__version__ = "0.0.0"

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,8 @@
3939
"bioformats"
4040
],
4141
url="http://github.com/CellProfiler/python-bioformats/",
42-
version="1.4.0"
42+
setup_requires = ['setuptools_scm'],
43+
use_scm_version = {
44+
"write_to": "bioformats/_version.py",
45+
},
4346
)

0 commit comments

Comments
 (0)