From 4c02e1aeab9d1998caa79f540a3d7b48af02ec8b Mon Sep 17 00:00:00 2001 From: anthony sottile Date: Thu, 5 Oct 2023 13:53:08 -0400 Subject: [PATCH] ref: fix version lookup and package build from source --- codecov_cli/__init__.py | 5 ++++- setup.py | 6 ++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/codecov_cli/__init__.py b/codecov_cli/__init__.py index 4596d037..66811369 100644 --- a/codecov_cli/__init__.py +++ b/codecov_cli/__init__.py @@ -1 +1,4 @@ -__version__ = '0.3.6' +import importlib.metadata + + +__version__ = importlib.metadata.version('codecov-cli') diff --git a/setup.py b/setup.py index ddf5e08a..c4c1f734 100644 --- a/setup.py +++ b/setup.py @@ -8,12 +8,9 @@ with open(path.join(here, "README.md"), encoding="utf-8") as f: long_description = f.read() -with open(path.join(here, "VERSION"), encoding="utf-8") as f: - version = f.readline().strip() - setup( name="codecov-cli", - version=version, + version='0.3.6', packages=find_packages(exclude=["contrib", "docs", "tests*"]), description="Codecov Command Line Interface", long_description=long_description, @@ -34,6 +31,7 @@ "codecovcli = codecov_cli.main:run", ], }, + python_requires=">=3.8", ext_modules=[ Extension( "staticcodecov_languages",