From 0ee6d8d979c12df85524204a1b4921d5bec622ba Mon Sep 17 00:00:00 2001 From: abdeladim-s Date: Fri, 29 Nov 2024 16:59:32 -0500 Subject: [PATCH] fix local versions not allowed in PYPI upload --- pyproject.toml | 6 +++++- setup.py | 1 - version.txt | 1 - 3 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 version.txt diff --git a/pyproject.toml b/pyproject.toml index c32be92..fa6b22a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,6 +5,7 @@ requires = [ "ninja", "cmake>=3.12", "repairwheel", + "setuptools-scm>=8" ] build-backend = "setuptools.build_meta" @@ -47,4 +48,7 @@ extend-select = [ extend-ignore = [ "E501", # Line too long ] -target-version = "py39" \ No newline at end of file +target-version = "py39" + +[tool.setuptools_scm] +version_file = "_version.py" \ No newline at end of file diff --git a/setup.py b/setup.py index 78bddc0..186258c 100644 --- a/setup.py +++ b/setup.py @@ -231,7 +231,6 @@ def get_version() -> str: # logic and declaration, and simpler if you include description/version in a file. setup( name="pywhispercpp", - version=get_version(), author="abdeladim-s", description="Python bindings for whisper.cpp", long_description=long_description, diff --git a/version.txt b/version.txt deleted file mode 100644 index 40f8943..0000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -1.3.0a0 \ No newline at end of file