Skip to content

Commit 4089157

Browse files
Merge pull request #863 from adamtheturtle/versioneer
Versioneer
2 parents 8a7e0ae + 0e0c690 commit 4089157

File tree

10 files changed

+2366
-2
lines changed

10 files changed

+2366
-2
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/vws/_version.py export-subst

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include versioneer.py
2+
include src/vws/_version.py

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ lint:
1717
yapf \
1818
--diff \
1919
--recursive \
20+
--exclude versioneer.py \
21+
--exclude src/vws/_version.py \
2022
.
2123

2224
.PHONY: fix-lint
@@ -30,9 +32,12 @@ fix-lint:
3032
--recursive \
3133
--remove-all-unused-imports \
3234
--remove-unused-variables \
35+
--exclude src/vws/_version.py,versioneer.py \
3336
.
3437
yapf \
3538
--in-place \
3639
--recursive \
40+
--exclude versioneer.py \
41+
--exclude src/vws/_version.py \
3742
.
3843
isort --recursive --apply

dev-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ pylint==2.1.1 # Lint
1919
pyroma==2.4 # Packaging best practices checker
2020
pytest-cov==2.6.0 # Measure code coverage
2121
pytest==3.8.2 # Test runners
22+
versioneer==0.18
2223
vulture==0.29
2324
yapf==0.24.0 # Automatic formatting for Python

pylintrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
# Add files or directories to the blacklist. They should be base names, not
1111
# paths.
12-
ignore=CVS
12+
ignore=CVS,
13+
versioneer.py,
14+
_version.py,
1315

1416
# Add files or directories matching the regex patterns to the blacklist. The
1517
# regex matches against base names, not paths.
@@ -96,6 +98,8 @@ disable=
9698
bad-whitespace,
9799
# Too difficult to please
98100
duplicate-code,
101+
# Let isort handle imports
102+
wrong-import-order,
99103

100104
[REPORTS]
101105

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,4 @@ ignore_errors = True
9898
# - D407
9999
# No blank line is needed after the last section
100100
ignore = D200,D202,D203,D205,D212,D400,D406,D407,D413
101+
match=(?!.*(versioneer|test_|_version)).*\.py

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Setup script for VWS Python, a wrapper for Vuforia's Web Services APIs."""
22

3+
import versioneer
34
from setuptools import find_packages, setup
45

56
# We use requirements.txt instead of just declaring the requirements here
@@ -17,7 +18,8 @@
1718

1819
setup(
1920
name='VWS Python',
20-
version='0.1',
21+
version=versioneer.get_version(), # type: ignore
22+
cmdclass=versioneer.get_cmdclass(), # type: ignore
2123
author='Adam Dangoor',
2224
author_email='adamdangoor@gmail.com',
2325
description='Interact with the Vuforia Web Services (VWS) API.',

src/vws/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@
77
__all__ = [
88
'VWS',
99
]
10+
11+
from ._version import get_versions
12+
__version__ = get_versions()['version'] # type: ignore
13+
del get_versions

0 commit comments

Comments
 (0)