Skip to content

Commit deb715f

Browse files
committed
CLN: Add version support using versioneer
Use versioneer to add improved version support
1 parent 55c9025 commit deb715f

File tree

8 files changed

+2363
-4
lines changed

8 files changed

+2363
-4
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
randomstate/_version.py export-subst

MANIFEST.in

+2
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ exclude randomstate/pcg64*
1010
exclude randomstate/xorshift128*
1111
exclude randomstate/xorshift1024*
1212

13+
include versioneer.py
14+
include randomstate/_version.py

doc/source/conf.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616
import sys
1717
import os
1818
import shlex
19+
from distutils.version import LooseVersion
1920
import guzzle_sphinx_theme
20-
21+
import randomstate
2122
# If extensions (or modules to document with autodoc) are in another directory,
2223
# add these directories to sys.path here. If the directory is relative to the
2324
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -65,9 +66,9 @@
6566
# built documents.
6667
#
6768
# The short X.Y version.
68-
version = '1.11'
69+
version = '.'.join(map(str,LooseVersion(randomstate.__version__).version[:2]))
6970
# The full version, including alpha/beta/rc tags.
70-
release = '1.11.4'
71+
release = randomstate.__version__
7172

7273
# The language for content autogenerated by Sphinx. Refer to documentation
7374
# for a list of supported languages.

randomstate/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33
from randomstate.prng.mt19937 import *
44
from randomstate.entropy import random_entropy
55
import randomstate.prng
6+
7+
from ._version import get_versions
8+
__version__ = get_versions()['version']
9+
del get_versions

0 commit comments

Comments
 (0)