From c23bc7d0d85606351bf2d8eefa3ace0e92d6eda6 Mon Sep 17 00:00:00 2001 From: darothen Date: Mon, 7 Aug 2023 07:36:52 -0600 Subject: [PATCH] Fixes versioning by adopting a simple devN schema --- setup.py | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/setup.py b/setup.py index f735552..cdea498 100644 --- a/setup.py +++ b/setup.py @@ -12,30 +12,13 @@ from textwrap import dedent MAJOR, MINOR, MICRO = 1, 3, 1 +DEV_ITER = 0 DEV = True -VERSION = "{}.{}.{}".format(MAJOR, MINOR, MICRO) -# Correct versioning with git info if DEV if DEV: - import subprocess - - pipe = subprocess.Popen( - ["git", "describe", "--always", "--match", "'v[0-9]*'"], - stdout=subprocess.PIPE, - ) - so, err = pipe.communicate() - - if pipe.returncode != 0: - # no git or something wrong with git (not in dir?) - warnings.warn( - "WARNING: Couldn't identify git revision, using generic version string" - ) - VERSION += ".dev" - else: - git_rev = so.strip() - git_rev = git_rev.decode("ascii") # necessary for Python >= 3 - - VERSION += ".dev-" + format(git_rev) + VERSION = "{}.{}.dev{}".format(MAJOR, MINOR, DEV_ITER) +else: + VERSION = "{}.{}.{}".format(MAJOR, MINOR, MICRO) extensions = [ # Numba AOT extension module