From 9c348cecf137ad74df16d7fedf76e360e505e533 Mon Sep 17 00:00:00 2001 From: Hailin Wang Date: Sun, 23 Jun 2024 18:30:03 +0800 Subject: [PATCH] Update version scheme to no-guess-dev --- python/binder/__init__.py | 6 +++--- python/pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/binder/__init__.py b/python/binder/__init__.py index 3e99166c..72eccd58 100644 --- a/python/binder/__init__.py +++ b/python/binder/__init__.py @@ -7,16 +7,15 @@ except ImportError: _default_version = "0.0.1" - __all__ = ["binder", "__version__"] - BINDER_BIN_DIR = os.path.join(os.path.dirname(__file__), "bin") def binder(): raise SystemExit(subprocess.call([os.path.join(BINDER_BIN_DIR, "binder")] + sys.argv[1:], close_fds=False)) + def _get_version(): """Return the version string used for __version__.""" # Only shell out to a git subprocess if really needed, and not on a @@ -29,7 +28,7 @@ def _get_version(): return setuptools_scm.get_version( root=root, - version_scheme="post-release", + version_scheme="no-guess-dev", fallback_version=_default_version, ) except (ImportError, LookupError): @@ -37,4 +36,5 @@ def _get_version(): else: # Get the version from the _version.py setuptools_scm file. return _default_version + __version__ = _get_version() diff --git a/python/pyproject.toml b/python/pyproject.toml index 57d2a7ed..c4fc27e3 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -84,5 +84,5 @@ archs = ["universal2"] [tool.setuptools_scm] root = ".." -version_scheme = "post-release" +version_scheme = "no-guess-dev" fallback_version = "0.0.1"