Skip to content

Commit 7e21e85

Browse files
centralized version information
1 parent cf7207e commit 7e21e85

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
VERSION=0.0.7
21
MAIN=things
32
SRC_CORE=things
43
SRC_TEST=tests
@@ -10,6 +9,7 @@ PIPENV=pipenv
109
PDOC=pdoc
1110

1211
DATE:=$(shell date +"%Y-%M-%d")
12+
VERSION=$(shell python3 -c 'import things; print(things.__version__)')
1313

1414
help: ## Print help for each target
1515
$(info Things low-level Python API.)
@@ -49,8 +49,9 @@ clean: ## Cleanup
4949
@find . -name __pycache__ -delete
5050
@rm -rf htmlcov
5151
@rm -rf build dist *.egg-info
52-
@rm -rf .mypy_cache/
52+
@rm -rf .mypy_cache/ */.mypy_cache/
5353
@rm -f .coverage
54+
@rm -rf .tox
5455

5556
auto-style: ## Style the code
5657
@if type black >/dev/null 2>&1 ; then black $(SRC_CORE) ; \

tox.ini renamed to setup.cfg

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
[metadata]
2+
version = attr: things.__version__
3+
14
[pycodestyle]
2-
max-line-length = 88
5+
max_line_length = 88
36
ignore = E501,E203,W503
47

58
[flake8]

setup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def package_files(directory):
2020
AUTHOR_MAIL = "[email protected]"
2121
DESCRIPTON = "A simple Python 3 library to read your Things app data."
2222
URL = "https://github.com/thingsapi/things.py"
23-
VERSION = "0.0.7"
2423
DATA_FILES = package_files("")
2524
OPTIONS = {
2625
"argv_emulation": False,
@@ -47,7 +46,6 @@ def package_files(directory):
4746
"Natural Language :: English",
4847
],
4948
python_requires=">=3.6",
50-
version=VERSION,
5149
data_files=DATA_FILES,
5250
options={"py2app": OPTIONS},
5351
setup_requires=["py2app"],

things/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
"""A simple Python 3 library to read your Things app data."""
22

3+
__author__ = ["Alexander Willner", "Michael Belfrage"]
4+
__copyright__ = "2021 Alexander Willner & Michael Belfrage"
5+
__credits__ = ["Alexander Willner", "Michael Belfrage"]
6+
__license__ = "Apache License 2.0"
7+
__version__ = "0.0.8.dev"
8+
__maintainer__ = ["Alexander Willner", "Michael Belfrage"]
9+
__email__ = "[email protected]"
10+
__status__ = "Development"
11+
312
from things.api import ( # noqa
413
anytime,
514
areas,

things/api.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
Module implementing Things API.
55
"""
66

7-
__version__ = "0.0.7"
8-
97
import os
108
from shlex import quote
119
import sys

things/database.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@
99

1010
from __future__ import print_function
1111

12-
__author__ = "Alexander Willner"
13-
__copyright__ = "2020 Alexander Willner"
14-
__credits__ = ["Alexander Willner"]
15-
__license__ = "Apache License 2.0"
16-
__version__ = "0.0.7"
17-
__maintainer__ = "Alexander Willner"
18-
__email__ = "[email protected]"
19-
__status__ = "Development"
20-
2112
import datetime
2213
import os
2314
import plistlib

0 commit comments

Comments
 (0)