diff --git a/.git_archival.txt b/.git_archival.txt new file mode 100644 index 0000000..95cb3ee --- /dev/null +++ b/.git_archival.txt @@ -0,0 +1 @@ +ref-names: $Format:%D$ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..00a7b00 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.git_archival.txt export-subst diff --git a/setup.py b/setup.py index 1e95d9e..b06ae73 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,4 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst -from tables3_api import __version__ - from setuptools import setup try: @@ -12,7 +10,8 @@ author='Jean Connelly, Tom Aldcroft', description='pytables 2 to 3 compatibility methods', author_email='jconnelly@cfa.harvard.edu', - version=__version__, + use_scm_version=True, + setup_requires=['setuptools_scm', 'setuptools_scm_git_archive'], zip_safe=False, packages=['tables3_api', 'tables3_api.tests'], tests_require=['pytest'], diff --git a/tables3_api/__init__.py b/tables3_api/__init__.py index 410136e..e35de8e 100644 --- a/tables3_api/__init__.py +++ b/tables3_api/__init__.py @@ -1,8 +1,9 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst import tables from distutils.version import LooseVersion +import ska_helpers -__version__ = 0.1 +__version__ = ska_helpers.get_version(__package__) def test(*args, **kwargs):