From d61408e5943a1fc3a3399bb9a4dbb2ad62bf3364 Mon Sep 17 00:00:00 2001 From: Sylvain Tricot Date: Fri, 2 Jun 2023 11:14:21 +0200 Subject: [PATCH] Remove 'print' calls in version.py --- src/msspec/version.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/msspec/version.py b/src/msspec/version.py index ebf350c..bc5a91b 100644 --- a/src/msspec/version.py +++ b/src/msspec/version.py @@ -37,23 +37,15 @@ try: cmd = ["git describe|sed 's/-\([0-9]\+\)-.*/.dev\\1/g'"] result = subprocess.run(cmd, stdout=subprocess.PIPE, shell=True) __version__ = result.stdout.decode('utf-8').strip() - if __version__ != "": - print("from git: ", __version__) - else: - raise NameError("Not a git repo") except Exception as err: - print(err) try: thisfile_path = os.path.abspath(__file__) thisfile_dir = os.path.dirname(thisfile_path) versionfile = os.path.join(thisfile_dir, "./VERSION") with open(versionfile, "r") as fd: __version__ = fd.readline().strip() - print("from VERSION: ", __version__) except Exception as err: try: __version__ = version(PKGNAME) - print("from metadata: ", __version__) except Exception as err: - print("Unable to get the version number!") __version__ = "0.0.0"