Skip to content

Commit b5e02a1

Browse files
committed
usb1: Use versioneer.
1 parent 9c2f3d0 commit b5e02a1

6 files changed

Lines changed: 2363 additions & 1 deletion

File tree

.gitattributes

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

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ include examples/README
55
include examples/*.py
66
include testUSB1.py
77
include stdeb.cfg
8+
include versioneer.py
9+
include usb1/_version.py

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from codecs import open
1818
import os
1919
import sys
20+
import versioneer
2021

2122
long_description = open(
2223
os.path.join(os.path.dirname(__file__), 'README.rst'),
@@ -34,7 +35,8 @@
3435
description=next(x for x in long_description.splitlines() if x.strip()),
3536
long_description='.. contents::\n\n' + long_description,
3637
keywords='usb libusb',
37-
version='1.7',
38+
version=versioneer.get_version(),
39+
cmdclass=versioneer.get_cmdclass(),
3840
author='Vincent Pelletier',
3941
author_email='plr.vincent@gmail.com',
4042
url='http://github.com/vpelletier/python-libusb1',

usb1/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2714,3 +2714,7 @@ def __init__(self):
27142714
DeprecationWarning,
27152715
)
27162716
super(LibUSBContext, self).__init__()
2717+
2718+
from ._version import get_versions
2719+
__version__ = get_versions()['version']
2720+
del get_versions

0 commit comments

Comments
 (0)