nncli

NextCloud Notes Command Line Interface
git clone git://git.danielmoch.com/nncli.git
Log | Files | Refs | LICENSE

commit cb75a1bccc96938602cd5db4886e9aaa9ffeaea9
parent 5aef3c0ffe698457c481f4007e7b58d03f88328d
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Sat, 11 Aug 2018 16:55:31 -0400

Use setuptools_scm for version info

Diffstat:
Mnnotes_cli/__init__.py | 11++++++++++-
Msetup.py | 3++-
2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/nnotes_cli/__init__.py b/nnotes_cli/__init__.py @@ -1,5 +1,14 @@ +try: + from . import version + __version__ = version.version +except ImportError: + try: + from setuptools_scm import get_version + __version__ = get_version(root='..', relative_to=__file__) + except: + __version__ = '??-dev' + __productname__ = 'nncli' -__version__ = '0.1.2-dev' __copyright__ = "Copyright (c) 2018 Daniel Moch" __author__ = "Daniel Moch" __author_email__ = "daniel@danielmoch.com" diff --git a/setup.py b/setup.py @@ -39,13 +39,14 @@ description=nnotes_cli.__description__, long_description=long_description, long_description_content_type="text/markdown", - version=nnotes_cli.__version__, author=nnotes_cli.__author__, author_email=nnotes_cli.__author_email__, url=nnotes_cli.__url__, license=nnotes_cli.__license__, requires=deps, install_requires=deps, + use_scm_version= {'write_to': 'nnotes_cli/version.py'}, + setup_requires=['setuptools_scm'], packages=['nnotes_cli'], entry_points={ 'console_scripts': [