Skip to content

Commit

Permalink
FEAT-#96: Add python-versioneer to get exact unidist version (#105)
Browse files Browse the repository at this point in the history
Signed-off-by: Igoshev, Yaroslav <[email protected]>
  • Loading branch information
YarShev authored Jan 28, 2022
1 parent 3cf5720 commit 2dd748c
Show file tree
Hide file tree
Showing 8 changed files with 2,868 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto
unidist/_version.py export-subst
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include versioneer.py
include unidist/_version.py
11 changes: 6 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@
import sys


sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))


# -- Project information -----------------------------------------------------

project = "unidist"
copyright = "2021-2022, Modin Authors"
author = "unidist contributors"

# The full version, including alpha/beta/rc tags
release = "0.0.1"
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
import unidist # noqa: E402

# The short project version like 1.1
version = f"{unidist.__version__}"
# The full project version like 1.1.0rc1
release = version

# -- General configuration ---------------------------------------------------

Expand Down
11 changes: 11 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,14 @@
max-line-length = 88
ignore = E203, E266, E501, W503
select = B,C,E,F,W,T4,B9
per-file-ignores =
versioneer.py:T001
unidist/_version.py:T001

[versioneer]
VCS = git
style = pep440
versionfile_source = unidist/_version.py
versionfile_build = unidist/_version.py
tag_prefix =
parentdir_prefix = unidist-
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pathlib
from setuptools import setup, find_packages
import versioneer


here = pathlib.Path(__file__).parent.resolve()
Expand All @@ -14,7 +15,8 @@

setup(
name="unidist",
version="0.0.1",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="Unified Distributed Execution",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
4 changes: 4 additions & 0 deletions unidist/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
get_ip,
num_cpus,
)
from ._version import get_versions

__all__ = [
"init",
Expand All @@ -27,3 +28,6 @@
"get_ip",
"num_cpus",
]

__version__ = get_versions()["version"]
del get_versions
Loading

0 comments on commit 2dd748c

Please sign in to comment.