From ca1e593874e921396a548445da1e99df8de3b6ae Mon Sep 17 00:00:00 2001 From: k4yt3x Date: Sat, 12 Feb 2022 06:45:59 +0000 Subject: [PATCH] let setup read version from init --- pyproject.toml | 2 +- setup.cfg | 2 +- video2x/__init__.py | 5 +++++ video2x/__main__.py | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 10ace73..24839b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["setuptools>=44", "wheel", "setuptools_scm[toml]>=3.4.3"] +requires = ["setuptools>=46.4", "wheel", "setuptools_scm[toml]>=3.4.3"] build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg index 4db7bf3..6920b05 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,7 +10,7 @@ [metadata] name = video2x -version = 5.0.0-beta1 +version = attr: video2x.__version__ author = K4YT3X author_email = i@k4yt3x.com license = GNU Affero General Public License v3.0 diff --git a/video2x/__init__.py b/video2x/__init__.py index 7a66cf4..c31b3cd 100755 --- a/video2x/__init__.py +++ b/video2x/__init__.py @@ -22,6 +22,11 @@ Date Created: July 3, 2021 Last Modified: February 11, 2022 """ +# version assignment has to precede imports to +# prevent setup.cfg from producing import errors +__version__ = "5.0.0-beta2" + +# local imports from .video2x import Video2X from .upscaler import Upscaler from .interpolator import Interpolator diff --git a/video2x/__main__.py b/video2x/__main__.py index bdb75cb..c9e8d8d 100755 --- a/video2x/__main__.py +++ b/video2x/__main__.py @@ -22,6 +22,7 @@ Date Created: July 3, 2021 Last Modified: February 11, 2022 """ +# local imports from .video2x import main