Skip to content

Commit

Permalink
Ditch git based version number, closes #57
Browse files Browse the repository at this point in the history
  • Loading branch information
dschep committed May 13, 2016
1 parent 46741b9 commit 65d1286
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
6 changes: 1 addition & 5 deletions ntfy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import pkg_resources
import logging
from importlib import import_module

try:
__version__ = pkg_resources.get_distribution(__name__).version
except:
__version__ = 'unknown'
__version__ = '2.0.1'


def notify(message, title, config=None, **kwargs):
Expand Down
17 changes: 4 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from setuptools import setup, find_packages
from subprocess import check_output, CalledProcessError
from sys import version_info

from ntfy import __version__


deps = ['requests', 'ruamel.yaml', 'appdirs']
extra_deps = {
':sys_platform == "win32"': ['pypiwin32==219'],
Expand All @@ -12,22 +14,11 @@
}
test_deps = ['mock', 'sleekxmpp', 'emoji', 'psutil']

try:
version_output = check_output(['git', 'describe', '--match=v*.*.*'])
except (OSError, CalledProcessError):
version = None
else:
version_parts = version_output.decode().strip().lstrip('v').split('-')
if len(version_parts) <= 2:
version = '-'.join(version_parts)
elif len(version_parts) > 1:
version = '-'.join(version_parts[:-1])


setup(
name='ntfy',

version=version,
version=__version__,

description='A utility for sending push notifications',

Expand Down

0 comments on commit 65d1286

Please sign in to comment.