Skip to content

Commit 3d141de

Browse files
committed
use versioneer
1 parent 078f840 commit 3d141de

File tree

7 files changed

+2364
-5
lines changed

7 files changed

+2364
-5
lines changed

.gitattributes

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

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
recursive-include stdlib_list/lists *.txt
22
include README.rst
33
include LICENSE
4+
include versioneer.py
5+
include stdlib_list/_version.py

setup.cfg

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# See the docstring in versioneer.py for instructions. Note that you must
2+
# re-run 'versioneer.py setup' after changing this section, and commit the
3+
# resulting files.
4+
5+
[versioneer]
6+
VCS = git
7+
style = pep440
8+
versionfile_source = stdlib_list/_version.py
9+
versionfile_build = stdlib_list/_version.py
10+
tag_prefix = v
11+
parentdir_prefix =

setup.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import setuptools
2-
from stdlib_list._version import __version__
2+
3+
import versioneer
34

45

56
try:
@@ -15,10 +16,11 @@
1516
author='Jack Maney',
1617
author_email='[email protected]',
1718
url='https://github.com/jackmaney/python-stdlib-list',
18-
version=__version__,
19+
version=versioneer.get_version(),
1920
extras_require={"develop": ["sphinx"]},
2021
description='A list of Python Standard Libraries (2.6-7, 3.2-6).',
2122
long_description=long_description,
2223
include_package_data=True,
23-
packages=setuptools.find_packages()
24+
packages=setuptools.find_packages(),
25+
cmdclass=versioneer.get_cmdclass(),
2426
)

stdlib_list/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
from ._version import __version__
1+
from ._version import get_versions
2+
__version__ = get_versions()['version']
3+
del get_versions
24

35
# Import all the things that used to be in here for backwards-compatibility reasons
46
from .base import stdlib_list, get_canonical_version, short_versions, long_versions, base_dir, list_dir

0 commit comments

Comments
 (0)